gallery-dl
gallery-dl copied to clipboard
[NOOB QUESTION] What programming language the config file uses? So I can search tips in the web more easily + How to replace underscores by spaces in filename?
My knowledge in programming is almost 0, so there's a lot of great and simple things possible that I'm not aware, and the documentation doesn't seems to talk about them (because they are of basic knowledge, probably). For example: I don't knew until recently the existence of useful filename modifiers for MangaDex, like !S
({group!S}
prevent creating Group folders with a bad name style, like ['Group'] turning it into Group instead, !u
(makes the text uppercase), {page:>02}
(makes the page number have 2 digits); and modifiers I use for other sites, like {date:%Y-%m-%d}
, and other ones that I don't remenber now.
For now, I was looking for a way to replace underscores by spaces in Danbooru's filename, notably in {tag_string_artist}
.
gallery-dl.conf
is a JSON file.
To modify the representation of values of the keys (which you can list with -K
flag) it uses the follow rules:
https://github.com/mikf/gallery-dl/blob/master/docs/formatting.md
For example, {tag_string_copyright:R_/ /}
.
However, are you really want to destroy some useful information of the tags?
You want to transform this: xiaoyu kuroe_shizuku sono_bisque_doll_wa_koi_wo_suru
(3 tags) to xiaoyu kuroe shizuku sono bisque doll wa koi wo suru
(??? tags).
To modify the representation of values of the keys (which you can list with
-K
flag) it uses the follow rules: https://github.com/mikf/gallery-dl/blob/master/docs/formatting.md
@AlttiRi Oh, thank you very much, man! I can't believe I was missing such useful guide.
However, are you really want to destroy some useful information of the tags?
You want to transform this:
xiaoyu kuroe_shizuku sono_bisque_doll_wa_koi_wo_suru
(3 tags) toxiaoyu kuroe shizuku sono bisque doll wa koi wo suru
(??? tags).
Well, for Boorus I used to use Imgbrd Grabber, which let me just separate multiple tags by commas. Can gallery-dl do it too? If not, seems like underscores will be a must-have...
EDIT: Managed to do it with {tag_string_character:R /, /R_/ /}
How could I replace a "/" (forward slash) character? I need to replace "
".
Assuming it works like most other search and replace features, you just need to add a escape character. so you'd just write \/
Assuming it works like most other search and replace features, you just need to add a escape character. so you'd just write
\/
I tried.
Where and why do you wanna replace a forward slash ?
Oh, sorry, I need to replace <br />
that comes in Pixiv captions.