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

Documentation: clarify --simulate vs --no-download #5437

Open Vrihub opened 6 months ago

Vrihub commented 6 months ago

The docs could be improved in explaining the subtle differences between the --simulate and --no-download options, and maybe the related -g and -G.

AFAIK --simulate seems to avoid most writing operations, while --no-download does everything except for downloading files, right?

If you can provide more details about how different features are affected (metadata? archive?....) I will try to update the docs.

mikf commented 6 months ago

--simulate is a really old option that was, more or less, only added because youtube-dl had a similar option (2df1a15fb801bc5e1e050df673b86b66bc77ecce). It writes to archives and potentially caches login sessions, but nothing else.

--no-download was added a bit later (62097284fe7ce70c517af198ccd5de1395ad871e) and, as you assume, does everything except download (extractor.download). It was added primarily to allow running post processors without having to download files.

-g and -G only print download URLs and do nothing else.

Vrihub commented 4 months ago

So: --no-download: doesn't download files (shows file local paths), does everything else --simulate: doesn't download files (shows file names), updates download-archive if used -g|-G: shows file URLs, does nothing else -j: shows json data, does nothing else -E: shows some extractor settings, does nothing else -K: shows available keywords, does nothing else

Ideally, --simulate should not write anything to disk (as in youtube-dl and other programs that have this option), and the use case you mentioned in the commit message (just update the download-archive) can be fulfilled by --no-download; so I'd suggest to fix job.py -> SimulationJob to not write anything to disk (i.e. only show file names).

Or, let's just leave it as is and clarify the documentation: see the attached patch for option.py

option.py.txt