FilaTrack is a Flask-based Python web app for managing 3D printing filament usage and print jobs. It tracks filament rolls, logs print jobs, and integrates with PrusaSlicer to automatically import print data.
- Filament Roll Management: Add, edit, duplicate, and delete filament rolls.
- Print Job Tracking: Log print jobs, assign them to specific filament rolls, and track filament usage.
- Unreviewed Print Jobs: Temporary print job storage for review and approval.
- PrusaSlicer | OrcaSlicer | AnycubicSlicer Integration: Automatically import print job details from G-code.
- Search and Filter: Easily search and filter through filament rolls and print jobs.
- Data Persistence: Uses an SQLite database to store all information.
- Bootstrap-based UI: Responsive and user-friendly design.
Ensure you have the following installed on your system:
- Docker
- Docker Compose
-
Clone the repository:
git clone https://github.com/mrfenyx/filament-tracker.git cd filament-tracker
-
Run the application using Docker Compose:
docker-compose up -d --build
-
The database will be stored in the
./data/
directory, which should be backed up regularly to prevent data loss.
The application will run as a Docker container. Access it in your browser at http://127.0.0.1:5000/.
FilaTrack can automatically capture filament usage and project names from different slicers using a post-processing script.
- PrusaSlicer
- OrcaSlicer
- AnycubicSlicer and AnycubicSlicerNext
- When you export the gcode of a model in a supported Slicer, it executes a specific script as a post-processing script.
- This script extracts relevant metadata from the generated G-code file, such as:
- Filament weight (g)
- Project name (from filename or slicer environment variables)
- Slicing timestamp
- The extracted data is sent to FilaTrack as an unreviewed print job, where you can assign a filament roll and finalize it.
- Open the /integrations folder and execute
setup_integrations.ps1
(PowerShell script) - Follow the prompts in the script (pay attention!)
- At the end of the setup, you will see a command printed on the screen that you need to add to the post-processing script in your slicer software.
- Open PrusaSlicer.
- Go to Printer Settings → Custom G-code → Post-processing scripts.
- Add the command printed at the end of the script execution.
- Open Slicer.
- Go to Process → Others Tab → Post-processing scripts.
- Add the command printed at the end of the script execution.
You can manually run the script to test how it processes a G-code file:
python prusa_post.py "C:\path\to\your_model.gcode"
If successful, you should see something like:
INFO:root:Processing G-code: arcwelder/test.gcode
INFO:root:Successfully sent data to Filament Tracker API
- Open FilaTrack (
http://localhost:5000
). - Under Unreviewed Print Jobs, find the newly added entry.
- Click Approve, select the correct filament roll, adjust values if needed, and save the print job.
- Click on the 1️⃣ "Add Roll" button.
- Enter details like Maker, Color, Total Weight, and Remaining Weight.
- Click "Add Roll" to save it.
- Click on the 2️⃣ "Add Print Job" button.
- Select a filament roll, enter the print job details, and click "Add Print Job".
- The remaining filament weight will automatically be updated.
- Temporary jobs appear in the "Unreviewed Print Jobs" section.
- Click 6️⃣ ✅ Approve to finalize a job.
- Click 7️⃣ 🗑️ Delete to remove it.
Each entry has action buttons:
- 3️⃣ & 8️⃣ 📄 Duplicate: Clone an existing filament roll or print job.
- 4️⃣ & 9️⃣ ✏️ Edit: Modify the details.
- 5️⃣ & 🔟 🗑️ Delete: Remove an entry (deleting a filament roll will also delete associated print jobs).
The database is mounted to the local ./data/
directory as defined in docker-compose.yml
(feel free to change this):
volumes:
- ./data:/app/data
- Ensure that if you map this to an existing folder (e.g. NAS volume), you need to give RW permission to EVERYONE for that folder.
- Ensure that this folder is backed up regularly to avoid data loss.
This project is open-source and available under the MIT License.
Happy Printing! 🎨🎭