Metadata-Version: 2.4
Name: wagtail-pdf-converter
Version: 0.1.0rc1
Summary: PDF to Markdown conversion
Author-email: Torchbox <hello@torchbox.com>
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
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: Framework :: Django
Classifier: Framework :: Django :: 4.2
Classifier: Framework :: Django :: 5.1
Classifier: Framework :: Django :: 5.2
Classifier: Framework :: Django :: 6.0
Classifier: Framework :: Wagtail
Classifier: Framework :: Wagtail :: 6
Classifier: Framework :: Wagtail :: 7
License-File: LICENSE
Requires-Dist: Django>=4.2,<7
Requires-Dist: Wagtail>=6.3,<8
Requires-Dist: django-tasks
Requires-Dist: google-api-core>=2.28
Requires-Dist: google-genai>=1.49
Requires-Dist: tenacity>=9.1
Requires-Dist: puremagic>=1.30
Requires-Dist: pymupdf>=1.26
Requires-Dist: numpy>=2.3; python_version >= '3.11'
Requires-Dist: numpy>=2.2; python_version < '3.11'
Requires-Dist: Markdown>=3.10
Requires-Dist: nh3>=0.3
Requires-Dist: wagtail-markdown>=0.13
Requires-Dist: humanize>=4.14
Requires-Dist: tox==4.32.0 ; extra == "ci"
Requires-Dist: tox-gh-actions==3.5.0 ; extra == "ci"
Requires-Dist: invoke>=3.0 ; extra == "dev"
Requires-Dist: wagtail-pdf-converter[testing, linting, type-checking, docs] ; extra == "dev"
Requires-Dist: zensical==0.0.34 ; extra == "docs"
Requires-Dist: pre-commit>=4.5 ; extra == "linting"
Requires-Dist: ruff>=0.15 ; extra == "linting"
Requires-Dist: django-environ==0.13.0 ; extra == "testing"
Requires-Dist: django-extensions==4.1 ; extra == "testing"
Requires-Dist: psycopg2-binary==2.9.12 ; extra == "testing"
Requires-Dist: pytest==9.0.3 ; extra == "testing"
Requires-Dist: pytest-cov==7.1.0 ; extra == "testing"
Requires-Dist: pytest-django==4.12.0 ; extra == "testing"
Requires-Dist: pytest-xdist==3.8.0 ; extra == "testing"
Requires-Dist: wagtail-factories==4.4.0 ; extra == "testing"
Requires-Dist: django-stubs>=5.1.0 ; extra == "type-checking"
Requires-Dist: mypy>=1.15.0 ; extra == "type-checking"
Requires-Dist: types-beautifulsoup4>=4.12.0.20240907 ; extra == "type-checking"
Requires-Dist: types-Markdown>=3.7.0.20241204 ; extra == "type-checking"
Project-URL: Home, https://github.com/torchbox/wagtail-pdf-converter
Provides-Extra: ci
Provides-Extra: dev
Provides-Extra: docs
Provides-Extra: linting
Provides-Extra: testing
Provides-Extra: type-checking

# wagtail-pdf-converter

> PDF to Markdown conversion for Wagtail, powered by AI

[![PyPI](https://img.shields.io/pypi/v/wagtail-pdf-converter.svg)](https://pypi.org/project/wagtail-pdf-converter/)

[![PDF Converter CI](https://github.com/torchbox/wagtail-pdf-converter/actions/workflows/ci.yml/badge.svg)](https://github.com/torchbox/wagtail-pdf-converter/actions/workflows/ci.yml)
[![License: BSD-3-Clause](https://img.shields.io/badge/License-BSD--3--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![Pre-commit](https://img.shields.io/badge/pre--commit-enabled-76877c?&logo=pre-commit&labelColor=1f2d23)](https://pre-commit.com/)

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->

- [Supported versions](#supported-versions)
- [Development](#development)
  - [Requirements](#requirements)
    - [Core](#core)
    - [Extra](#extra)
  - [Getting Started](#getting-started)
  - [Running tests](#running-tests)
  - [pre-commit](#pre-commit)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

## Supported versions

- Python 3.10 - 3.14
- Django: 4.2, 5.1, 5.2, 6.0
- Wagtail: 6.3, 7.0, 7.1, 7.2

## Development

### Requirements

#### Core

- Python 3.10+

#### Extra

- Docker and Docker Compose, if you want to quickly set up a Postgres DB to work with

### Getting Started

1. With your preferred virtualenv activated, install the dependencies

```sh
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"
```

You can also use [flit](https://flit.pypa.io/en/stable/):

```sh
python -m pip install flit
flit install
```

2. If you're using Postgres:

Spin up the postgres container:

```sh
inv up
```

Copy `.env.example` to `.env`:

```sh
cp -v .env.example .env
```

The `DATABASE_URL` in `.env` will be automatically picked up by the test settings. If no `.env` file exists, the project will use SQLite by default.

And you should be good to go

### Running tests

The simplest is to just run `pytest`.

If you wanna run the full tox suite, then run `tox` (You need to ensure you have all the different versions of python on your system, and [`tox` should know about them](https://stackoverflow.com/questions/75715657/getting-tox-to-use-the-python-version-set-by-pyenv)). You can speed things up by running all envs in parallel, via `tox -p auto`.

or, you can run them for a specific environment `tox -e python3.14-django5.2-wagtail7.2` or specific test
`tox -e python3.14-django5.2-wagtail7.2-sqlite wagtail_pdf_converter.tests.test_file.TestClass.test_method`

To run the test app interactively, use `tox -e interactive`, visit `http://127.0.0.1:8020/admin/` and log in with `admin`/`changeme`.

### pre-commit

Note that this project uses [pre-commit](https://github.com/pre-commit/pre-commit).
It is included in the project testing requirements. To set up locally, run the following in project root:

```shell
# initialize pre-commit
pre-commit install

# Optional, run all checks once for this, then the checks will run only on the changed files
git ls-files --others --cached --exclude-standard | xargs pre-commit run --files
```

