Reinventing file storage with semantic tagging
Filters and Trees
The advantages of the method presented here only really unfold their true potential if you take into account certain additional capabilities and the interaction of the tools. Using the --filter
switch, Filetags, for example, creates a temporary view after you enter one or more tags, showing all the files containing the tags you entered. If so desired, this function will also work recursively across all subdirectories.
The temporary view consists of links in a predefined temporary directory. Both Appendfilename and Filetags are designed to change the originals of linked files when renaming them, provided they have the same name. With this tag filter you can easily browse a large number of files by reference to their tags. filetags --tagtrees
lets you create a temporary link structure, even recursively for an entire hierarchy if so desired.
This structure ignores the existing directories and builds a new structure parallel to them, which you can navigate by reference to the tags you used. There is a link to the foo -- bar baz.txt
file in the folders bar/
, baz/
, bar/baz/
, and baz/bar/
. This makes it easy to find the information you are looking for by association. As with tag filters, both Appendfilename and Filetags pass on changes in the links to the original files.
For technical reasons, the number of links to be created grows exponentially with the number of tags and files you have. It therefore makes sense to limit yourself to two or three levels.
Interaction
The individual building blocks of this approach only show their full benefit when used in combination. The file naming convention would be clumsy if the tools did not take care of managing the individual components.
The advantages of the approach can be illustrated by editing photos on a smartphone. My Android phone creates photos with file names like IMG_20190926_214730.jpg
. A manual or automated call to Guessfilename converts this to 2019-09-26T21.47.30.jpg
.
When it comes to viewing the synchronized or copied directory of the images, Appendfilename does a good job. In Geegie I mapped the wrapper script from Listing 2 inside Geeqie to the keyboard shortcut A. After selecting files and pressing the key, the program requests a common description. Individual photos are given a more precise description in a second pass using the same method. A wrapper script for Filetags is mapped to the T shortcut. This makes it easy to tag one or more photos.
I like to use the sel
("selection"), cliparts
and special
tags. The first tag marks photos that offer a representative selection. The cliparts
tag marks images that are suitable for presentations. The special
tag is awarded to particularly successful photos that are suitable for further work or as a desktop wallpaper.
Once the photos for an event are appropriately labeled and tagged, you can select them and use another shortcut, such as M for Move2archive, to archive them in a newly created folder. Figure 1 shows which tool generated the file name and path.
For example, to view vacation photos with friends, I use the S shortcut in the image viewer to call a wrapper script for filetags --filter
. Here the sel
tag is my default choice for opening photos tagged sel
in a new image viewer window.
When preparing presentations, I like to use TagTrees with the matching shortcut, Shift+T. The tag I mentioned earlier on, cliparts
, creates an initial selection. I then filter for further tags, for example, for photos matching the combination of security
and surveillance
.
Conclusions
Most of the advantages of the approach presented in this article only become apparent following extended use with a larger pool of appropriately named files. The limitation to a controlled vocabulary prevents gradual proliferation and ensures that the process of choosing tags is conscious and cautious.
The best part of the presented method is that the tools discussed here support a wide variety of requirements in a flexible way. This avoids the situation mentioned at the beginning, in which files can no longer be found. The keywords make it irrelevant where exactly you store a file. And this in turn helps the computer come a little closer to the way you think as a human being.
Infos
- Desktop metaphor: https://Karl-Voit.at/2018/08/25/deskop-metaphor/
- Tagstore project: https://Karl-Voit.at/tagstore/
- ISO 8601: https://en.wikipedia.org/wiki/ISO_8601
- Digitalization project: https://Karl-Voit.at/2015/04/05/digitizing-paper/
- Evolutionary Steps of Computer Systems: https://karl-voit.at/2017/02/10/evolution-of-systems
- Tool demos: https://karl-voit.at/demo-filetags-intro/
- Date2name: https://github.com/novoid/date2name
- Appendfilename: https://github.com/novoid/appendfilename
- Filetags: https://github.com/novoid/filetags
- Guessfilename: https://github.com/novoid/guess-filename.py
- Move2archive: https://github.com/novoid/move2archive
- Integratethis: https://github.com/novoid/integratethis
- The author's blog: https://Karl-Voit.at
« Previous 1 2 3
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Canonical Bumps LTS Support to 12 years
If you're worried that your Ubuntu LTS release won't be supported long enough to last, Canonical has a surprise for you in the form of 12 years of security coverage.
-
Fedora 40 Beta Released Soon
With the official release of Fedora 40 coming in April, it's almost time to download the beta and see what's new.
-
New Pentesting Distribution to Compete with Kali Linux
SnoopGod is now available for your testing needs
-
Juno Computers Launches Another Linux Laptop
If you're looking for a powerhouse laptop that runs Ubuntu, the Juno Computers Neptune 17 v6 should be on your radar.
-
ZorinOS 17.1 Released, Includes Improved Windows App Support
If you need or desire to run Windows applications on Linux, there's one distribution intent on making that easier for you and its new release further improves that feature.
-
Linux Market Share Surpasses 4% for the First Time
Look out Windows and macOS, Linux is on the rise and has even topped ChromeOS to become the fourth most widely used OS around the globe.
-
KDE’s Plasma 6 Officially Available
KDE’s Plasma 6.0 "Megarelease" has happened, and it's brimming with new features, polish, and performance.
-
Latest Version of Tails Unleashed
Tails 6.0 is based on Debian 12 and includes GNOME 43.
-
KDE Announces New Slimbook V with Plenty of Power and KDE’s Plasma 6
If you're a fan of KDE Plasma, you'll be thrilled to hear they've announced a new Slimbook with an AMD CPU and the latest version of KDE Plasma desktop.
-
Monthly Sponsorship Includes Early Access to elementary OS 8
If you want to get a glimpse of what's in the pipeline for elementary OS 8, just set up a monthly sponsorship to help fund its continued existence.