Live data from Hacker News

TMSU is a tool for tagging your files

tmsu.org

51–60 of 65 posts

Re: TMSU is a tool for tagging your files

#51
I tag directories, not files. Way more sustainable over time, because there is no way I'm going to tag every single file.

Files tend to be better at describing themselves. To take an example from the TMSU docs, why would I ever need to tag an .mp3 file as music? If it's an MP3, and it's under my music directory, it's pretty clear what it is.

Re: TMSU is a tool for tagging your files

#52

Earlier quoted context omitted.

Try Calibre for managing ebooks, it has a built-in tag system.

I really like Calibre, but it's tag system is pretty clunky. I don't think I can even tag multiple books at once.

It's definitely clunky, but you might like to know that you can tag more than one thing at once:

Select more than one book, right click -> Edit metadata -> Edit metadata in bulk

Re: TMSU is a tool for tagging your files

#53
post #9

I remember looking at this a few years ago. My main reason for not using it was the time it would have taken to tag all my files. Basically, if you have so many files that it's worth tagging them, you need to spend a lot of time tagging, and if you have so few that it's reasonable to tag them all, you don't need this system. If you have a manageable number but expect tagging to be useful in the near future, then this…

A lot of files that end up on our machines come from the internet, and, at least on OSX (in most browsers), downloaded files are tagged with origin URLs [0].

It's a small step from there to a companion tool that crawls your filesystem for URLs, and attempts to classify them based on a keyword analysis of the origin.

[0] https://code.google.com/p/understand/wiki/MacOSMetadata

Re: TMSU is a tool for tagging your files

#54
post #51

I tag directories, not files. Way more sustainable over time, because there is no way I'm going to tag every single file. Files tend to be better at describing themselves. To take an example from the TMSU docs, why would I ever need to tag an .mp3 file as music? If it's an MP3, and it's under my music directory, it's pretty clear what it is.

> If it's an MP3, and it's under my music directory, it's pretty clear what it is.

Putting files in a directory is semantically equivalent to applying a tag. But directory structure is no way fundamental to computing, and indeed tagging is more general and flexible solution to organizing files.

Re: TMSU is a tool for tagging your files

#55

Earlier quoted context omitted.

Try Calibre for managing ebooks, it has a built-in tag system.

I really like Calibre, but it's tag system is pretty clunky. I don't think I can even tag multiple books at once.

Not only can you have multiple tags, you can have icons which are conditionally displayed based on tags. Tags are stored in a single metadata file, one directory per ebook, so can be parsed with a script when performing bulk operations.

You can then customize search engine like recoll to display ebook metadata as contextual snippets in full-text search results. Best of both worlds.

Re: TMSU is a tool for tagging your files

#56
post #46
post #42

I've always wanted this for Windows. I wonder how hard it would be to port it. In a business setting, I often see people's desktops cluttered with files. It'd be nice to give them a virtual folder on the desktop where they can drag and drop files into in to it, with tags.

Hi, author here. Windows support is in progress.

I don't know how you plan on doing the VFS stuff on windows but back in the day when I still used windows (XP) I had a shell extension that let you tag a folder or file from the context menu. It would then be linked into a tag directory using either NTFS reparse points (aka junctions?) for directories or hardlinks for files.

Re: TMSU is a tool for tagging your files

#57
The first use case that came to my mind has been the one I've had difficulty with for the longest - marking/unmarking my music files to sync with my Android phone. I've heard Rhythmbox is good for that but what I'm looking for is a window which shows all my music with those that are also on my phone marked somehow (maybe a differently colored icon or something like that). I should be able to right click or use a shortcut to mark/unmark the music and once done, the music on my phone is updated. Files previously present and now unmarked are deleted, files newly marked are copied.

I can see using TMSU for this with following approach:

1. Mount the VFS, to e.g. mount point "mp"

2. Using Nemo Actions (I use Linux Mint), call a script that upon executing on the selected file will do the following:

- toggles the "sync" tag (so all files with "sync" will show-up under "mp/tags/sync")

- If the file already has a "sync" tag, untag it (can it be done by doing an rm on "mp/tags/sync/"?)

- Based on tag being present or not, toggle file icon to visually indicate if the file is marked/unmarked. I don't know how this can be done.

3. Once done, we can run a simple rsync script that syncs "mp/tags/sync/*" to the sdcard on the phone.

Not sure when I will get around to actually implenting this :)

Re: TMSU is a tool for tagging your files

#58
post #40

Earlier quoted context omitted.

This quickly becomes cumbersome when you have dozens or hundreds of tags, and doesn't address tag values.

The other problem is when a file can be in multiple categories: say you're sorting photos into folders based on who is in the photo. alice.jpg goes into alice/, and bob.jpg goes into bob/, but where do you put groupshot.jpg?

Both?

Or a separate category?

Any grouping system would let you do both.

Re: TMSU is a tool for tagging your files

#59
post #37

I haven't tried it yet, but at first glance, a lot of work and thought went into this tool: query parser, SQL, VFS layer, fingerprinting, file move detection ("repair"). The code looks pretty readable and well organised too. Generally speaking, I can't help but feel we're not quite there yet when it comes to meta-data and flexible file system views. We're still coming up with all sorts of cataloguing systems for diff…

> Extended attributes (attr(5), "user_xattr") Reminder: some programs will reset these xattributes upon the file being edited. Back when I was looking for a tagging program for the Mac I read Photoshop was one of those programs. I would not trust putting in the effort to tag a bunch of files in a format so out of my control.

What those programs are likely actually doing is not deliberately resetting the attributes, but saving a file by (1) writing to a new file, and (2) moving the new file over the old file (thus destroying anything about the old file that they aren't aware of in the process.)

Not sure if this helps figure out a way around it.

Post reply on HN