[postprocessor:metadata] rename 'format' to 'content-format'

Just to be consistent with the other 'extension-format' option name,
and only 'format' is also still accepted.
This commit is contained in:
Mike Fährmann
2019-11-30 17:27:49 +01:00
parent a412531451
commit 26d2334550
2 changed files with 6 additions and 5 deletions

View File

@@ -20,7 +20,8 @@ class MetadataPP(PostProcessor):
mode = options.get("mode", "json")
if mode == "custom":
self.write = self._write_custom
self.contentfmt = util.Formatter(options.get("format")).format_map
cfmt = options.get("content-format") or options.get("format")
self.contentfmt = util.Formatter(cfmt).format_map
ext = "txt"
elif mode == "tags":
self.write = self._write_tags