diff --git a/README.rst b/README.rst index b9baeb9b..05fc9911 100644 --- a/README.rst +++ b/README.rst @@ -130,11 +130,15 @@ Configuration ============= Configuration files for *gallery-dl* use a JSON-based file format. -For a (more or less) complete example, see gallery-dl.conf_. -A list of all available configuration options and their -descriptions can be found in configuration.rst_. -*gallery-dl* searches for configuration files in the following paths: +| For a (more or less) complete example with options set to their default values, + see gallery-dl.conf_. +| For a configuration file example with more involved settings and options, + see gallery-dl-example.conf_. +| A list of all available configuration options and their + descriptions can be found in configuration.rst_. + +*gallery-dl* searches for configuration files in the following places: +--------------------------------------------+------------------------------------------+ | Linux | Windows | @@ -144,7 +148,7 @@ descriptions can be found in configuration.rst_. |* ``${HOME}/.gallery-dl.conf`` |* ``%USERPROFILE%\gallery-dl.conf`` | +--------------------------------------------+------------------------------------------+ -(``%USERPROFILE%`` usually refers to the users home directory, +(``%USERPROFILE%`` usually refers to the user's home directory, i.e. ``C:\Users\\``) Values in later configuration files will override previous ones. @@ -159,7 +163,7 @@ Username & Password Some extractors require you to provide valid login-credentials in the form of a username & password pair. This is necessary for ``pixiv``, ``nijie`` and ``seiga`` and optional -(but strongly recommended) for ``exhentai`` and ``sankaku``. +(but strongly recommended) for ``exhentai``, ``sankaku`` and ``idolcomplex``. You can set the necessary information in your configuration file (cf. gallery-dl.conf_) @@ -207,10 +211,11 @@ access to *gallery-dl*. Authorize it and you will he shown one or more "tokens", which should be added to your configuration file. -.. _gallery-dl.conf: https://github.com/mikf/gallery-dl/blob/master/docs/gallery-dl.conf -.. _configuration.rst: https://github.com/mikf/gallery-dl/blob/master/docs/configuration.rst -.. _Complete List: https://github.com/mikf/gallery-dl/blob/master/docs/supportedsites.rst -.. _standalone executable: https://github.com/mikf/gallery-dl/releases/download/v1.3.0/gallery-dl.exe +.. _gallery-dl.conf: https://github.com/mikf/gallery-dl/blob/master/docs/gallery-dl.conf +.. _gallery-dl-example.conf: https://github.com/mikf/gallery-dl/blob/master/docs/gallery-dl-example.conf +.. _configuration.rst: https://github.com/mikf/gallery-dl/blob/master/docs/configuration.rst +.. _Complete List: https://github.com/mikf/gallery-dl/blob/master/docs/supportedsites.rst +.. _standalone executable: https://github.com/mikf/gallery-dl/releases/download/v1.3.0/gallery-dl.exe .. _Python: https://www.python.org/downloads/ .. _Requests: https://pypi.python.org/pypi/requests/ .. _PyPI: https://pypi.python.org/pypi diff --git a/docs/gallery-dl-example.conf b/docs/gallery-dl-example.conf index 6dc586be..ba93cde6 100644 --- a/docs/gallery-dl-example.conf +++ b/docs/gallery-dl-example.conf @@ -1,136 +1,111 @@ { - "base-directory": "/tmp/", - "netrc": false, + "base-directory": "~/gallery-dl/", + "netrc": true, + + "cache": { + "file": "~/gallery-dl/cache.sqlite3" + }, "downloader": { - "part": true, - "part-directory": null, - "http": - { - "rate": null, - "retries": 5, - "timeout": 30, - "verify": true - } + "part-directory": "/tmp/.download/", + "rate": "1M", + "retries": 3, + "timeout": 8.5 }, + "extractor": { - "archive": null, - "proxy": null, - "skip": true, - "sleep": 0, + "archive": "~/gallery-dl/archive.sqlite3", + "proxy": "http://10.10.1.10:3128", "pixiv": { - "user": + "archive": "~/gallery-dl/archive-pixiv.sqlite3", + + "filename": "{id}{num}.{extension}", + "directory": ["Pixiv", "Works", "{user[id]}"], + + "username": "foo", + "password": "bar", + + "favorite": { - "directory": ["{category}", "{user[id]}"] + "directory": ["Pixiv", "Favorites", "{user[id]}"] }, + "bookmark": { - "directory": ["{category}", "my bookmarks"] - }, - "ugoira": true, - "username": null, - "password": null - }, - "batoto": - { - "username": null, - "password": null - }, - "exhentai": - { - "wait-min": 3, - "wait-max": 6, - "original": true, - "username": null, - "password": null, - "cookies": { - "igneous": null, - "s": null, - "yay": "louder" + "directory": ["Pixiv", "My Bookmarks"], + + "username": "foo123", + "password": "bar123" } }, - "nijie": - { - "username": null, - "password": null - }, - "sankaku": - { - "wait-min": 2, - "wait-max": 4, - "username": null, - "password": null - }, - "seiga": - { - "username": null, - "password": null - }, - "gelbooru": - { - "filename": "{category}_{id:>07}_{md5}.{extension}", - "api": true - }, - "reddit": + + "exhentai": { - "refresh-token": null, - "comments": 500, - "morecomments": false, - "date-min": 0, - "date-max": 253402210800, - "date-format": "%Y-%m-%dT%H:%M:%S", - "id-min": "0", - "id-max": "ZIK0ZJ", - "recursion": 0 + "cookies": + { + "ipb_member_id": "12345", + "ipb_pass_hash": "1234567890abcdef" + }, + + "proxy": + { + "http": "http://10.10.1.10:8080", + "https": "https://10.10.1.10:443" + }, + + "filename": "{num:>04}_{name}.{extension}", + "directory": ["{category!c}", "{title}"], + + "wait-min": 1.0, + "wait-max": 5.0 }, + "flickr": { - "access-token": null, - "access-token-secret": null, - "metadata": false, - "size-max": null + "access-token": "1234567890-abcdef", + "access-token-secret": "1234567890abcdef", + "size-max": 1920 }, - "deviantart": - { - "refresh-token": null, - "flat": true, - "mature": true, - "original": true - }, - "gfycat": + + "reddit": { - "format": "mp4" + "morecomments": true, + "date-min": "2017-01", + "date-format": "%Y-%m", + "recursion": 1 }, - "imgur": + + "sankaku": { - "mp4": true + "sleep": 2, + "wait-min": 5.0, + "wait-max": 5.0, + "cookies": "~/gallery-dl/cookies-sankaku.txt" }, + "tumblr": { - "posts": "photo", - "inline": false, - "reblogs": true, - "external": false - }, - "recursive": - { - "blacklist": ["directlink", "oauth", "recursive", "test"] - }, - "oauth": - { - "browser": true + "posts": "all", + "external": false, + "reblogs": false, + "inline": true, + + "likes": + { + "posts": "video,photo,link", + "external": true, + "reblogs": true + } } }, + "output": { - "mode": "auto", - "shorten": true, - "progress": true, - "logfile": null, - "unsupportedfile": null + "mode": "terminal", + "logfile": "~/gallery-dl/log.txt" } } diff --git a/docs/gallery-dl.conf b/docs/gallery-dl.conf index 6dc586be..30fe6a4f 100644 --- a/docs/gallery-dl.conf +++ b/docs/gallery-dl.conf @@ -1,5 +1,5 @@ { - "base-directory": "/tmp/", + "base-directory": "./gallery-dl/", "netrc": false, "downloader": @@ -10,70 +10,79 @@ { "rate": null, "retries": 5, - "timeout": 30, + "timeout": 30.0, "verify": true } }, + "extractor": { "archive": null, + "cookies": null, "proxy": null, "skip": true, "sleep": 0, + "user-agent": "Mozilla/5.0 (X11; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0", - "pixiv": + "deviantart": { - "user": - { - "directory": ["{category}", "{user[id]}"] - }, - "bookmark": - { - "directory": ["{category}", "my bookmarks"] - }, - "ugoira": true, - "username": null, - "password": null + "refresh-token": null, + "flat": true, + "mature": true, + "original": true }, - "batoto": + "exhentai": { "username": null, - "password": null + "password": null, + "original": true, + "wait-min": 3.0, + "wait-max": 6.0 }, - "exhentai": + "flickr": + { + "access-token": null, + "access-token-secret": null, + "metadata": false, + "size-max": null + }, + "gelbooru": + { + "api": true + }, + "gfycat": + { + "format": "mp4" + }, + "idolcomplex": { - "wait-min": 3, - "wait-max": 6, - "original": true, "username": null, "password": null, - "cookies": { - "igneous": null, - "s": null, - "yay": "louder" - } + "wait-min": 2.5, + "wait-max": 5.0 + }, + "imgur": + { + "mp4": true }, "nijie": { "username": null, "password": null }, - "sankaku": + "oauth": { - "wait-min": 2, - "wait-max": 4, - "username": null, - "password": null + "browser": true }, - "seiga": + "pixiv": { "username": null, - "password": null + "password": null, + "ugoira": true }, - "gelbooru": + "recursive": { - "filename": "{category}_{id:>07}_{md5}.{extension}", - "api": true + "blacklist": ["directlink", "oauth", "recursive", "test"] }, "reddit": { @@ -87,49 +96,32 @@ "id-max": "ZIK0ZJ", "recursion": 0 }, - "flickr": - { - "access-token": null, - "access-token-secret": null, - "metadata": false, - "size-max": null - }, - "deviantart": - { - "refresh-token": null, - "flat": true, - "mature": true, - "original": true - }, - "gfycat": + "sankaku": { - "format": "mp4" + "username": null, + "password": null, + "wait-min": 2.5, + "wait-max": 5.0 }, - "imgur": + "seiga": { - "mp4": true + "username": null, + "password": null }, "tumblr": { - "posts": "photo", + "external": false, "inline": false, - "reblogs": true, - "external": false - }, - "recursive": - { - "blacklist": ["directlink", "oauth", "recursive", "test"] - }, - "oauth": - { - "browser": true + "posts": "photo", + "reblogs": true } }, + "output": { "mode": "auto", - "shorten": true, "progress": true, + "shorten": true, "logfile": null, "unsupportedfile": null }