Skip to content(if available)orjump to list(if available)

TMSU: Command-line tool for applying tags and viewing virtual tagged filesystem

buildbot

Something like this just for photos has been in the back of my mind forever - it would be really nice to have a virtual folder built from images where the exif data says you used X camera or took the photos on X date. This would be useful for editing applications that are not catalog based, just point them at the virtual folder and query the images you want to edit, and there they are.

Edit - Someone mentioned befs but deleted their comment, it seems like it might sorta be supported in modern linux, possibly just read only though:

https://github.com/torvalds/linux/tree/master/fs/befs

IncreasePosts

I'm sure one could whip together a FUSE filesystem like this very quickly. Here's something similar from 12 years ago: http://pisarenko.net/blog/2013/06/02/introducing-photofs-fus...

buildbot

For sure, just need the time and motivation :)

walterbell

Apple/Android devices could assist with offline image analysis and metadata generation, https://github.com/mazzzystar/Queryable

teach

I messed with TMSU back one of the previous times it was posted. It's very cool and works well but I just couldn't make myself go retroactively apply tags to terabytes of existing files.

It almost feels like a personal categorization version of the "AI Bitter Lesson": people keep thinking that doing a bunch of manual taxonomy work is going to help them find files faster but eventually search catches up

bityard

My version of that is, "metadata curation is a fun hobby but search is king."

walterbell

Search and LLMs can make good use of accurately labelled data.

sunrunner

> retroactively apply tags to terabytes of existing files

This has always felt like one of the primary issues with tag-based lookup over hierarchical. By the time you're knee deep with enough stuff that you realise tags would help, you've already accumulated too much to practically deal with.

That and figuring out what the tags should be upfront and hoping you don't realise you need additional or different tags later on.

walterbell

CLI tools (find, grep, locate, tmsu) enable bulk changes to tags.

null

[deleted]

steffres

I do this manually by appending `__t_tag`, where `t` is a category and `tag` the value.

E.g. `__o_car`, where `o` means object, or `__p_supercode`, where `p` = project, `__t_ml`, where `t` = topic, ml = machine learning, etc.

No dependencies, hardcoded into the files forever, and search is reasonably fast too (don't need it that often anyway).

bityard

I'll admit when I first saw this, I was put off by the idea of having a separate tool to do something that _should_ be baked into the filesystem. But honestly, this a pretty close to a very Unixy way of solving the problem. Have a separate (and importantly: optional) tool that does the job and does it well.

Additionally, Linux _does_ support tagging files right in the filesystem via the user.xdg.tags xattr. Although it looks like Dolphin is one of the few userspace tools that knows about it.

somat

I still maintain that all it would take to add tags to the unix filesystem is to start calling "files" "tags"

then use ln to add tags.

dddw

Makes me think of tagspaces https://www.tagspaces.org/

dotancohen

Wouldn't really help for the use cases that I can think up.

  $ ls -l # How grep for files with tag "foo"?

  $ find . -tag foo

Imustaskforhelp

Yoo this is such a great idea , I once saw a video of a youtuber creating open source tag software and I don't know , I realized a frustration and I was also needing something like this once and I was installing this tag cli tool

but this seems even better, this is why I am on hackernews

null

[deleted]

lemonwaterlime

See also:

- "Designing better file organization around tags not hierarchies" [1]

- `tag` - a macOS version of `tmsu` that uses the system tags (xattr-based if I recall) [2]

[1] https://www.nayuki.io/page/designing-better-file-organizatio...

[2] https://github.com/jdberry/tag

NotPractical

xattrs are great, and would the obvious solution for tags/metadata on Linux too, if the syscall API didn't delete them at every opportunity; programs must be explicitly told not to do that.

https://wiki.archlinux.org/title/Extended_attributes

That being said, it'd be cool to see a port of that CLI to Linux using user.xdg.tags. You can avoid deleting them if you're careful.

ecmm

I also inadvertently implemented something similar as a zsh script [1] and as a simple rust CLI [2] a couple years ago.

[1] https://github.com/xdoardo/zshelf

[2] https://github.com/xdoardo/shelf

thebeardisred

I was wondering why this wasn't using xattrs.

Imustaskforhelp

yea when I was looking for linux version I was finding tag again and again lol

eviks

Nice idea, all these type of databases should indeed support both hierarchies and tags for any decent organization, but no gui and no update tracking - unfortunately, that's way too limiting

exe34

I really wanted this to exist about 15 years ago, but at the time didn't have the skills to make it happen. Nowadays though I'd want something that can sync across between Linux and Android at the very least. But I've gotten to comfortable with find and grep to bother.