oniony / TMSU

TMSU lets you tags your files and then access them through a nifty virtual filesystem from any other application.
Other
2.02k stars 118 forks source link

Undocumented unsupported tag naming pattern #196

Open nylocx opened 4 years ago

nylocx commented 4 years ago

Hi, first I have to thank you for providing such a nice tool and I really like the idea of having a filesystem managed by tags.

A word to my motivation that led me to TMSU. I have a largish image collection that is currently in a state where it takes me ages to find what I want and I want to change it. I know that I can use a combination of user space tools like digikam, lightroom and darktable depending on the OS, but I really would like to have the convenience to be able to use some standard cli tools to expose the collection. So I'm currently building some scripts to use AI to tag my images (faces and content) and and I converted all the nested directory structure to simple tags. I also wrote a script to transfer those XMP/IPTC tags to tmsu (Currently using subprocesses as I had no time building a compatible python API to directly write to the DB or a wrapper for some (existing?) Go APIs).

Now to the "bug" I have encountered. I have some directories originally named like "Event 01.01.1970". The tagging works fine and the tmsu files "Event\ 01.01.1970" command shows the right files, but if I mount the VFS the tag is a link to a single image instead of a directory. After some testing I figured out that if the tag ends with a \.\d+$ (i.e. "test.123") pattern the VFS uses this as a lookup ID in the DB and links only one file.

For now I will just fix my tags, but this should be fixed or documented in the wiki section about patterns that are not allowed in tags.

If you need more information to reproduce please let me know.

Alex

oniony commented 4 years ago

I've reproduced this. You're right that it's identifying the link as being a file link due to the presence of the number. This is a hangup from before the file links lived in the dedicated files directories, so should be possible to fix. I'll have to have a look for the next release.