FrankenSorter
Python ยท local LLM desktop app

FrankenSorter

reads each document and files it under school, work, personal, or finance. locally, and nothing gets uploaded.

what makes it work

100% local

the model runs on your own machine through ollama. no rate limits, no subscription, nothing ever leaves the box.

regex overrides the model

every file gets the model's read, but regex has the final say on the calls it can prove. a course code like PROG23672 in the filename is school, full stop, whatever the model thought. junk prefixes like IMG and SCAN are blocklisted so a photo doesn't read as a course.

can't go off-script

the model answers against a json schema where the category is an enum, so it literally can't return a folder that doesn't exist. temperature's pinned to 0, so the same file sorts the same way every time.

reads real documents

pulls text from .pdf, .docx and .pptx, plus sheet names from .xlsx, and shrugs off malformed files instead of crashing on them.

the ui never freezes

built with customtkinter, and the sorting runs on a background thread so the window stays responsive. the stop button halts cleanly between files, so nothing's ever left half-moved.

how it works

extract

grabs the first ~1200 characters of a file. enough to know what it is, small enough to not blow past the context window.

analyze

hands that text to qwen2.5 7b with the schema, and gets back a category, a subject, and a cleaned-up name.

execute

makes the folder, renames to pascalcase, breaks any name collision with an epoch timestamp, and moves the file.

get it running

# install ollama and pull the model
ollama pull qwen2.5:7b

# clone and install the deps
git clone https://github.com/zakiaminn/FrankenSorter.git
cd FrankenSorter
pip install -r requirements.txt

# run it
python3 FrankenSorter.py

deps: customtkinter, ollama, pdfplumber, python-docx, python-pptx, openpyxl