TMSU icon indicating copy to clipboard operation
TMSU copied to clipboard

Scriptable lists

Open DavidFromNL opened this issue 9 years ago • 2 comments

For scripting, having easily availably lists would be very handy. For instance $mountpoint/.alltags to show the same info as tmsu tags And possibly $mountpoint/.alltagsandvalues for a list of all tags with their possible values.

Of course, these lists should be easy to handle from scripts. So no escaping of whitespace, just one value per line.

DavidFromNL avatar Aug 10 '16 11:08 DavidFromNL

I don't necessarily agree with the idea you propose here [1].

On the other hand, the point that tmsu tags output need not escape whitespace in its output seems like a valid one, consider raising it in a separate report.

([1] in particular, .alltagsandvalues seems impossible to implement without escaping, as both tags and values may contain literal ='s)

0ion9 avatar Aug 19 '16 13:08 0ion9

I don't understand the need for .alltags, as surely the contents of this file would be the same as the list of folders in the tags directory, which could be easily enumerated (although some items may have escaping).

As @0ion9 pointed out, the .allTagsAndValues idea would be a bit fiddly due to the necessity to escape the equals sign: it could be worked around by using a different delimiter between the tag and value name (something that's not allowed in the VFS like the slash character). I can see the benefit of this a little more.

oniony avatar Nov 25 '16 19:11 oniony