SlothSort: I let a 1B-parameter Gemma tidy the PDFs I was never going to sort
This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady What I Built I teach computer science at a university in Bengaluru. My Downloads folder is where institutional PDFs go to die: circulars, academic calendars, holiday lists, a Springer chapter proof, my own CV, a tax document. Ten of them had been sitting there since June. Would I have ever sorted them by…
This report covers the creation of SlothSort, a command-line tool that automatically sorts PDF files using a local open-weight model (Gemma 3 1B) on a laptop. The tool is designed to be fully offline and run without internet connection. The author, Vinob Chander, teaches computer science at a university in Bengaluru and has a large number of PDF files in his Downloads folder that were never sorted.
SlothSort reads the first two pages of each PDF, determines the document type, generates a sensible name, and files it under the appropriate category in folders such as Sorted/papers/, Sorted/circulars/, or Sorted/personal/. The model is constrained to answer in a fixed shape of JSON format, with categories like circulars, holiday lists, academic calendars, etc., drawn from a fixed list.
The tool was built with safety nets to handle cases where the model's classification is incorrect, such as checking the filename and the model's own title for category keywords. The tool was built in three small steps, with each step tested on real files before moving on. The model is not perfect, and it can make mistakes such as guessing the year or not being able to read scanned PDFs, but the undo log is there to reverse any changes if needed.
The author built this tool for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady, and it is licensed under MIT.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.