Dewey: the guide
Dewey keeps an index of your big folders (movies, series, books, music, photos, code, documents). With the index you can find anything in a second, sort what lands in your New / ToSort folders, find duplicates, spot missing episodes and read a report about your library.
Three promises: Dewey never deletes anything, it never moves a file until you tick it and press a Move button, and every move can be undone.
All the screenshots below use a small demo library: a few movies, a series with gaps, books, music, photos, a code project and some documents.
1. Your first ten minutes
- Open the Library tab and press Add
folder…. Pick a folder that holds one kind of thing (for
example
Movies,Books,Music). Add one folder at a time; you can add as many as you like. A removable disk gets a label (for exampleBackup-4TB) so you can tell it apart later. - Press Scan now. The first scan takes a while on a big disk. Later scans only look at what changed, so they are quick.
- Tick index text inside files if you want to search
inside documents, books and subtitles. Tick PDF
too if you also want the text of PDFs (needs the
poppler-utilspackage). - Go to the Find tab, type a few words and press Search (or Enter).
Your folders can be as messy or as tidy as they are. Dewey learns from the way you already keep things: the more consistent a folder is, the better its suggestions will be.
2. Finding things
Type words in the search box. Words match file names and the
names of the folders above them, so
asimov foundation finds
Books/Asimov, Isaac/Foundation.epub even though the file
name does not say Asimov.
You can add filters in the same box:
| Write | It means | Example |
|---|---|---|
kind:movie |
only that kind (book, movie, music, source, text, image, archive, dir) | kind:music queen opera |
ext:mkv |
only that file extension | ext:epub dune |
in:scifi |
only inside folders whose name contains that word | kind:movie in:scifi alien |
"war and peace" |
an exact phrase | ext:epub "war and peace" |
The kind box next to the search button adds the
kind: filter for you.
Search inside documents also looks at the
text in your files. In the picture it finds a lease by the
words notice period and shows the matching sentence in the
Note column. This works for files scanned with
index text inside files switched on.
Find related: select a result and press it. Dewey lists the companions of that file: other versions, files of the same series, the same author, with a percentage. Double-click a result to open its folder.
Techniques that work well:
- Start with two or three words. Add
kind:orin:only when there are too many results. - Lost a file but remember the folder? Use
in:with a word from the folder name. - Remember a sentence from a document? Tick Search inside documents and type a few words from it.
3. Sorting the inbox
Most libraries have a folder where new things arrive. Dewey treats a folder named New, ToAdd, ToSort, inbox, unsorted or incoming (inside any of your library folders) as an inbox. You can change these names at the bottom of the Library tab (Inbox folder names, then Save).
Press Find suggestions. For every item in an inbox, Dewey shows:
- Destination: the folder where it thinks the item belongs,
- Match: how sure it is (a percentage),
- Why: the reason, for example
blade(1 files) runner(folder name)means the words blade and runner are already in a folder name and in a file there.
How to read the picture:
Dune Messiah - Frank Herbert.epubgoes toBooks/Herbert, Frank(68%): the words frank and herbert are in that folder’s name.Blade.Runner.2049.2017.1080p.mkvgoes next toBlade Runner (1982)(100%): same words.Alien (1979) copy.mkvis not ticked: Dewey saw that it is a copy of a file already in the library (DUPLICATE of …).Foundation (1).epubhas only a weak guess (30%) and is not ticked either.
Only the confident ones (55% or better) are ticked for you. Look at the list, tick or untick any row yourself, then:
- the Destination box under the list lets you pick another suggested folder for the selected row,
- Other folder… lets you pick any folder (the row gets ticked),
- Move ticked items moves the ticked rows. A file is
never overwritten; if the name exists, Dewey adds
(1). - Undo last move puts the last batch back where it came from.
Techniques
- Keep your library consistent. If every author has a
folder named
Surname, Name, Dewey will keep proposing exactly that. - Name the new files well before sorting:
Dune Messiah - Frank Herbert.epubis easy to place;book(3).epubis not. - Sort in small batches. Move the obvious 100% ones, press Find suggestions again, and look at the rest.
- For exceptions, write a rule (section 6).
4. Duplicates
Press Find duplicates. Dewey groups files with exactly the same content. In each group one row says KEEP (a copy outside the inbox, the oldest, the one with the shortest path) and the others are copy.
- The extra copies of identical files are ticked for you. Look first,
then press Move ticked extras to… and choose a folder,
for example
~/Review. Nothing is deleted: the copies are moved there, and Undo last move brings them back. - Min size (KB) ignores small files.
100is a good start; use10000to look only at big files. (In the picture it is1, because the demo files are tiny.) - also list same-title files with different content adds files that share a title but are not identical (another quality or another edition). Those are never ticked: you decide.
5. Reports and missing episodes
Library report shows the totals, the space by kind, the biggest files and folders, the oldest files, empty folders, what is waiting in the inbox folders and which drives are unplugged. Tick include duplicates waste (slower) to add how much space exact duplicates take.
Find missing episodes looks at your series folders
and tells you what is missing. In the picture,
foundation S01: missing 4, 7-8 (have 1-9) means season 1
has episodes 1 to 9 but 4, 7 and 8 are not there.
6. Rules: when you know better than the guess
Open Library > Edit rules. Dewey opens
rules.ini in your editor (a template with comments is
created the first time). Rules run before the learned guesses,
and the first rule that matches wins. Rules are loaded the next
time Dewey starts.
[rule:Queen singles]
match=*Under Pressure*
dest=Queen/Singles
[rule:Leave Miles alone for now]
match=Miles Davis*
dest=@skip
A rule has a name in the brackets, conditions and a destination:
| Condition | Meaning |
|---|---|
kind=music |
the kind of the item |
match=*.srt;*.ass |
file-name patterns (* = anything), separated by
; |
meta=jazz |
a tag (genre, artist, author…) contains this text |
inbox=ToSort |
only items found in an inbox with this name |
| Destination | Meaning |
|---|---|
dest=/data/Music/Jazz |
a folder (a path starting with /) |
dest=Queen/Singles |
a folder relative to the folder that holds the
inbox (here Music/ToSort is the inbox, so this is
Music/Queen/Singles) |
dest=@companion |
next to the file with the same name that is already in the library (for subtitles) |
dest=@skip |
leave it where it is |
{artist} {album} {title}
{year} {author} {series}
{kind} {name} {ext} |
filled from the file’s tags and name, for example
dest=/data/Music/{artist}/{album} |
Test every new rule with Find suggestions: the
Why column says rule: Queen singles, or
rule: leave here.
7. Recipes for every kind of folder
Movies
- Layout that Dewey likes:
Movies/<Genre>/<Title (Year)>/<Title (Year)>.mkv, with the subtitles next to the film (Title (Year).en.srt). - Find:
kind:movie in:scifi,lebowski,ext:mkv 1982. - New downloads: put them in
Movies/New. Release names likeBlade.Runner.2049.2017.1080p.mkvare matched on their words. Subtitles that arrive with the film are suggested to the same folder. - Rule idea:
match=*trailer*anddest=@skip, so trailers stay in New until you decide. - Watch out: the same film in two qualities is not an exact duplicate. Tick also list same-title files to see them and choose.
TV series
- Layout:
Series/<Show>/Season N/<Show> S01E01.mkv. - Find missing episodes (Reports tab) works from the
S01E02pattern in the names. Keep that pattern in every file name. - Tip: after copying a new season, scan, then run Find missing episodes: you see at once if a download is incomplete.
Books and e-books
- Layout:
Books/<Surname, Name>/<Title>.epub. - Dewey reads the tags inside EPUB files (author,
title, series), so a badly named file in
Books/Newcan still be placed with the right author. - Find:
asimov foundation,kind:book in:herbert; with index text inside files you can search the text of a book:"the spice must flow". - Rule idea:
meta=Sandersonanddest=/data/Books/Sanderson, Brandon.
Music
- Layout:
Music/<Artist>/<Album>/<01 Track>.mp3. - Dewey reads the tags in MP3 and FLAC files (artist,
album, title). Good tags give good suggestions even when the file name
is just
track01.mp3. - Sort the ToSort folder once a week: files named
Artist - Title.mp3go to their artist folder (74% in the picture for Pink Floyd). - Rule idea:
kind=musicwithdest={artist}/{album}. A relative destination starts at the folder that holds the inbox, so with the inboxMusic/ToSortthis isMusic/<artist>/<album>.
Photos and images
- Layout: by year and event:
Photos/2024/Beach trip/Beach 001.jpg. - Find:
kind:image in:2024 beach. - Duplicates is the most useful tool here: the same
photo copied from a phone and a camera card shows up as identical files.
Use Min size
50to ignore tiny thumbnails.
Source code and projects
- Add your projects folder. Dewey knows source files and reads their text with index text inside files on.
- Find:
kind:source tidefinds the files; with Search inside documents ticked,high tidefinds the line inside the code (WriteLn("high tide ...")). - Tip: a
README.mdin each project folder makes the project easy to find by its words.
Documents, contracts, notes and PDFs
- Tick index text inside files and PDF
too (needs
poppler-utils) before scanning. - Find: tick Search inside documents and
type a few words you remember, like
notice period. - Tip: put the year in the file name
(
Lease agreement 2024.txt);in:and the words then narrow the search quickly.
Downloads and mixed folders
- Add the Downloads folder and add its name to Inbox folder
names on the Library tab (for example
downloads). Dewey then suggests, for each item, a folder that already holds that kind of thing. When all it has is the kind, the match is weak (30%) and the row is not ticked: look at it yourself. - Items that are still downloading are skipped, so a half-finished file is never moved.
Removable and backup drives
- Add the drive’s folder with a label
(
Backup-4TB). When the drive is unplugged, its files stay searchable, markedOFFLINE:with the label, so you know which disk to plug in. Dewey never proposes a folder on an unplugged drive. - If the drive comes back under another path, select it in the Library list, press Drive moved… and choose the new location; then Scan now. The index is kept and the paths are rewritten.
Archives and installers
.zip,.rar,.7z,.tar.gz,.deb,.AppImageare kind archive. Search withkind:archive.- Use Duplicates to find the same installer downloaded twice.
8. A routine that keeps a library tidy
- Scan now (or after you copy things in).
- Sort inbox: Find suggestions, move the confident ones, look at the rest.
- Duplicates: move the extra copies to a review folder; empty that folder when you are sure.
- Reports > Find missing episodes after adding series.
- Once in a while, Library report for the big picture: where the space goes.
9. For the command line
The same things are available as the dewey command:
dewey add ~/Books # add a library folder
dewey add /media/usb --label Backup-4TB
dewey scan --content # add --pdf for PDFs
dewey find kind:movie in:scifi # words, kind: ext: in: "phrase"
dewey find "notice period" --content # words inside documents
dewey where foundation # which folders hold the matches
dewey related "Alien (1979)" # companions and other versions
dewey sort --dry # suggestions only
dewey sort # ask for each item
dewey dupes --min 100000 # exact duplicates
dewey gaps # missing episodes
dewey report --dupes # the library report
dewey undo # put the last batch back
dewey help # this guide (es, he: dewey help es)
10. If something looks wrong
| Problem | Try |
|---|---|
| Nothing found | Check the folder is in the Library list and press Scan now. |
| A new file is not suggested | Is it inside a folder with an inbox name? Press Scan now first. Files that are still being written are skipped. |
| Everything says 30% | The library folders do not give Dewey enough to learn from yet. Keep new things consistent, or write a rule. |
| A disk says OFFLINE | Plug it in, or use Drive moved… if it has a new path. |
| The search does not find text inside files | Scan again with index text inside files ticked. |
| The window does not start | Install libgtk2.0-0, and use the dewey
command meanwhile. |
Your settings and the index are in ~/.config/dewey/. If
the index ever goes wrong, delete index.db there and scan
again; no file of yours is touched.