diff --git a/docs/configuration.rst b/docs/configuration.rst index 217aeab5..d6ff67ce 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -368,13 +368,19 @@ extractor.*.archive =========== ===== Type |Path|_ Default ``null`` +Example ``"$HOME/.archives/{category}.sqlite3"`` Description File to store IDs of downloaded files in. Downloads of files - already recorded in this archive file will be skipped_. + already recorded in this archive file will be + `skipped `__. The resulting archive file is not a plain text file but an SQLite3 database, as either lookup operations are significantly faster or memory requirements are significantly lower when the amount of stored IDs gets reasonably large. + + Note: archive paths support regular `format string`_ replacements, + but be aware that using external inputs for building local paths + may pose a security risk. =========== ===== @@ -2265,7 +2271,6 @@ Description An object with the ``name`` of a post-processor and its options. .. |strptime| replace:: strftime() and strptime() Behavior .. _base-directory: `extractor.*.base-directory`_ -.. _skipped: `extractor.*.skip`_ .. _date-format: `extractor.*.date-format`_ .. _deviantart.metadata: extractor.deviantart.metadata_ diff --git a/gallery_dl/job.py b/gallery_dl/job.py index 676153e4..84ff160c 100644 --- a/gallery_dl/job.py +++ b/gallery_dl/job.py @@ -397,6 +397,8 @@ class DownloadJob(Job): if archive: path = util.expand_path(archive) try: + if "{" in path: + path = util.Formatter(path).format_map(kwdict) self.archive = util.DownloadArchive(path, self.extractor) except Exception as exc: self.extractor.log.warning(