This project is a Django web application that:
- Accepts PDF uploads
- Extracts tables using Camelot and pdfplumber
- Cleans and normalizes table data
- Stores data in a database
- Provides a simple dashboard to visualize aggregates via Chart.js
-
Install dependencies:
- Python 3.10 or 3.11
- Poetry
- Ghostscript (for Camelot) and ensure its
bindirectory is on PATH
-
Install project packages:
poetry install- Create Django project structure (if not already present) and run migrations:
poetry run python manage.py makemigrations
poetry run python manage.py migrate
poetry run python manage.py createsuperuser- Run the development server:
poetry run python manage.py runserverVisit http://127.0.0.1:8000/ingestion/upload to upload PDFs.
- Extraction tries Camelot (lattice then stream). If none found, it falls back to pdfplumber.
- Extracted rows are stored as JSON so tables with varying schemas are supported. For advanced JSON querying consider Postgres.