Commit Graph

37 Commits

Author SHA1 Message Date
Mike Fährmann
6b97dcf2e0 [postprocessor:metadata] add 'private' option 2022-11-20 15:27:36 +01:00
Mike Fährmann
e2401c96ee [postprocessor:metadata] add '"mode": "jsonl"' 2022-11-07 15:46:35 +01:00
Mike Fährmann
895f36e53b [postprocessor:metadata] add 'open' and 'encoding' options 2022-11-07 15:37:22 +01:00
Mike Fährmann
5a0b4cfab4 [postprocessor:metadata] don't ignore mode:json
fixes a bug introduced in b57015cf
where {"mode": "json", "format": "foobar"}
would behave like mode:custom
2022-10-06 13:14:08 +02:00
Mike Fährmann
b57015cf0a [postprocessor:metadata] assume 'mode: custom' when format is set
{"name": "metadata", "format": "foobar"}
will now implicitly use mode:custom and no longer mode:json like before
2022-10-04 22:35:26 +02:00
Mike Fährmann
590f2e270c [postprocessor:metadata] fix error with '..' in directory 2022-08-14 17:44:46 +02:00
Mike Fährmann
0c73914848 [postprocessor:metadata] implement 'mode: modify' (#2640) 2022-07-19 12:24:26 +02:00
Mike Fährmann
f3de6b7a87 [postprocessor:metadata] implement 'mode: delete' (#2640) 2022-07-19 00:57:29 +02:00
Mike Fährmann
5b43faffed [postprocessor:metadata] write to stdout by setting filename to "-"
(#2624)
2022-05-30 21:17:31 +02:00
Mike Fährmann
d1bb7fae2d remove 'exist_ok=True' argument from several os.makedirs calls
makedirs in those places is only meant to create missing directories,
anything should be considered an error
2022-05-11 15:04:47 +02:00
Mike Fährmann
9bd27b1b8d [postprocessor:metadata] implement archive options (#2421)
'archive', 'archive-format', and 'archive-prefix'
2022-03-20 21:16:46 +01:00
Mike Fährmann
7958995398 [postprocessor:metadata] implement 'mtime' option (#2307) 2022-02-22 23:02:13 +01:00
Mike Fährmann
74145467dd move 'util.Formatter' into its own 'formatter' module 2021-09-27 02:37:04 +02:00
Mike Fährmann
2ca011dfa8 add 'kwdict' argument to PathFormat.build_filename() 2021-06-20 20:26:38 +02:00
Mike Fährmann
ff8d0d7280 [postprocessor:metadata] ensure reliable tags order (fixes #1598) 2021-06-05 14:49:14 +02:00
Mike Fährmann
4a747a31a3 [postprocessor:metadata] handle dicts in mode;tags (fixes #1598) 2021-06-04 22:37:43 +02:00
Mike Fährmann
3cbbefd4ed support 'filter' option for post processors (#1460) 2021-06-04 18:23:32 +02:00
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