Bionus / imgbrd-grabber

Very customizable imageboard/booru downloader with powerful filenaming features.
https://www.bionus.org/imgbrd-grabber/
Apache License 2.0
2.58k stars 220 forks source link

Help with conditional filenaming #3288

Open Oleksandrigo opened 2 months ago

Oleksandrigo commented 2 months ago

Good afternoon I want it to substitute a copyrite when there are no artists. My attempt <%artist:underscores%?%artist:underscores%:%copyright:underscores%>\%md5%.%ext% But alas, it writes anonymous. Help

Oleksandrigo commented 2 months ago

After a few tries, I came up with this option, and it seems to work. <!%artist%?%copyright:underscores%:%artist:underscores%>\%md5%.%ext% More update ver <!%artist%?<!%model%?_C_+%copyright:underscores%:_S_+%model:underscores%>:%artist:underscores%>\%md5%.%ext% The only problem is the tag Original

Is there any way to bring a certain list of tags under one, in my case it's Original and Mythology? I'm getting them in Сopyright

Bionus commented 1 month ago

Hello 👋

I want it to substitute a copyrite when there are no artists.

Something like this should work:

<%artist%?%artist:underscores%:%copyright:underscores%>/%md5%.%ext%

You don't need the :underscores things in the conditional, although it's weird it doesn't work because of it. Your version also works, although you don't really need to invert it (using !).

Is there any way to bring a certain list of tags under one, in my case it's Original and Mythology? I'm getting them in Сopyright

Not sure I understand what you mean. If you want to create a custom token, such as %mytoken% that would contain "Original" or "Mythology" (or both) if they're present on the image, you can do that with custom tokens: https://www.bionus.org/imgbrd-grabber/docs/filename.html#custom-tokens

If you just don't want them to show up as copyright, you can use the "ignored tags" feature, that prevents tags from having any special type, and to only show in %all% instead: https://www.bionus.org/imgbrd-grabber/docs/filename.html#ignored-tags