mikf / gallery-dl

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

Help for the configuration of gallery-dl #5245

Closed Yugi93 closed 2 months ago

Yugi93 commented 7 months ago

This program is GREAT ( just not suited for me ). I'm using it to download from Sankaku with the command line: gallery-dl URLs and it really works but... my "wisdom" ends here.

I read that we can create a configuration file ( gallery-dl.conf ) to process the downloads but i'm totally hopeless with command lines, so i don't understand how or what put inside for obtain what I need. If someone can help me to learn how to set the program, I want to:

  1. rename the downloaded file in: [%artist%]%MD5%.extension
  2. save all metadata in a sidecar file (JSON, TXT... doesn't matter ) with the same name of the file
  3. ( optional ) if download a file already in possess, to skip

If you need more info don't hesitate to ask. Thank you in advanced for your help (... and patience).

mikf commented 7 months ago

Run gallery-dl --config-create. This will create a basic configuration file. Open it with a text editor and add a sankaku block inside extractor.

        "sankaku": {
            "tags": true,
            "filename": "{tags_artist[0]|'no_artist'} {md5}.{extension}",
            "postprocessors": ["metadata"]
        }
  1. filename and tags
  2. postprocessors.
  3. Skipping existing files is the default (extractor.skip).
Yugi93 commented 7 months ago

Thanks for the post, I'll try it as soon as possible.