update gallery-dl.conf and add gallery-dl-example.conf

- gallery-dl.conf contains all config options set to their default
  values, with the exception of 'filename', 'directory', and
  'cache.file'

- gallery-dl-example.conf contains a potential real-world configuration
  file and demonstrates some more involved options
pull/81/head
Mike Fährmann 7 years ago
parent 5f37d40a3e
commit 74c8f83056
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

@ -130,11 +130,15 @@ Configuration
============= =============
Configuration files for *gallery-dl* use a JSON-based file format. 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 | | Linux | Windows |
@ -144,7 +148,7 @@ descriptions can be found in configuration.rst_.
|* ``${HOME}/.gallery-dl.conf`` |* ``%USERPROFILE%\gallery-dl.conf`` | |* ``${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\<username>\``) i.e. ``C:\Users\<username>\``)
Values in later configuration files will override previous ones. 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 Some extractors require you to provide valid login-credentials in the form of
a username & password pair. a username & password pair.
This is necessary for ``pixiv``, ``nijie`` and ``seiga`` and optional 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 You can set the necessary information in your configuration file
(cf. gallery-dl.conf_) (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. "tokens", which should be added to your configuration file.
.. _gallery-dl.conf: https://github.com/mikf/gallery-dl/blob/master/docs/gallery-dl.conf .. _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 .. _gallery-dl-example.conf: https://github.com/mikf/gallery-dl/blob/master/docs/gallery-dl-example.conf
.. _Complete List: https://github.com/mikf/gallery-dl/blob/master/docs/supportedsites.rst .. _configuration.rst: https://github.com/mikf/gallery-dl/blob/master/docs/configuration.rst
.. _standalone executable: https://github.com/mikf/gallery-dl/releases/download/v1.3.0/gallery-dl.exe .. _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/ .. _Python: https://www.python.org/downloads/
.. _Requests: https://pypi.python.org/pypi/requests/ .. _Requests: https://pypi.python.org/pypi/requests/
.. _PyPI: https://pypi.python.org/pypi .. _PyPI: https://pypi.python.org/pypi

@ -1,136 +1,111 @@
{ {
"base-directory": "/tmp/", "base-directory": "~/gallery-dl/",
"netrc": false, "netrc": true,
"cache": {
"file": "~/gallery-dl/cache.sqlite3"
},
"downloader": "downloader":
{ {
"part": true, "part-directory": "/tmp/.download/",
"part-directory": null, "rate": "1M",
"http": "retries": 3,
{ "timeout": 8.5
"rate": null,
"retries": 5,
"timeout": 30,
"verify": true
}
}, },
"extractor": "extractor":
{ {
"archive": null, "archive": "~/gallery-dl/archive.sqlite3",
"proxy": null, "proxy": "http://10.10.1.10:3128",
"skip": true,
"sleep": 0,
"pixiv": "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": "bookmark":
{ {
"directory": ["{category}", "my bookmarks"] "directory": ["Pixiv", "My Bookmarks"],
},
"ugoira": true, "username": "foo123",
"username": null, "password": "bar123"
"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"
} }
}, },
"nijie":
{ "exhentai":
"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":
{ {
"refresh-token": null, "cookies":
"comments": 500, {
"morecomments": false, "ipb_member_id": "12345",
"date-min": 0, "ipb_pass_hash": "1234567890abcdef"
"date-max": 253402210800, },
"date-format": "%Y-%m-%dT%H:%M:%S",
"id-min": "0", "proxy":
"id-max": "ZIK0ZJ", {
"recursion": 0 "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": "flickr":
{ {
"access-token": null, "access-token": "1234567890-abcdef",
"access-token-secret": null, "access-token-secret": "1234567890abcdef",
"metadata": false, "size-max": 1920
"size-max": null
}, },
"deviantart":
{ "reddit":
"refresh-token": null,
"flat": true,
"mature": true,
"original": true
},
"gfycat":
{ {
"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": "tumblr":
{ {
"posts": "photo", "posts": "all",
"inline": false, "external": false,
"reblogs": true, "reblogs": false,
"external": false "inline": true,
},
"recursive": "likes":
{ {
"blacklist": ["directlink", "oauth", "recursive", "test"] "posts": "video,photo,link",
}, "external": true,
"oauth": "reblogs": true
{ }
"browser": true
} }
}, },
"output": "output":
{ {
"mode": "auto", "mode": "terminal",
"shorten": true, "logfile": "~/gallery-dl/log.txt"
"progress": true,
"logfile": null,
"unsupportedfile": null
} }
} }

@ -1,5 +1,5 @@
{ {
"base-directory": "/tmp/", "base-directory": "./gallery-dl/",
"netrc": false, "netrc": false,
"downloader": "downloader":
@ -10,70 +10,79 @@
{ {
"rate": null, "rate": null,
"retries": 5, "retries": 5,
"timeout": 30, "timeout": 30.0,
"verify": true "verify": true
} }
}, },
"extractor": "extractor":
{ {
"archive": null, "archive": null,
"cookies": null,
"proxy": null, "proxy": null,
"skip": true, "skip": true,
"sleep": 0, "sleep": 0,
"user-agent": "Mozilla/5.0 (X11; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0",
"pixiv": "deviantart":
{ {
"user": "refresh-token": null,
{ "flat": true,
"directory": ["{category}", "{user[id]}"] "mature": true,
}, "original": true
"bookmark":
{
"directory": ["{category}", "my bookmarks"]
},
"ugoira": true,
"username": null,
"password": null
}, },
"batoto": "exhentai":
{ {
"username": null, "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, "username": null,
"password": null, "password": null,
"cookies": { "wait-min": 2.5,
"igneous": null, "wait-max": 5.0
"s": null, },
"yay": "louder" "imgur":
} {
"mp4": true
}, },
"nijie": "nijie":
{ {
"username": null, "username": null,
"password": null "password": null
}, },
"sankaku": "oauth":
{ {
"wait-min": 2, "browser": true
"wait-max": 4,
"username": null,
"password": null
}, },
"seiga": "pixiv":
{ {
"username": null, "username": null,
"password": null "password": null,
"ugoira": true
}, },
"gelbooru": "recursive":
{ {
"filename": "{category}_{id:>07}_{md5}.{extension}", "blacklist": ["directlink", "oauth", "recursive", "test"]
"api": true
}, },
"reddit": "reddit":
{ {
@ -87,49 +96,32 @@
"id-max": "ZIK0ZJ", "id-max": "ZIK0ZJ",
"recursion": 0 "recursion": 0
}, },
"flickr": "sankaku":
{
"access-token": null,
"access-token-secret": null,
"metadata": false,
"size-max": null
},
"deviantart":
{
"refresh-token": null,
"flat": true,
"mature": true,
"original": true
},
"gfycat":
{ {
"format": "mp4" "username": null,
"password": null,
"wait-min": 2.5,
"wait-max": 5.0
}, },
"imgur": "seiga":
{ {
"mp4": true "username": null,
"password": null
}, },
"tumblr": "tumblr":
{ {
"posts": "photo", "external": false,
"inline": false, "inline": false,
"reblogs": true, "posts": "photo",
"external": false "reblogs": true
},
"recursive":
{
"blacklist": ["directlink", "oauth", "recursive", "test"]
},
"oauth":
{
"browser": true
} }
}, },
"output": "output":
{ {
"mode": "auto", "mode": "auto",
"shorten": true,
"progress": true, "progress": true,
"shorten": true,
"logfile": null, "logfile": null,
"unsupportedfile": null "unsupportedfile": null
} }

Loading…
Cancel
Save