Metadata-Version: 2.4
Name: docp-parsers
Version: 1.0.0
Summary: A basic document parsing utility. (Parsers)
Author-email: The Developers <development@s3dev.uk>
License-Expression: GPL-3.0-or-later
Project-URL: Documentation, https://docp-parsers.readthedocs.io
Project-URL: Homepage, https://github.com/s3dev/docp-parsers
Project-URL: Repository, https://github.com/s3dev/docp-parsers
Keywords: document,library,parsing,utility,utilities
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: End Users/Desktop
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: Microsoft :: Windows
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Utilities
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: docp-core>=1.0.1
Requires-Dist: pandas<3.0
Requires-Dist: pdfplumber>=0.11.0
Requires-Dist: python-pptx>=1.0.2
Requires-Dist: unidecode>1.0.0
Requires-Dist: utils4>=1.8.1
Dynamic: license-file

# A basic document parsing and loading utility - Parsers

[![PyPI - Version](https://img.shields.io/pypi/v/docp-parsers?style=flat-square)](https://pypi.org/project/docp-parsers)
[![PyPI - Implementation](https://img.shields.io/pypi/implementation/docp-parsers?style=flat-square)](https://pypi.org/project/docp-parsers)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/docp-parsers?style=flat-square)](https://pypi.org/project/docp-parsers)
[![PyPI - Status](https://img.shields.io/pypi/status/docp-parsers?style=flat-square)](https://pypi.org/project/docp-parsers)
[![Static Badge](https://img.shields.io/badge/tests-passing-brightgreen?style=flat-square)](https://pypi.org/project/docp-parsers)
[![Static Badge](https://img.shields.io/badge/code_coverage-100%25-brightgreen?style=flat-square)](https://pypi.org/project/docp-parsers)
[![Static Badge](https://img.shields.io/badge/pylint_analysis-100%25-brightgreen?style=flat-square)](https://pypi.org/project/docp-parsers)
[![Documentation Status](https://readthedocs.org/projects/docp-parsers/badge/?version=latest&style=flat-square)](https://docp-parsers.readthedocs.io/en/latest/)
[![PyPI - License](https://img.shields.io/pypi/l/docp-parsers?style=flat-square)](https://opensource.org/license/gpl-3-0)
[![PyPI - Wheel](https://img.shields.io/pypi/wheel/docp-parsers?style=flat-square)](https://pypi.org/project/docp-parsers)

## Overview
The `docp-*` project suite is designed as a comprehensive (**doc**)ument \(**p**)arsing library. Built in CPython, it consolidates the capabilities of various lower-level libraries, offering a unified solution for parsing binary document structures.

The suite is extended by several sister projects, each providing unique functionality:

Project | Description                                                                               
|:---|:---
**docp-core** | Centralized core objects, functionality and settings.
**docp-parsers** | Parse binary documents (e.g. PDF, PPTX, etc.) into Python objects.                     
**docp-loaders** | Load a parsed document's embeddings into a Chroma vector database, for RAG-enabled LLM use.
**docp-docling** | Convert a PDF into Markdown format via wrappers to the `docling` libraries.
**docp-dbi** | Interfaces to document databases such as ChromaDB, and Neo4j (coming soon).

### The Toolset (Parsers)
As of this release, parsers for the following binary document types are supported:

- PDF
- MS PowerPoint (PPTX)
- (more coming soon)

## Quickstart

### Installation
To install `docp-parsers`, first activate your target virtual environment, then use `pip`:

```bash
pip install docp-parsers
```

For older releases, visit [PyPI][pypi-history] or the [GitHub Releases][github-releases] page.

### Example Usage
For convenience, here are a couple examples for how to parse the supported document types.

**Extract text from a PDF file:**
``` python
    >>> from docp_parsers import PDFParser

    >>> pdf = PDFParser(path='/path/to/myfile.pdf')
    >>> pdf.extract_text()

    # Access the content of page 1.
    >>> pg1 = pdf.pages[1].content
```

**Extract text from a PowerPoint presentation:**
``` python
    >>> from docp_parsers import PPTXParser

    >>> pptx = PPTXParser(path='/path/to/myfile.pptx')
    >>> pptx.extract_text()

    # Access the text on slide 1.
    >>> pg1 = pptx.slides[1].content
```

## Using the Library
The documentation suite provides detailed explanations and usage examples for each importable module. For in-depth documentation, code examples, and source links, refer to the [Library API][api] page.

A **search** field is available in the left navigation bar to help you quickly locate specific modules or methods.

## Troubleshooting
No troubleshooting guidance is available at this time.

For questions not covered here, or to report bugs, issues, or suggestions, please open an issue on [GitHub][github].


[api]: https://docp-parsers.readthedocs.io/en/latest/
[github]: https://github.com/s3dev/docp-parsers
[github-releases]: https://github.com/s3dev/docp-parsers/releases
[pypi-history]: https://pypi.org/project/docp-parsers/#history

