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.

Figure 1: The parts of the path or the file name created by each specific tool are highlighted in red.

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.

The Author

Karl Voit focuses on Personal Information Management in his free time and offers keynotes, workshops, and courses on the topic. Privacy, security, free software, and decentralization are also important to him. In his blog (https://Karl-Voit.at) [13] he regularly writes about managing digital information.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

comments powered by Disqus
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.

Learn More

News