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
-
Gnome Fans Everywhere Rejoice for the Latest Release
Gnome 47.2 is now available for general use but don't expect much in the way of newness, as this is all about improvements and bug fixes.
-
Latest Cinnamon Desktop Releases with a Bold New Look
Just in time for the holidays, the developer of the Cinnamon desktop has shipped a new release to help spice up your eggnog with new features and a new look.
-
Armbian 24.11 Released with Expanded Hardware Support
If you've been waiting for Armbian to support OrangePi 5 Max and Radxa ROCK 5B+, the wait is over.
-
SUSE Renames Several Products for Better Name Recognition
SUSE has been a very powerful player in the European market, but it knows it must branch out to gain serious traction. Will a name change do the trick?
-
ESET Discovers New Linux Malware
WolfsBane is an all-in-one malware that has hit the Linux operating system and includes a dropper, a launcher, and a backdoor.
-
New Linux Kernel Patch Allows Forcing a CPU Mitigation
Even when CPU mitigations can consume precious CPU cycles, it might not be a bad idea to allow users to enable them, even if your machine isn't vulnerable.
-
Red Hat Enterprise Linux 9.5 Released
Notify your friends, loved ones, and colleagues that the latest version of RHEL is available with plenty of enhancements.
-
Linux Sees Massive Performance Increase from a Single Line of Code
With one line of code, Intel was able to increase the performance of the Linux kernel by 4,000 percent.
-
Fedora KDE Approved as an Official Spin
If you prefer the Plasma desktop environment and the Fedora distribution, you're in luck because there's now an official spin that is listed on the same level as the Fedora Workstation edition.
-
New Steam Client Ups the Ante for Linux
The latest release from Steam has some pretty cool tricks up its sleeve.