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
Direct Download
Read full article as PDF:
Price $2.95
News
-
Titan Linux is a New KDE Linux Based on Debian Stable
Titan Linux is a new Debian-based Linux distribution that features the KDE Plasma desktop with a focus on usability and performance.
-
Danielle Foré Has an Update for elementary OS 7
Now that Ubuntu 22.04 has been released, the team behind elementary OS is preparing for the upcoming 7.0 release.
-
Linux New Media Launches Open Source JobHub
New job website focuses on connecting technical and non-technical professionals with organizations in open source.
-
Ubuntu Cinnamon 22.04 Now Available
Ubuntu Cinnamon 22.04 has been released with all the additions from upstream as well as other features and improvements.
-
Pop!_OS 22.04 Has Officially Been Released
From the makers of some of the finest Linux-powered desktop and laptop computers on the market comes the latest version of their Ubuntu-based distribution, Pop!_OS 22.04.
-
Star Labs Unveils a New Small Format Linux PC
The Byte Mk I is an AMD-powered mini Linux PC with Coreboot support and plenty of power.
-
MX Linux Verison 21.1 “Wildflower” Now Available
The latest release of the systemd-less MX Linux is now ready for public consumption.
-
Microsoft Expands Their Windows Subsystem for Linux Offerings With AlmaLinux
Anyone who works with Windows Subsystem for Linux (WSL) will now find a new addition to the available distributions, one that’s become the front-runner replacement for CentOS.
-
Debian 11.3 Released wIth Numerous Bug and Security Fixes
The latest point release for Debian Bullseye is now available with some very important updates.
-
The First Alpha of Asahi Linux is Available
Asahi Linux is the first distribution to fully support Apple Silicon and is now available for testing.