summaryrefslogtreecommitdiffstats
path: root/gallery_dl/formatter.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2023-01-11 04:09:13 -0500
committerLibravatarUnit 193 <unit193@unit193.net>2023-01-11 04:09:13 -0500
commitfe385c3ff784ba3d19454a35446502c0ec295893 (patch)
tree897982793ef2a0c0f349044bf4cf803ccd483e6e /gallery_dl/formatter.py
parentebdfcd3cd3f76534a590ba08933ff7ea54813316 (diff)
New upstream version 1.24.3.upstream/1.24.3
Diffstat (limited to 'gallery_dl/formatter.py')
-rw-r--r--gallery_dl/formatter.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/gallery_dl/formatter.py b/gallery_dl/formatter.py
index 8a45330..58bf48d 100644
--- a/gallery_dl/formatter.py
+++ b/gallery_dl/formatter.py
@@ -60,14 +60,21 @@ class StringFormatter():
- "u": calls str.upper
- "c": calls str.capitalize
- "C": calls string.capwords
- - "j". calls json.dumps
+ - "g": calls text.slugify()
+ - "j": calls json.dumps
- "t": calls str.strip
+ - "T": calls util.datetime_to_timestamp_string()
- "d": calls text.parse_timestamp
- - "U": calls urllib.parse.unescape
+ - "s": calls str()
- "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"
+ # 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:
- "?<before>/<after>/":
Adds <before> and <after> to the actual value if it evaluates to True.