1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-22 18:53:21 +01:00
Commit Graph

47 Commits

Author SHA1 Message Date
Mike Fährmann
0e730ba980
[pp:mtime] do not overwrite '_mtime' for None values (#5439) 2024-04-07 02:33:19 +02:00
Mike Fährmann
9a8403917a
restore LD_LIBRARY_PATH for PyInstaller builds (#5421) 2024-04-06 16:58:33 +02:00
Mike Fährmann
8a11b72253
remove extractor/test.py (#4504) 2024-02-27 01:37:57 +01:00
Mike Fährmann
6402f2950f
[pp:metadata] ignore non-string tag values (#4764) 2023-11-04 17:33:14 +01:00
Mike Fährmann
67ba4ee842
[pp:exec] support more replacement fields for '--exec' (#4633)
- {_directory}
- {_filename}
- {_path} (alias for {})
2023-10-09 12:50:10 +02:00
Mike Fährmann
0ef1fcab20
[postprocessor] update 'finalize' events
Add 'finalize-error' and 'finalize-success' events that trigger
depending on whether error(s) did or did not happen.

'finalize' itself now always triggers regardless of error status.
(was supposed to have the same behavior as the new 'finalize-success')
2023-08-10 19:46:37 +02:00
Mike Fährmann
f0203b7559
[postprocessor:python] add tests 2023-07-24 15:22:57 +02:00
Mike Fährmann
25c5a6ffcb
no f-strings 2023-06-25 14:01:26 +02:00
Mike Fährmann
ec64cbefeb
[postprocessor:exec] add tests 2023-06-21 23:54:35 +02:00
Mike Fährmann
a96745368e
"fix" tests on Python 3.4 and 3.5
can't rely on dict insertion order
2023-04-26 19:31:27 +02:00
Mike Fährmann
3905f05f00
[postprocessor:metadata] support putting keys in quotes
for mode 'modify' and 'delete'
based on fe41a2b1
2023-04-25 14:30:18 +02:00
Mike Fährmann
7459e4abce
[postprocessor:metadata] fix traversing more than 1 level deep
for mode 'modify' and 'delete'
2023-04-25 14:17:25 +02:00
Mike Fährmann
00f0233b28
[postprocessor:metadata] add 'skip' option (#3786) 2023-03-17 23:30:11 +01:00
Gray Manley
38a6389e2c Fix lint. 2023-02-20 00:33:30 -06:00
Gray Manley
56cbae92ec Use more pythony naming. 2023-02-19 06:14:34 -06:00
Gray Manley
8e2ba4f32e Add test. 2023-02-19 06:13:21 -06:00
Mike Fährmann
b7337d810e
[postprocessor:metadata] add 'sort' and 'separators' options 2023-02-07 18:28:14 +01:00
Mike Fährmann
3436c6b117
[postprocessor:metadata] speed up JSON encoding 2023-02-06 12:35:28 +01:00
Mike Fährmann
8124c16a50
split 'build_path' from 'set_filename' and 'set_extension'
Do not automatically build a new path
when setting file metadata or updating its extension.
2022-11-08 17:03:24 +01: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
b36125333f
[postprocessor:zip] implement 'files' option (#2872) 2022-09-09 11:41:27 +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
9704c04172
[postprocessor:zip] ensure target directory exists (#2758) 2022-07-14 11:55:39 +02:00
bradenhilton
117eeefda0
[postprocessor:mtime] add 'value' option (#2739) 2022-07-08 20:56:01 +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
e7b30866d0
[postprocessor:mtime] fix timestamps from datetime objects (#2307)
'datetime.timestamp()', which got used to convert datetime objects to
POSIX timestamps, assumes naive datetimes represent LOCAL time, while
datetimes in 'date' metadata fields represent UTC time.

Ref: https://docs.python.org/3/library/datetime.html#datetime.datetime.timestamp
> Naive datetime instances are assumed to represent local time
> you can obtain the POSIX timestamp by … calculating the timestamp directly
2022-03-23 23:05:14 +01:00
Mike Fährmann
cad85640de
move 'util.PathFormat' into its own 'path' module
to prevent circular imports between 'formatter' and 'util'
2021-09-27 21:29:37 +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
8821dceb79
use __import__() to dynamically load modules 2021-03-01 01:27:02 +01:00
Mike Fährmann
0fdaea00a3
[postprocessor:metadata] sanitize filenames 2021-01-10 00:13:20 +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
fd0685d9b5
[postprocessor:zip] defer zip file creation (fixes #968)
don't try to create zip files on postprocessor construction,
wait until directory creation during file download,
2020-08-31 21:53:18 +02: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
5df8f2959b
insert local directory into PYTHONPATH when running tests 2020-05-02 01:15:50 +02:00
Mike Fährmann
87c8b89ddd
[postprocessor:metadata] add 'directory' option (#520) 2020-01-02 20:58:10 +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
f5604492c3
update interface of config functions 2019-11-24 00:42:28 +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
9e88e7a344
[postprocessor:exec] improve (#421, #413)
- add 'final' option
- include job status in pp finalization
- improve and extend documentation
2019-11-03 21:45:45 +01:00
Mike Fährmann
c9b97dbca3
extend post processor tests 2019-08-26 23:10:12 +02:00
Mike Fährmann
e528f3cb77
adjust postprocessor test results
see 2495b99
2019-08-21 23:54:08 +02:00
Mike Fährmann
cb7f149974
fix mtime datetime test
datetime.timestamp() uses local time for a naive datetime object
2019-08-14 21:57:42 +02:00
Mike Fährmann
dd72ae7164
add postprocessor tests 2019-08-12 21:46:30 +02:00