• Python 99.8%
  • Dockerfile 0.2%
Find a file
DigiToegankelijk NLdoc 0249325a5c chore: merge 'renovate/kimiworker-8.x' into 'develop'
fix(deps): update dependency kimiworker to v8.0.4

See merge request logius/nldoc/worker/pdf-nldocspec!174
2025-12-31 10:02:12 +00:00
.vscode chore: imports 2025-05-24 11:58:52 +02:00
integration_test chore: updated env vars for integration test 2025-12-23 11:48:48 +01:00
utilities chore(pylint): isinstance merge 2025-12-17 14:09:13 +01:00
.dockerignore chore: use poetry and docker compose 2025-02-18 13:55:06 +01:00
.editorconfig chore: set .editorconfig 2025-04-21 23:20:19 +00:00
.gitignore fix: added coverage reports to gitignore 2024-04-03 14:58:57 +02:00
.gitlab-ci.yml chore: updated env vars for integration test 2025-12-23 11:48:48 +01:00
CHANGELOG.md chore(release): 4.1.0 2025-12-30 16:58:39 +00:00
CODEOWNERS chore: set CODEOWNERS 2025-04-22 00:25:59 +00:00
conftest.py chore: updated env vars for integration test 2025-12-23 11:48:48 +01:00
docker-compose.yaml chore: use slim-bookworm 2025-12-31 09:50:44 +01:00
Dockerfile feat(deps): python 3.14.2 and kimiworker 8.0.3 2025-12-30 16:28:06 +01:00
DUPLICATE_CODE_PLAN.md chore: fixed whitespace 2025-12-17 11:39:58 +01:00
LICENSE chore: add correct license 2025-04-15 00:11:02 +02:00
main.py feat!: use configurable bucket names 2025-12-22 15:11:06 +01:00
poetry.lock fix(deps): update dependency kimiworker to v8.0.4 2025-12-31 09:56:38 +00:00
pyproject.toml fix(deps): update dependency kimiworker to v8.0.4 2025-12-31 09:56:38 +00:00
README.md fix: correct url in README 2025-11-25 12:19:40 +01:00
renovate.json chore: commit dependency updates as fix 2025-09-16 09:46:53 +02:00
test_main.py feat!: use configurable bucket names 2025-12-22 15:11:06 +01:00

PDF NLdocSpec Worker

pipeline status coverage report Latest Release

A Python worker that converts PDF document content to NLdocSpec output format. This worker processes PDF structures and transforms them into the standardized NLdocSpec format for further processing in the NLdoc pipeline.

Features

  • PDF content transformation to NLdocSpec format
  • Content pre-processing and post-processing pipelines
  • Support for various PDF elements (paragraphs, headings, lists, tables, figures)
  • Integration with RabbitMQ for message queuing
  • MinIO support for object storage
  • Docker and Kubernetes deployment ready

Getting Started

Local Installation

  1. Clone the repository:

    git clone https://gitlab.com/logius/nldoc/worker/pdf-nldocspec.git
    cd pdf-nldocspec
    
  2. Install Poetry (dependency management):

    curl -sSL https://install.python-poetry.org | python3 -
    
  3. Install dependencies:

    poetry install
    
  4. Install shell plugin:

    poetry self add poetry-plugin-shell && poetry self update
    
  5. Activate virtual environment:

    poetry shell
    

Running the Worker

  1. Ensure Docker and Docker Compose are installed (Installation Guide)

  2. Start the services:

    docker compose up
    
  3. The integration test will run automatically to test PDF to NLdocSpec conversion

  4. Access the management interfaces:

    • RabbitMQ Console: http://localhost:15672/
    • MinIO Console: http://localhost:9001/
  5. Once the docker compose up command has been exited using Ctrl+C, all containers relative to this instance will have shut down automatically.

Running Directly

To run the worker without Docker:

python3 main.py

For configuration options, refer to the Python base worker config.

Testing and Development

Run tests with pytest:

pytest

Deployment

Docker Images

Pre-built Docker images are available in our container registry.

Run the latest version:

docker run --rm registry.gitlab.com/logius/nldoc/worker/pdf-nldocspec:latest

Documentation

License

This project is licensed under the European Union Public License 1.2 - see LICENSE for details.