TruMetraPla
A desktop and command line tool that reads production logs from Excel and turns them into productivity KPIs per operator, process and machine, with filters, charts and CSV export.
- Role
- Author
- When
- October 2025 to August 2026
- Stack
- Python, pandas, openpyxl, Tkinter, ttkbootstrap, PyInstaller
Context
Small metalworking shops often track production in spreadsheets: one row per job, with the operator, the process, the machine, the pieces made and the hours spent. The data is there, but answering "how productive was each process last month?" means building the same pivot tables over and over. TruMetraPla reads those spreadsheets directly and does the sums.
What I built
Import that tolerates real spreadsheets. The loader recognises common column names in Italian and English (for example Operatore or Employee, Pezzi or Quantity, Ore or Hours) and maps them to canonical fields. When a sheet uses different names, a column can be mapped explicitly or an alias added from the command line. Extra columns are kept but ignored for KPIs.
KPIs. Total pieces, total hours and throughput (pieces per hour), broken down by operator, process and machine.
Two interfaces.
- A desktop dashboard (Tkinter with ttkbootstrap) to open a file, filter by operator, process or machine, sort the KPI table, look at pie charts and export the filtered data to CSV.
- A command line report:
trumetrapla report production.xlsx, with options to choose the sheet, map columns and add aliases.
The same functions are importable as a library (load_operations_from_excel, summarize_operations).
Packaging. Built in commands create a standalone Windows executable with PyInstaller and a Linux .tar.gz package with an install script, so the tool can run on machines without Python.
Engineering
The package uses a src/ layout with separate modules for loading, metrics, models, GUI, CLI and packaging, and a pytest suite.