Skip to content

torchbox/wagtail-pdf-converter

wagtail-pdf-converter

PDF to Markdown conversion for Wagtail, powered by AI

PyPI PyPI - Python Version PyPI - Versions from Framework Classifiers PyPI - Versions from Framework Classifiers

PDF Converter CI License: BSD-3-Clause Ruff Pre-commit

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
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"

You can also use flit:

python -m pip install flit
flit install
  1. If you're using Postgres:

Spin up the postgres container:

inv up

Copy .env.example to .env:

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). 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. It is included in the project testing requirements. To set up locally, run the following in project root:

# 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

About

PDF to Markdown conversion for Wagtail, powered by AI

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors