gallery-dl
gallery-dl copied to clipboard
More settings for saving files.
I would like for example the ability to save tags of artists or copyright, in particular this applies to booru sites (+sankaku). Such a thing is implemented in the Grabber, but it does not like sankaku =(
You can use a metadata
post processor to write all metadata associated with a file, including tags, to a separate file. The easiest way of accomplishing that is simply using --write-metadata
.
For booru sites and sankaku, you can also enable the tags
option to have them categorized by artist, copyright, etc. (-o tags=true
)
You can use a
metadata
post processor to write all metadata associated with a file, including tags, to a separate file. The easiest way of accomplishing that is simply using--write-metadata
.For booru sites and sankaku, you can also enable the
tags
option to have them categorized by artist, copyright, etc. (-o tags=true
)
Thanks? It's works! =)
In order not to multiply the topics, I would like to ask. How can I make tag_character empty select another name, for example misc. I tried to do it with alternative "|", but faced with a problem that the square brackets are reserved as indexing or slices, but to make a list of them can not (to substitute for :J=/) and eventually gives an error.
Maybe I'm not thinking correctly, but I just want to if there are tags, then substituted them in a certain folder, and if not - in the general folder misc.
My config.
"tags": true,
"filename": "{tags_character|['misc']:J+/}_{md5}.{extension}",
You can use a
metadata
post processor to write all metadata associated with a file, including tags, to a separate file. The easiest way of accomplishing that is simply using--write-metadata
. For booru sites and sankaku, you can also enable thetags
option to have them categorized by artist, copyright, etc. (-o tags=true
)Thanks? It's works! =)
Although you removed the command from that post, I need to mention regardless: you must quote the param[eter]s (specifically the ones with wave brackets, but all the better if everything else too) to avoid the command shell mangling them (and ensure Python and gdl receives them), with either single quotes (Linux and the like, and PowerShell) or double quotes (everything, especially Command Prompt on Window$).
I just want to if there are tags, then substituted them in a certain folder, and if not - in the general folder misc.
You should use conditional format strings for that.
Literals (['misc']
) only allow for strings, and those interact in a rather counterintuitive way with J
"filename": {
"locals().get('tags_character')": "{tags_character:J+/}_{md5}.{extension}",
"" : "misc_{md5}.{extension}"
},
(the same is also possible for directory
settings)