Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Multiple Artist and Character Tags #588

Closed
CloudyChess opened this issue Aug 17, 2016 · 6 comments
Closed

[Feature Request] Multiple Artist and Character Tags #588

CloudyChess opened this issue Aug 17, 2016 · 6 comments
Assignees

Comments

@CloudyChess
Copy link

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!

@Bionus Bionus self-assigned this Aug 18, 2016
@Bionus
Copy link
Owner

Bionus commented Aug 19, 2016

Why not, but isn't this a duplicate of issue #573 ?

@CloudyChess
Copy link
Author

CloudyChess commented Aug 20, 2016

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.

@Bionus
Copy link
Owner

Bionus commented Aug 21, 2016

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 tags
  • separator: to separate the tags

And 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?).

@CloudyChess
Copy link
Author

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!

@Bionus
Copy link
Owner

Bionus commented Aug 24, 2016

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 😄
And this feature is pretty much added already on the develop branch, I even just added an unit test for that special case above.

@Bionus Bionus closed this as completed in f17812f Sep 10, 2016
@Bionus Bionus reopened this Nov 26, 2016
@Bionus
Copy link
Owner

Bionus commented Nov 26, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants