Closed CloudyChess closed 7 years ago
Why not, but isn't this a duplicate of issue #573 ?
It is in relation to #573 as that requests the ability to have each tag on a separate line. However, this feature request is an enhancement to that idea as this would allow the artist, character and other namespaces a user can set be repeated if there are multiple artists, or characters in a image.
Currently Grabber writes multiple artists/characters/etc as either: (by modifying the settings.ini to have everything be on a separate line) character:anubislivess lexus or (the default) character:anubislivess+lexus
This feature request would have Grabber recognize the multiple characters/artists/etc on separate lines and add the correct namespace. It would then be written as: character:anubislivess character:lexus
If you would like more examples as to how Hydrus formats its tags (and what this request would be adding support for), take a look at the user script: BooruTagParser . If you enable the script and go to almost any booru (though I would suggest e621 due to the custom species namespace they use) and click copy tags, then paste those tags into any decent text editor (such as notepad++ or Sublime Text) you can see how the tag files are formatted and what this request and #573 are working toward.
Additionally, that script may help with the addition of custom tokens/namespaces as it shows code for searching HTML.
In that case, would the in-progress "token options" feature fix this issue?
it would result in format such as:
%all:includenamespace,separator=\n%
With the two options for tags being:
includenamespace
: add the "namespace:" in front of the tagsseparator
: to separate the tagsAnd I checked Booru Tag Parser and it also just checks every possible namespace. I could do this but I'm trying to do (for version 4.8.0) something where you could add your own "namespace" (is that Hydrus terminology?).
From your link on the token options feature it does sound like this would indeed fix this issue. If we could have an option to also exclude namespaces we don't want to see (such as the general namespace) and leave it just as the tags that would cover pretty much all the angles I could see for the feature.
Namespaces are also Hydrus terminology, though there may be a better term for it.
Thank you for investing the time to look into adding this feature to Grabber!
If we could have an option to also exclude namespaces we don't want to see (such as the general namespace) and leave it just as the tags that would cover pretty much all the angles I could see for the feature.
%all% does not contain tags that are already in other places of the format. For example, if your filename is %character% %all%
, %all%
will not contain any character.
So in your case, a format would be:
%all:includenamespace,unsafe,separator=\n%
%general%
Which would result in:
artist:artist1
copyright:copyright1
copyright:copyright2
character:character1
character:character2
tag1 tag2 tag3 test_tag1 test_tag2 test_tag3
You can also of course change the separator of %general% if you want line breaks.
Thank you for investing the time to look into adding this feature to Grabber!
You're welcome. If you have any other suggestions, feel free to ask :smile: And this feature is pretty much added already on the develop branch, I even just added an unit test for that special case above.
Seems like this issue was not fixed.
Testing with e621's id:964758
With filename %all:includenamespace,unsafe,separator=\n%
, we do not get valid input for Hydrus, the \n is not taken into account and underscores are not replaced by spaces.
Using the 5.0.0 final version (that should come out this week-end), the format that should be used is:
rating:%rating%
%all:includenamespace,excludenamespace=general,unsafe,spaces,separator=\n%
Which gives the proper output:
rating:safe
artist:hamifr
character:ahri (lol)
character:d.va (overwatch)
copyright:league of legends
copyright:overwatch
species:animal humanoid
species:canine
species:fox
species:fox humanoid
species:human
species:humanoid
species:mammal
2016
<3
animal tail
armpits
big breasts
blush
breasts
brown eyes
brown hair
clothed
clothes swap
clothing
digital media (artwork)
duo
facial markings
female
hair
headgear
hi res
long hair
looking at viewer
markings
smile
video games
yellow eyes
Would it be possible for Grabber to support an option for writing multiple Artists, Characters, and other user specified namespaces as: character:character1 character:character2 character:character3 etc
in the separate tag file?
Currently a user has the option of using a separator like the + symbol, however this prevents the tags from being properly imported into image managers like Hydrus as it expects each artist or character to be on a separate line.
Thanks in advance!