To be able to parse any string into a 'datetime' object
and format it as necessary.
Example:
{created_at:D%Y-%m-%dT%H:%M:%S%z}
->
"2010-01-01 00:00:00"
{created_at:D%Y-%m-%dT%H:%M:%S%z/%b %d %Y %I:%M %p}
->
"Jan 01 2010 12:00 AM"
with 'created_at' == "2010-01-01T01:00:00+0100"
Starting a format string with '\f<Type> ' allows to set a different
format string type than the default. Available ones are
- T: A template file containing the actual format string
"\fT ~/.templates/booru.txt
- E: An arbitrary Python expression
"\fE title.upper().replace(' ', '-')"
- M: Name of a Python module followed by a function name inside it.
This function gets called with the current metadata dict as
argument and should return a string.
"\fM my_module:generate_text"
'\f' was chosen since it is highly unlikely that a regular format string
would start with it, but that character could be changed to for example
'\\' or '/' etc.