lun-4 / awtfdb

the Anime Woman's Tagged File Data Base.
MIT License
38 stars 2 forks source link

tag parenting #23

Closed lun-4 closed 2 years ago

lun-4 commented 2 years ago

details about how it works here: https://hydrusnetwork.github.io/hydrus/advanced_parents.html

started tagging a lot of things and found the pain tag parenting would save me from

proposed ui:

$ atags parent create child_tag parent_tag
[.. verify consistency of tag tree (no loops) ..]
[.. iterate over each file and compare it against the tree, if they get child_tag, add parent_tag ..]

$ atags parent list
child_tag -> parent_tag
child_tag -> parent_tag
child_tag -> parent_tag

$ atags parent remove child_tag parent_tag
[.. verify consistency of tag tree (no loops) ..]
[.. iterate over each file and compare it against the tree, if they get child_tag, REMOVE parent_tag ..]

$ atags parent remove --preserve-files child_tag parent_tag
[.. verify consistency of tag tree (no loops) ..]
[.. dont iterate over any file ..]

last one is useful if, for example, artist:dj_kuroneko is a child of breakcore but they stopped doing just that, you might want to maintain all the existing files' relationships as they are breakcore, but new ones shouldn't.

lun-4 commented 2 years ago

at the moment tag parenting has its own CLI and database working, i have around 168 parent relationships already.

not closing the issue yet because the parent deletion question is still open due to #29.