[postprocessor:metadata] accept a string-list for 'content-format'

(closes #1080)
This commit is contained in:
Mike Fährmann
2020-10-27 20:09:58 +01:00
parent 198c33ec36
commit d83b95fd28
3 changed files with 18 additions and 13 deletions

View File

@@ -22,6 +22,8 @@ class MetadataPP(PostProcessor):
if mode == "custom":
self.write = self._write_custom
cfmt = options.get("content-format") or options.get("format")
if isinstance(cfmt, list):
cfmt = "\n".join(cfmt) + "\n"
self.contentfmt = util.Formatter(cfmt).format_map
ext = "txt"
elif mode == "tags":