mirror of
https://github.com/mikf/gallery-dl.git
synced 2025-02-01 12:01:41 +01:00
update docs/configuration.rst
- document metadata.indent - add concrete mappings to object types - fix lists for code examples - fix typos
This commit is contained in:
parent
3c03928d75
commit
b125fcafc5
@ -59,13 +59,13 @@ extractor.*.filename
|
||||
--------------------
|
||||
Type
|
||||
* ``string``
|
||||
* ``object``
|
||||
* ``object`` (`condition` -> `format string`_)
|
||||
Example
|
||||
* .. code:: json
|
||||
.. code:: json
|
||||
|
||||
"{manga}_c{chapter}_{page:>03}.{extension}"
|
||||
|
||||
* .. code:: json
|
||||
.. code:: json
|
||||
|
||||
{
|
||||
"extension == 'mp4'": "{id}_video.{extension}",
|
||||
@ -117,13 +117,13 @@ extractor.*.directory
|
||||
---------------------
|
||||
Type
|
||||
* ``list`` of ``strings``
|
||||
* ``object``
|
||||
* ``object`` (`condition` -> `format strings`_)
|
||||
Example
|
||||
* .. code:: json
|
||||
.. code:: json
|
||||
|
||||
["{category}", "{manga}", "c{chapter} - {title}"]
|
||||
|
||||
* .. code:: json
|
||||
.. code:: json
|
||||
|
||||
{
|
||||
"'nature' in content": ["Nature Pictures"],
|
||||
@ -201,7 +201,7 @@ extractor.*.path-restrict
|
||||
-------------------------
|
||||
Type
|
||||
* ``string``
|
||||
* ``object``
|
||||
* ``object`` (`character` -> `replacement character(s)`)
|
||||
Default
|
||||
``"auto"``
|
||||
Example
|
||||
@ -281,7 +281,7 @@ Description
|
||||
extractor.*.extension-map
|
||||
-------------------------
|
||||
Type
|
||||
``object``
|
||||
``object`` (`extension` -> `replacement`)
|
||||
Default
|
||||
.. code:: json
|
||||
|
||||
@ -416,7 +416,7 @@ extractor.*.cookies
|
||||
-------------------
|
||||
Type
|
||||
* |Path|_
|
||||
* ``object``
|
||||
* ``object`` (`name` -> `value`)
|
||||
* ``list``
|
||||
Description
|
||||
Source to read additional cookies from. This can be
|
||||
@ -467,7 +467,7 @@ extractor.*.proxy
|
||||
-----------------
|
||||
Type
|
||||
* ``string``
|
||||
* ``object``
|
||||
* ``object`` (`scheme` -> `proxy`)
|
||||
Default
|
||||
``null``
|
||||
Description
|
||||
@ -550,11 +550,11 @@ Description
|
||||
extractor.*.keywords
|
||||
--------------------
|
||||
Type
|
||||
``object``
|
||||
``object`` (`name` -> `value`)
|
||||
Example
|
||||
``{"type": "Pixel Art", "type_id": 123}``
|
||||
Description
|
||||
Additional key-value pairs to be added to each metadata dictionary.
|
||||
Additional name-value pairs to be added to each metadata dictionary.
|
||||
|
||||
|
||||
extractor.*.keywords-default
|
||||
@ -1814,7 +1814,7 @@ Description
|
||||
extractor.mangadex.api-parameters
|
||||
---------------------------------
|
||||
Type
|
||||
``object``
|
||||
``object`` (`name` -> `value`)
|
||||
Example
|
||||
``{"order[updatedAt]": "desc"}``
|
||||
Description
|
||||
@ -2105,7 +2105,7 @@ Type
|
||||
Default
|
||||
``"auto"``
|
||||
Description
|
||||
Specifies the domain used by ``pinterest`` extractots.
|
||||
Specifies the domain used by ``pinterest`` extractors.
|
||||
|
||||
Setting this option to ``"auto"``
|
||||
uses the same domain as a given input URL.
|
||||
@ -3113,7 +3113,7 @@ Description
|
||||
extractor.ytdl.raw-options
|
||||
--------------------------
|
||||
Type
|
||||
``object``
|
||||
``object`` (`name` -> `value`)
|
||||
Example
|
||||
.. code:: json
|
||||
|
||||
@ -3349,13 +3349,14 @@ downloader.*.proxy
|
||||
------------------
|
||||
Type
|
||||
* ``string``
|
||||
* ``object``
|
||||
* ``object`` (`scheme` -> `proxy`)
|
||||
Default
|
||||
`extractor.*.proxy`_
|
||||
Description
|
||||
Proxy server used for file downloads.
|
||||
|
||||
Disable the use of a proxy by explicitly setting this option to ``null``.
|
||||
Disable the use of a proxy for file downloads
|
||||
by explicitly setting this option to ``null``.
|
||||
|
||||
|
||||
downloader.http.adjust-extensions
|
||||
@ -3393,7 +3394,7 @@ Description
|
||||
downloader.http.headers
|
||||
-----------------------
|
||||
Type
|
||||
``object``
|
||||
``object`` (`name` -> `value`)
|
||||
Example
|
||||
``{"Accept": "image/webp,*/*", "Referer": "https://example.org/"}``
|
||||
Description
|
||||
@ -3490,7 +3491,7 @@ Description
|
||||
downloader.ytdl.raw-options
|
||||
---------------------------
|
||||
Type
|
||||
``object``
|
||||
``object`` (`name` -> `value`)
|
||||
Example
|
||||
.. code:: json
|
||||
|
||||
@ -3538,7 +3539,7 @@ output.mode
|
||||
-----------
|
||||
Type
|
||||
* ``string``
|
||||
* ``object``
|
||||
* ``object`` (`key` -> `format string`)
|
||||
Default
|
||||
``"auto"``
|
||||
Description
|
||||
@ -3607,7 +3608,7 @@ Description
|
||||
output.colors
|
||||
-------------
|
||||
Type
|
||||
``object``
|
||||
``object`` (`key` -> `ANSI color`)
|
||||
Default
|
||||
``{"success": "1;32", "skip": "2"}``
|
||||
Description
|
||||
@ -3750,7 +3751,7 @@ and `event <exec.event_>`__ field:
|
||||
classify.mapping
|
||||
----------------
|
||||
Type
|
||||
``object``
|
||||
``object`` (`directory` -> `extensions`)
|
||||
Default
|
||||
.. code:: json
|
||||
|
||||
@ -3869,8 +3870,7 @@ Default
|
||||
Description
|
||||
Selects how to process metadata.
|
||||
|
||||
* ``"json"``: write metadata using `json.dump()
|
||||
<https://docs.python.org/3/library/json.html#json.dump>`__
|
||||
* ``"json"``: write metadata using |json.dump()|_
|
||||
* ``"jsonl"``: write metadata in `JSON Lines
|
||||
<https://jsonlines.org/>`__ format
|
||||
* ``"tags"``: write ``tags`` separated by newlines
|
||||
@ -3974,11 +3974,11 @@ Type
|
||||
* ``list`` of ``strings``
|
||||
* ``object`` (`field name` -> `format string`_)
|
||||
Example
|
||||
* .. code:: json
|
||||
.. code:: json
|
||||
|
||||
["blocked", "watching", "status[creator][name]"]
|
||||
|
||||
* .. code:: json
|
||||
.. code:: json
|
||||
|
||||
{
|
||||
"blocked" : "***",
|
||||
@ -4008,6 +4008,21 @@ Description
|
||||
Note: Only applies for ``"mode": "custom"``.
|
||||
|
||||
|
||||
metadata.indent
|
||||
---------------
|
||||
Type
|
||||
* ``integer``
|
||||
* ``string``
|
||||
Default
|
||||
``4``
|
||||
Description
|
||||
Indentation level of JSON output.
|
||||
|
||||
See the ``indent`` argument of |json.dump()|_ for further details.
|
||||
|
||||
Note: Only applies for ``"mode": "json"``.
|
||||
|
||||
|
||||
metadata.open
|
||||
-------------
|
||||
Type
|
||||
@ -4021,18 +4036,7 @@ Description
|
||||
use ``"a"`` to append to a file's content
|
||||
or ``"w"`` to truncate it.
|
||||
|
||||
See the ``mode`` parameter of |open()|_ for further details.
|
||||
|
||||
|
||||
metadata.private
|
||||
----------------
|
||||
Type
|
||||
``bool``
|
||||
Default
|
||||
``false``
|
||||
Description
|
||||
Include private fields,
|
||||
i.e. fields whose name starts with an underscore.
|
||||
See the ``mode`` argument of |open()|_ for further details.
|
||||
|
||||
|
||||
metadata.encoding
|
||||
@ -4044,7 +4048,18 @@ Defsult
|
||||
Description
|
||||
Name of the encoding used to encode a file's content.
|
||||
|
||||
See the ``encoding`` parameter of |open()|_ for further details.
|
||||
See the ``encoding`` argument of |open()|_ for further details.
|
||||
|
||||
|
||||
metadata.private
|
||||
----------------
|
||||
Type
|
||||
``bool``
|
||||
Default
|
||||
``false``
|
||||
Description
|
||||
Include private fields,
|
||||
i.e. fields whose name starts with an underscore.
|
||||
|
||||
|
||||
metadata.archive
|
||||
@ -4546,7 +4561,7 @@ Description
|
||||
|
||||
* If given as a single ``float``, it will be used as that exact value.
|
||||
* If given as a ``list`` with 2 floating-point numbers ``a`` & ``b`` ,
|
||||
it will be randomly chosen with uniform distribution such that ``a <= N <=b``.
|
||||
it will be randomly chosen with uniform distribution such that ``a <= N <= b``.
|
||||
(see `random.uniform() <https://docs.python.org/3/library/random.html#random.uniform>`_)
|
||||
* If given as a ``string``, it can either represent a single ``float``
|
||||
value (``"2.85"``) or a range (``"1.5-3.0"``).
|
||||
@ -4711,6 +4726,7 @@ Description
|
||||
.. |postprocessors| replace:: ``postprocessors``
|
||||
.. |mode: color| replace:: ``"mode": "color"``
|
||||
.. |open()| replace:: the built-in ``open()`` function
|
||||
.. |json.dump()| replace:: ``json.dump()``
|
||||
|
||||
.. _base-directory: `extractor.*.base-directory`_
|
||||
.. _date-format: `extractor.*.date-format`_
|
||||
@ -4725,6 +4741,7 @@ Description
|
||||
.. _strptime: https://docs.python.org/3/library/datetime.html#strftime-strptime-behavior
|
||||
.. _webbrowser.open(): https://docs.python.org/3/library/webbrowser.html
|
||||
.. _open(): https://docs.python.org/3/library/functions.html#open
|
||||
.. _json.dump(): https://docs.python.org/3/library/json.html#json.dump
|
||||
.. _mature_content: https://www.deviantart.com/developers/http/v1/20160316/object/deviation
|
||||
.. _Authentication: https://github.com/mikf/gallery-dl#authentication
|
||||
.. _OAuth: https://github.com/mikf/gallery-dl#oauth
|
||||
|
Loading…
x
Reference in New Issue
Block a user