Metadata-Version: 2.4
Name: pyconverters-grobid
Version: 0.6.21
Summary: Convert PDF to structured text using Grobid
Project-URL: Homepage, https://github.com/oterrier/pyconverters_grobid/
Author-email: Olivier Terrier <olivier.terrier@kairntech.com>
License: MIT
License-File: AUTHORS.md
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.12
Requires-Dist: grobid-client>=0.8.8
Requires-Dist: httpx<0.29.0,>=0.27.0
Requires-Dist: pymultirole-plugins<0.7.0,>=0.6.0
Requires-Dist: requests
Provides-Extra: dev
Requires-Dist: bump2version; extra == 'dev'
Requires-Dist: pre-commit; extra == 'dev'
Provides-Extra: docs
Requires-Dist: lxml-html-clean; extra == 'docs'
Requires-Dist: m2r2; extra == 'docs'
Requires-Dist: sphinx; extra == 'docs'
Requires-Dist: sphinx-rtd-theme; extra == 'docs'
Requires-Dist: sphinxcontrib-apidoc; extra == 'docs'
Provides-Extra: sbom
Requires-Dist: cyclonedx-bom>=7; extra == 'sbom'
Requires-Dist: pip-audit; extra == 'sbom'
Provides-Extra: test
Requires-Dist: langdetect; extra == 'test'
Requires-Dist: pandas; extra == 'test'
Requires-Dist: pytest; extra == 'test'
Requires-Dist: pytest-cov; extra == 'test'
Requires-Dist: ruff; extra == 'test'
Description-Content-Type: text/markdown

# pyconverters_grobid

[![license](https://img.shields.io/github/license/oterrier/pyconverters_grobid)](https://github.com/oterrier/pyconverters_grobid/blob/master/LICENSE)
[![tests](https://github.com/oterrier/pyconverters_grobid/workflows/tests/badge.svg)](https://github.com/oterrier/pyconverters_grobid/actions?query=workflow%3Atests)
[![codecov](https://img.shields.io/codecov/c/github/oterrier/pyconverters_grobid)](https://codecov.io/gh/oterrier/pyconverters_grobid)
[![docs](https://img.shields.io/readthedocs/pyconverters_grobid)](https://pyconverters_grobid.readthedocs.io)
[![version](https://img.shields.io/pypi/v/pyconverters_grobid)](https://pypi.org/project/pyconverters_grobid/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pyconverters_grobid)](https://pypi.org/project/pyconverters_grobid/)

Convert PDF to structured text using [Grobid](https://github.com/kermitt2/grobid)

## Installation

You can simply `pip install pyconverters_grobid`.

## Developing

### Pre-requisites

You will need to install [uv](https://docs.astral.sh/uv/) (for managing the virtual environment and running tasks):

```
pip install uv
```

Clone the repository:

```
git clone https://github.com/oterrier/pyconverters_grobid
```

Install dependencies (including test extras):

```
uv sync --extra test
```

### Running the test suite

```
uv run pytest
```

### Linting

```
uv run ruff check .
uv run ruff format --check .
```

### Building the documentation

```
uv run --extra docs sphinx-build docs docs/_build
```

The built documentation is available at `docs/_build/index.html`.

## SBOM & vulnerability check

Install the SBOM dependencies:

```
uv sync --extra sbom
```

Generate a CycloneDX SBOM from the current environment:

```
uv run cyclonedx-py environment -o sbom.cdx.json --output-format json
```

Audit dependencies for known vulnerabilities:

```
uv run pip-audit --format json --output audit-report.json
```

To fail on any known vulnerability (useful in CI):

```
uv run pip-audit --strict
```
