A Jupyter notebook-based tool for extracting structured inventory data from PDF documents.
This project uses Jupyter notebooks to parse PDF files containing inventory information and convert them into structured JSON data. It extracts:
- Owner information (name, address, telephone)
- Inventory items with their descriptions, purchase dates, serial numbers, and values
- Python 3.8+
- Jupyter Notebook/Lab
- Required libraries:
- PyPDF2 (or similar PDF extraction library)
- datetime
- re
- json
git clone https://github.com/yourusername/pdf-inventory-parser.git
cd pdf-inventory-parser
pip install -r requirements.txt
jupyter notebook- Open
inventory_parser.ipynbin Jupyter - Update the
pdf_pathvariable with the path to your PDF file - Run all cells in sequence
- The structured data will be saved as
extracted_inventory.json
inventory_parser.ipynb- Main notebook containing all extraction and parsing coderequirements.txt- Required Python dependenciessample/- Sample PDF files for testingoutput/- Directory where JSON output is saved
The notebook is divided into these main sections:
- Setup - Imports and initialization
- Data Models - Classes for Owner and Inventory data
- PDF Processing - Functions to extract and clean text from PDFs
- Date Parsing - Functions to handle different date formats
- Data Extraction - Functions to identify and extract structured data
- Run Pipeline - End-to-end process execution
- Output Results - Data visualization and JSON export
{
"owner_name": "Owner Name",
"owner_address": "Owner Address",
"owner_telephone": "Owner Phone Number",
"data": [
{
"purchase_date": "2025-04-25T20:50:51",
"serial_number": "12345",
"description": "Item Description",
"source_style_area": "Source Style Area",
"value": "500"
}
]
}MIT