Support {date_utc} filename_pattern

{date_utc} encodes the post creation date in UTC rather than the
current local timezone, as {date} does.

This was proposed in #69. Encoding the post creation date in
local time zone induces problems regarding --fast-update when the
time zone is changed.
This commit is contained in:
Alexander Graf
2018-01-07 14:52:03 +01:00
parent 97e1bd2bf0
commit e6be0179b7
3 changed files with 18 additions and 7 deletions

View File

@@ -95,7 +95,7 @@ pattern, the token ``{target}`` is replaced by the target name, and
:option:`--filename-pattern` configures the path of the post's files relative
to the target directory. The default is ``--filename-pattern={date}``.
The tokens ``{target}`` and ``{profile}`` are replaced like in the
dirname pattern. Further, the tokens ``{date}`` and ``{shortcode}`` are
dirname pattern. Further, the tokens ``{date}``, ``{date_utc}`` and ``{shortcode}`` are
defined. Additionally, in case of not downloading stories, the attributes of
:class:`.Post` can be used, e.g. ``{post.owner_id}`` or ``{post.mediaid}``.