rmcrackan / Libation

Libation: Liberate your Library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implement nested tags with separator & allow referencing tags in Filters & Custom File Naming settings

manalive opened this issue · comments

This solves a whole bunch of use cases

  • "Please add this column", "make this random thing that only I use searchable", etc.
  • "Please let me use this obscure, changing parameter in filepath settings"

My main challenge is that I have to maintain a library of folder formatting options for different kinds of audiobooks with different uses or management workflows.

This involves three functions:

  • Allowing the use of a separator in tags to produce a hierarchy
  • Allowing users to specify a tag prefix in file naming settings
  • Handling the new tag convention in filtering

Here is one example (real) use case that would apply to me:

  • I am setting up the required books for my children's school curriculum.
  • I have multiple children in multiple grades with required book lists from Year 1 to Year 12. Almost all of the books are available on Audible.)
  • I put a tag of "school:Y1" and "subject:History" (assuming ":" as a separator but maybe "|" or something would be better since Filters already use ":")

The "tags" filter should now work like "contains" instead of exact

  • tags:school should return all tags containing school (ex: "school:Y1", "school:Y2" etc.) the same way other string fields work. Currently this only returns items with a tag of "school" (which is actually kind of a bug since it doesn't work the same way as other string fields)
  • tags:"school" should return only items with the "school" tag

Then, in the Custom File Naming section I could use a path like this:

downloads\<if tag:school->SCHOOL\<tag:school>\<tag:subject><-if tag:school>

This assumes a simple two-level hierarchy. Obviously, more use could be gotten out of multiple levels, which would increase the complexity. If that was implemented maybe using a [n] reference with the tag would help, ex: "school[2] to grab the "Geography" in "school:Y5:Geography"