Dewey - User Guide
Dewey helps you manage big folder libraries (books, movies, series, music, source code, text notes): find things by name and folder, sort what lands in your New / ToAdd / ToSort folders, find duplicates, spot missing episodes, and make sure films have subtitles in all your languages. Nothing is moved or deleted without your confirmation, and moves can be undone.
1. Install
sudo nala install libsqlite3-0 libgtk2.0-0 # usually already present on Mint
cd dewey && ./linux/install.sh # installs dewey (command line) and dewey-gui (menu entry "Dewey")
Optional tools: ffmpeg/ffprobe (subtitles), poppler-utils (PDF text), LibreTranslate and whisper.cpp (subtitle translation/transcription).
2. First steps (command line)
dewey add ~/Books
dewey add /media/data/Movies
dewey add /media/usb --label Backup-4TB # a removable disk; the label shows when it is unplugged
dewey scan --content # first scan takes a while; later scans only touch what changed
--contentalso reads text inside text/source files, EPUB, DOCX, ODT and subtitles. Add--pdffor PDFs.- Music (mp3, FLAC) and EPUB tags (artist, album, author, series, title) are always indexed.
3. Find
dewey find asimov foundation # words match file names AND parent folder names
dewey find kind:music queen opera # filters: kind: ext: in: under: "exact phrase"
dewey find mule --content # words inside documents
dewey where odyssey # which folders hold the matches
dewey related "Inception 2010" # companions, other versions, same series/author
Kinds: book, movie, music, source, text, image, archive, dir. In the GUI use the Find tab; double-click a hit to open its folder.
4. Sort the inbox folders
Folders named New, ToAdd, ToSort (also to add, to sort, inbox, unsorted, incoming) are inboxes.
dewey sort --dry # only show suggestions
dewey sort # ask for each item: y / 1-3 (another suggestion) / n / m (type a folder) / q
dewey sort --auto 0.55 # accept suggestions at 55% or better without asking (your choice, off by default)
dewey undo # put the last batch back
Each suggestion shows a percentage and a reason (for example: "folder name matches 'pink'"). Items still downloading are skipped. A warning appears when an inbox file already exists in the library. In the GUI: Sort inbox tab - tick items, choose another destination from the list if you wish, press Move, or Undo.
Rules (your own instructions beat the learned guesses): edit ~/.config/dewey/rules.ini (GUI: Library > Edit rules; restart to load).
[rule:Music by artist]
kind=music
dest=/data/Music/{artist}/{album}
[rule:Subtitles go with their movie]
match=*.srt;*.ass
dest=@companion
[rule:Leave my scratch notes]
match=scratch*.txt
dest=@skip
5. Duplicates
dewey dupes --min 100000 # identical files (same bytes)
dewey dupes --names # also: same title, different file (other quality/edition) - for you to judge
dewey dupes --move-to ~/Review # move the extra copies to a quarantine folder (undo with: dewey undo)
Dewey keeps one copy (not in an inbox, oldest, shortest path) and never deletes anything itself.
6. Series gaps and library report
dewey gaps # e.g. "show S01: missing 4, 7-8 (have 1-9)"
dewey report --dupes # totals, space by kind, biggest files/folders, oldest, empty folders, unplugged drives
GUI: Reports tab (buttons Library report and Find missing episodes).
7. Removable drives
Unplugged disks stay searchable (hits are marked OFFLINE with the label) and Dewey never proposes a folder on them. If a disk comes back under another path:
dewey move-root /media/old /media/new
dewey scan
8. Subtitles in all your languages
dewey subs --langs en,he,es # choose your set (saved)
dewey subs # list videos missing a language
dewey subs --fix # fill the gaps (asks first; new files only)
Only real .srt files next to the video (or in a Subs folder) count, named like Movie.he.srt. .ass/.vtt files and subtitles inside the video are first converted/extracted to .srt. Then Dewey tries: 1) download from OpenSubtitles, 2) translate from a subtitle you already have (LibreTranslate), 3) transcribe the speech (whisper.cpp) when there is no subtitle at all. Settings in ~/.config/dewey/dewey.ini:
[subs]
langs=en,he,es
libretranslate_url=http://localhost:5000
opensubtitles_key=YOUR_KEY
opensubtitles_user=YOU
opensubtitles_pass=SECRET
whisper_cmd=whisper-cli
whisper_model=/path/to/ggml-model.bin
Machine-made files are listed in ~/.config/dewey/subs.log. Options: --no-web --no-translate --no-transcribe --limit N --under DIR --min-mb 20 --yes.
9. GUI tour
Find - search box, Find related button, results with a Note column. Sort inbox - suggestions, Move, Undo. Duplicates - scan, tick extras, move to a folder. Reports - library report, missing episodes. Library - folders (with drive labels), Scan, Drive moved..., Edit rules, inbox names. Language selector: English / עברית / Español. Dark is the default; press the Light button to switch.
10. For scripts and your Cockpit
Every query command accepts --json. web/dewey_api.php is a read-only endpoint (token required, localhost by default); see its header and dewey_api.config.php.example.
11. Safety summary
- Moves ask first, are journaled, never overwrite (a " (1)" is added), and
dewey undorestores the last batch. - Duplicates are quarantined, not deleted. Subtitle fixing only adds files.
- Config and index live in
~/.config/dewey/. Deletingindex.dbjust means rescanning.
11b. The window (dewey-gui) and its Help
Start Dewey from the menu (or dewey-gui). The top bar has the five tabs on the left and Help, the Dark / Light switch and the language box (English / Hebrew / Spanish) on the right. The colours follow Deckhand's window in both modes, and the choice is remembered. Help opens a guide in the language you picked. It explains the program, then every tab, button, box and checkbox with an example:
| Tab | What is in it |
|---|---|
| Find | search box (kind:movie in:scifi alien, ext:epub "war and peace"), kind box, Search inside documents, Search (or Enter), Find related, double-click opens the folder |
| Sort inbox | Find suggestions, tick items, Destination box, Other folder..., Move ticked items, Undo last move |
| Duplicates | Find duplicates, Min size (KB), same-title option, Move ticked extras to..., Undo last move |
| Reports | Library report, include duplicates waste, Find missing episodes |
| Library | Add folder..., Remove, Drive moved..., Edit rules, Scan now, index text inside files, PDF too, Inbox folder names + Save |
The Help text lives in src/dewey_help.pas; the look (palette, flat buttons and tabs) in src/dewey_look.pas.
12. Troubleshooting
| Problem | Try |
|---|---|
| Nothing found | dewey roots, then dewey scan; check the folder is added |
| Disk shows "unplugged" | Mount it, or use dewey move-root if the path changed |
| Subtitle translation fails | Is LibreTranslate running at libretranslate_url? |
| Transcription not saved | Set whisper_model; Dewey will not save a transcript whose language it cannot recognise |
| GUI does not start | Install libgtk2.0-0; use the command line meanwhile |
Dewey on Windows
Windows 10 or 11, 64-bit. Unzip dewey-windows.zip and run powershell -ExecutionPolicy Bypass -File install.ps1 (no administrator rights). It puts dewey.exe (command line), dewey-gui.exe (the window) and sqlite3.dll in %LOCALAPPDATA%\Programs\Dewey, adds that folder to your path and adds a Start menu entry. Open a NEW terminal window to use dewey. You can also run the two programs straight from the unzipped folder: keep sqlite3.dll next to them.
Everything works as described above; the examples use Windows paths such as D:\Movies. Your library and settings are in %APPDATA%\dewey. uninstall.ps1 removes the program and keeps your library.
If Windows shows "Windows protected your PC" (the programs are not signed yet), choose More info, then Run anyway. The installer removes that download mark from its own files, so the installed program starts normally. A company rule that blocks unsigned programs still applies.