aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2023-04-24 18:31:36 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2023-04-24 18:43:54 +0530
commitec9311c41b111110bc52cfbd6ea682c6fb23f77a (patch)
tree0eeb8220e2c307d6c85afceb02bdbac23dcb2065 /README.md
parent78fde6e3398ff11e5d383a66b28664badeab5180 (diff)
downloadhypervideo-pre-ec9311c41b111110bc52cfbd6ea682c6fb23f77a.tar.lz
hypervideo-pre-ec9311c41b111110bc52cfbd6ea682c6fb23f77a.tar.xz
hypervideo-pre-ec9311c41b111110bc52cfbd6ea682c6fb23f77a.zip
[outtmpl] Support `str.format` syntax inside replacements
Closes #6843
Diffstat (limited to 'README.md')
-rw-r--r--README.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/README.md b/README.md
index 35229f728..efb490ab1 100644
--- a/README.md
+++ b/README.md
@@ -1246,7 +1246,7 @@ The field names themselves (the part inside the parenthesis) can also have some
1. **Alternatives**: Alternate fields can be specified separated with a `,`. E.g. `%(release_date>%Y,upload_date>%Y|Unknown)s`
-1. **Replacement**: A replacement value can be specified using a `&` separator. If the field is *not* empty, this replacement value will be used instead of the actual field content. This is done after alternate fields are considered; thus the replacement is used if *any* of the alternative fields is *not* empty.
+1. **Replacement**: A replacement value can be specified using a `&` separator according to the [`str.format` mini-language](https://docs.python.org/3/library/string.html#format-specification-mini-language). If the field is *not* empty, this replacement value will be used instead of the actual field content. This is done after alternate fields are considered; thus the replacement is used if *any* of the alternative fields is *not* empty. E.g. `%(chapters&has chapters|no chapters)s`, `%(title&TITLE={:>20}|NO TITLE)s`
1. **Default**: A literal default value can be specified for when the field is empty using a `|` separator. This overrides `--output-na-placeholder`. E.g. `%(uploader|Unknown)s`