Sloth Tidy:讓 AI 替你整理檔案
Sloth Tidy:let your AI clean your files
Sloth Tidy 以 Gemma 本機 AI 模型為檔案選擇資料夾及整理檔名,先讓用戶確認計劃才移動檔案,並支援復原。測試的 4 個示範檔案中,3 個直接分到正確資料夾;程式只讀取文字檔內容,PDF 和圖片則只參考檔名。示範使用 Google Colab 和虛構檔案,未有以真實檔案測試私隱功能。
WHAT I BUILT:
My files are named things like IMG_2231 and final_FINAL2, and I never clean them up. So I built Sloth Tidy. It reads the first few words of each file, and a local AI model picks a folder and a clean name. It shows me a plan first, moves nothing until I say yes, and has an undo command.
The AI is Gemma, an open-weight model, running through Ollama, which is open-source. The rest is plain Python.
EFFORT IT SAVES:
I no longer open every file, decide where it goes, and rename it. I just check the plan. For 4 demo files, sorting by hand took me about [X minutes], and Sloth Tidy made the plan in about [Y seconds].
DEMO:
I tested it on 4 fake files: maths notes, an electricity bill, meeting notes, and a Hinglish recipe.
Three of the four went to the right folder straight away. The recipe went to “Other” because I had no food folder, so I added a Food category. Then I ran undo, and all 4 files went back to where they started.
WHY OPEN-WEIGHT AI MATTERED
It is free, with no API key and no bill. I can swap the model by changing one line. On my own laptop it can run offline, so private files never leave my computer. For this demo I used Google Colab with fake files, so I did not test the privacy part on real files. And because I run the model myself, I could check every answer before using it. The AI only suggests, and Python decides what is allowed.
LIMITS
It reads only text files, and uses just the file name for PDFs and images.
來源:DEV Community · dev.to
