Commit Graph

20 Commits

Author SHA1 Message Date
Mike Fährmann
1bd3d7cfb0 [postprocessor:metadata] call expand_path() on custom paths
(#1299)
2021-02-27 17:19:29 +01:00
Mike Fährmann
fbfcbcbf57 Merge branch '1.17.0' 2021-02-15 02:32:33 +01:00
Mike Fährmann
b3cd970d87 [postprocessor:metadata] fix crash with 'extension-format'
Using the 'extension-format' option for events where no filename
extension is available caused a crash.

(fixes #1285)
2021-02-10 18:45:21 +01:00
Mike Fährmann
ebf417f31f remove support for deprecated options
- instagram.highlights
- metadata.bypost
- exec.final
2021-01-24 22:30:16 +01:00
Mike Fährmann
0fdaea00a3 [postprocessor:metadata] sanitize filenames 2021-01-10 00:13:20 +01:00
Mike Fährmann
b6f1fe59cb add deprecation warnings for exec.final and metadata.bypost 2020-12-12 16:58:23 +01:00
Mike Fährmann
ca59bd691c [postprocessor:metadata] add 'event' and 'filename' options 2020-11-20 22:29:11 +01:00
Mike Fährmann
9fffa9c343 rework post processor callbacks 2020-11-19 02:29:06 +01:00
Mike Fährmann
d83b95fd28 [postprocessor:metadata] accept a string-list for 'content-format'
(closes #1080)
2020-10-27 20:09:58 +01:00
Mike Fährmann
ece73b5b2a make 'path' and 'keywords' available in logging messages
Wrap all loggers used by job, extractor, downloader, and postprocessor
objects into a (custom) LoggerAdapter that provides access to the
underlying job, extractor, pathfmt, and kwdict objects and their
properties.

__init__() signatures for all downloader and postprocessor classes have
been changed to take the current Job object as their first argument,
instead of the current extractor or pathfmt.

(#574, #575)
2020-05-18 19:04:51 +02:00
Mike Fährmann
87c8b89ddd [postprocessor:metadata] add 'directory' option (#520) 2020-01-02 20:58:10 +01:00
Mike Fährmann
63e6993716 merge 'bypost' functionality into metadata postprocessor 2019-12-16 17:19:23 +01:00
Mike Fährmann
26d2334550 [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.
2019-11-30 17:27:49 +01:00
Mike Fährmann
a412531451 [postprocessor:metadata] implement 'extension-format' option
closes #477
2019-11-30 17:26:17 +01:00
Mike Fährmann
3fc1e12949 [postprocessor:metadata] filter private entries
i.e. keys starting with an underscore
2019-11-21 16:58:44 +01:00
Mike Fährmann
0bb873757a update PathFormat class
- change 'has_extension' from a simple flag/bool to a field that
  contains the original filename extension
- rename 'keywords' to 'kwdict' and some other stuff as well
- inline 'adjust_path()'
- put enumeration index before filename extension (#306)
2019-08-12 21:40:37 +02:00
Mike Fährmann
b1db194c14 [reactor] update and improve
- split 'tags' into a list
- parse 'date' into a datetime object
- fix webm/mp4 URLs
2019-05-09 23:24:49 +02:00
Mike Fährmann
523ebc9b0b Fix serialization of 'datetime' objects in '--write-metadata'
Simplified universal serialization support in json.dump() can be achieved
by passing 'default=str', which was already the case in DataJob.run()
for -j/--dump-json, but not for the 'metadata' post-processor.

This commit introduces util.dump_json() that (more or less) unifies the
JSON output procedure of both --write-metadata and --dump-json.

(#251, #252)
2019-05-09 16:49:22 +02:00
Mike Fährmann
8aba2bdebf [postprocessor:metadata] add 'tags' and 'custom' modes (#135) 2019-01-17 21:18:12 +01:00
Mike Fährmann
38500ad697 [postprocessor:metadata] first implementation (#135) 2019-01-05 16:39:05 +01:00