This is a template repository for Python
Use Makefile to run the project locally.
# help
make
# install dependencies for development
make install-deps-dev
# run tests
make test
# run CI tests
make ci-test
# build docker image
make docker-build
# run docker container
make docker-run
# run CI tests in docker container
make ci-test-docker
To publish the docker image to Docker Hub, you need to set the following secrets in the repository settings.
gh secret set DOCKERHUB_USERNAME --body $DOCKERHUB_USERNAME
gh secret set DOCKERHUB_TOKEN --body $DOCKERHUB_TOKEN
# help
poetry run python scripts/pdf_cli.py --help
# Convert a PDF file to a Markdown file.
poetry run python scripts/pdf_cli.py pdf2md \
--in-pdf "./datasets/sample.pdf" \
--out-md "./datasets/sample.md" \
--verbose
# Dump the table of contents (TOC) of a PDF file.
poetry run python scripts/pdf_cli.py toc \
--in-pdf "./datasets/sample.pdf" \
--verbose
# Dump tables of the specified page of a PDF file.
poetry run python scripts/pdf_cli.py tables \
--in-pdf "./datasets/sample.pdf" \
--page-number 123 \
--verbose