oniony / TMSU

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

Support hierarchical tags #285

Open jthulhu opened 1 month ago

jthulhu commented 1 month ago

I think it would be convenient to have hierarchical tags, ie. tags that would be organized themselves as a hierarchy rather than just being a set of tags. A hierarchical naming can already be used without being builtin (ie. one can name tags A, A::B, A::C, ...). However, I usually view subtags as implying their parent, ie a file which is tagged A::B should also be tagged A ("every A::B is also a A"). This can also be achieved with implications without further support, but this means manually writing every imply.

It would be neat if, instead, such implies would be implicit, ie whenever I create a tag A::B, this ensures that the tag A exists, and creates the implication A::B -> A.

Also, it would be neat if the displaying of tags could take advantage of this hierarchy, ie showing maybe something like

$ tmsu tags
...
A
  -> B
...

rather than

$ tmsu tags
...
A
A::B

and by not showing implicitly implied tags, ie tmsu tags afile tagged with A::B would only show A::B, and not A, because it is clear that such a file is also tagged with A.

Ideally, such a feature should be optout-able, to avoid breaking the workflow of people that do not desire organizing their tags hierarchically.