Commit Graph

30 Commits

Author SHA1 Message Date
Mike Fährmann
e589d6f6ee [pp:exec] add 'verbose' option (#7743) 2025-11-28 19:55:04 +01:00
Mike Fährmann
ca4e061386 [pp:exec] support '{_temppath}' replacement field (#8329) 2025-10-09 20:59:06 +02:00
Mike Fährmann
eee78f8148 [pp:python] restore archive functionality
fixes regression introduced in 09f0ba8e9c
2025-09-27 09:59:47 +02:00
cenodis
8b6fffe866 [pp:exec] use 'False' as default for 'start_new_session' to avoid TypeError (#7899)
in Python <= 3.11

* Use False as default instead of None to avoid TypeError
* Update postprocessor tests
2025-07-27 09:41:27 +02:00
Mike Fährmann
9bbfb09952 [pp:exec] add 'session' option (#6582)
https://github.com/mikf/gallery-dl/issues/6582#issuecomment-3067297033
2025-07-20 19:55:33 +02:00
Mike Fährmann
41191bb60a 'match.group(N)' -> 'match[N]' (#7671)
2.5x faster
2025-06-18 13:05:58 +02:00
Mike Fährmann
fa1fc39a36 [pp:exec] implement 'commands' option
to run multiple commands in succession
and stopping if one fails
2025-06-13 20:19:01 +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
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
790dd365e1 [postprocessor:exec] support tilde expansion for 'command'
https://github.com/mikf/gallery-dl/issues/146#issuecomment-1544733532
2023-05-12 16:34:17 +02:00
Mike Fährmann
78d3960a31 [postprocessor:exec] implement archive options (#3584) 2023-02-01 13:57:16 +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
3cbbefd4ed support 'filter' option for post processors (#1460) 2021-06-04 18:23:32 +02: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
e8c64dd961 [postprocessor:exec] do not auto-add '{}' to command (#1185)
This was initially done to mimic youtube-dl's behavior and
implementation of --exec, and it seemed reasonable at the time.
2020-12-19 20:53:46 +01:00
Mike Fährmann
0a3bbc9c63 [postprocessor:exec] update output 2020-12-19 20:36:39 +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
9c3568c397 [postprocessor:exec] add 'event' option
and remove 'final' option -- use '"event": "finalize"' instead.
2020-11-19 02:30:48 +01:00
Mike Fährmann
9fffa9c343 rework post processor callbacks 2020-11-19 02:29:06 +01:00
Mike Fährmann
c8787647ed add global WINDOWS bool 2020-05-19 22:32:53 +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
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
03bc8adfc7 [postprocessor:exec] run after file moved to target location
(#421)
2019-10-06 23:12:22 +02:00
Mike Fährmann
35958bebd4 [postprocessor:exec] fix filename quoting on Windows (#421) 2019-10-06 15:09:00 +02:00
Mike Fährmann
b06c372e4d [postprocessor:exec] improve; add command-line option (#421) 2019-10-05 23:46:55 +02:00
Mike Fährmann
5f38ac9609 [postprocessor:exec] add a better error message (#155) 2019-01-13 13:59:11 +01:00
Mike Fährmann
baccf8a958 improve postprocessor handling
- add pathfmt argument for __init__()
- add finalization step
- add option to keep or delete zipped files
2018-06-08 17:39:02 +02:00
Mike Fährmann
2628911ba0 [pp:exec] add 'async' option 2018-06-07 23:35:18 +02:00
Mike Fährmann
d378c0a323 [postprocessor] add 'exec' to execute user-defined processes 2018-05-22 15:00:31 +02:00