merge #3462: [docs] Update links and fix field typo
This commit is contained in:
@@ -591,11 +591,12 @@ Type
|
|||||||
Default
|
Default
|
||||||
``null``
|
``null``
|
||||||
Description
|
Description
|
||||||
Insert a reference to the current `PathFormat <https://github.com/mikf/gallery-dl/blob/v1.22.4/gallery_dl/path.py#L20>`__
|
Insert a reference to the current
|
||||||
|
`PathFormat <https://github.com/mikf/gallery-dl/blob/v1.24.2/gallery_dl/path.py#L27>`__
|
||||||
data structure into metadata dictionaries as the given name.
|
data structure into metadata dictionaries as the given name.
|
||||||
|
|
||||||
For example, setting this option to ``"gdl_path"`` would make it possible
|
For example, setting this option to ``"gdl_path"`` would make it possible
|
||||||
to access the current file's filename as ``"[gdl_path.filename}"``.
|
to access the current file's filename as ``"{gdl_path.filename}"``.
|
||||||
|
|
||||||
|
|
||||||
extractor.*.http-metadata
|
extractor.*.http-metadata
|
||||||
@@ -4648,9 +4649,9 @@ Description
|
|||||||
In addition to the default
|
In addition to the default
|
||||||
`LogRecord attributes <https://docs.python.org/3/library/logging.html#logrecord-attributes>`__,
|
`LogRecord attributes <https://docs.python.org/3/library/logging.html#logrecord-attributes>`__,
|
||||||
it is also possible to access the current
|
it is also possible to access the current
|
||||||
`extractor <https://github.com/mikf/gallery-dl/blob/33fe67b594dbf8fb742464c95e0f6952bb60eb8a/gallery_dl/extractor/common.py#L23>`__,
|
`extractor <https://github.com/mikf/gallery-dl/blob/v1.24.2/gallery_dl/extractor/common.py#L26>`__,
|
||||||
`job <https://github.com/mikf/gallery-dl/blob/33fe67b594dbf8fb742464c95e0f6952bb60eb8a/gallery_dl/job.py#L18>`__,
|
`job <https://github.com/mikf/gallery-dl/blob/v1.24.2/gallery_dl/job.py#L21>`__,
|
||||||
`path <https://github.com/mikf/gallery-dl/blob/33fe67b594dbf8fb742464c95e0f6952bb60eb8a/gallery_dl/util.py#L702>`__,
|
`path <https://github.com/mikf/gallery-dl/blob/v1.24.2/gallery_dl/path.py#L27>`__,
|
||||||
and `keywords` objects and their attributes, for example
|
and `keywords` objects and their attributes, for example
|
||||||
``"{extractor.url}"``, ``"{path.filename}"``, ``"{keywords.title}"``
|
``"{extractor.url}"``, ``"{path.filename}"``, ``"{keywords.title}"``
|
||||||
* Default: ``"[{name}][{levelname}] {message}"``
|
* Default: ``"[{name}][{levelname}] {message}"``
|
||||||
|
|||||||
@@ -60,14 +60,21 @@ class StringFormatter():
|
|||||||
- "u": calls str.upper
|
- "u": calls str.upper
|
||||||
- "c": calls str.capitalize
|
- "c": calls str.capitalize
|
||||||
- "C": calls string.capwords
|
- "C": calls string.capwords
|
||||||
- "j". calls json.dumps
|
- "g": calls text.slugify()
|
||||||
|
- "j": calls json.dumps
|
||||||
- "t": calls str.strip
|
- "t": calls str.strip
|
||||||
|
- "T": calls util.datetime_to_timestamp_string()
|
||||||
- "d": calls text.parse_timestamp
|
- "d": calls text.parse_timestamp
|
||||||
- "U": calls urllib.parse.unescape
|
- "s": calls str()
|
||||||
- "S": calls util.to_string()
|
- "S": calls util.to_string()
|
||||||
- "T": calls util.to_timestamü()
|
- "U": calls urllib.parse.unescape
|
||||||
|
- "r": calls repr()
|
||||||
|
- "a": calls ascii()
|
||||||
- Example: {f!l} -> "example"; {f!u} -> "EXAMPLE"
|
- Example: {f!l} -> "example"; {f!u} -> "EXAMPLE"
|
||||||
|
|
||||||
|
# Go to _CONVERSIONS and _SPECIFIERS below to se all of them, read:
|
||||||
|
# https://github.com/mikf/gallery-dl/blob/master/docs/formatting.md
|
||||||
|
|
||||||
Extra Format Specifiers:
|
Extra Format Specifiers:
|
||||||
- "?<before>/<after>/":
|
- "?<before>/<after>/":
|
||||||
Adds <before> and <after> to the actual value if it evaluates to True.
|
Adds <before> and <after> to the actual value if it evaluates to True.
|
||||||
|
|||||||
Reference in New Issue
Block a user