mikf / gallery-dl

Command-line program to download image galleries and collections from several image hosting sites
GNU General Public License v2.0
11.51k stars 943 forks source link

Changing filenames when downloading #2071

Closed Qliphort8 closed 2 years ago

Qliphort8 commented 2 years ago

Hello,

When i download images is it possible to download them in a way so that they are sorted after the date for example? When I downlaod images sometimes the name of them makes them unsorted.

(I think this is this is very easily possible but i cannot for the love of god find out or how I really tried sorry^^)

Hrxn commented 2 years ago

It depends on the metadata provided by the site... Which site is it?

Qliphort8 commented 2 years ago

it is from kemono party, thank you

Hrxn commented 2 years ago

Yes, they apparently have a date provided by the site.

So, in your config file, simply set the option for filename in the Kemono extractor from the default to something like this:

"kemonoparty":
{
    "filename": "{date:%Y-%m-%d}_{id}_{title}_{num:>02}_{filename}.{extension}"
}

Note: You can change the formatting options in {date:%Y-%m-%d} to whatever you like.

Qliphort8 commented 2 years ago

thats exactly what i needed, thank you very much!!