Commit Graph

74 Commits

Author SHA1 Message Date
Mike Fährmann
4dba40703d [tests:pp] prevent failures due to config dependencies
'filename' & 'directory' set in 'path' tests cause
'ClassifyTest' to fail
2025-12-20 10:37:28 +01:00
Mike Fährmann
e589d6f6ee [pp:exec] add 'verbose' option (#7743) 2025-11-28 19:55:04 +01:00
featherbutt
06e3126bba [pp:metadata] add 'newline' option (#8439)
* Add configuration setting to control newline characters in metadata.
* update docs/configuration
* introduce 'open()' method
* add 'newline' test
2025-10-21 18:47:39 +02: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
Mike Fährmann
4052068d5a [pp:metadata] add '"mode": "print"' (#2691)
https://github.com/mikf/gallery-dl/issues/2691#issuecomment-3276158980
2025-09-22 17:54:53 +02:00
Mike Fährmann
2480ba2a55 [pp:python] add '"mode": "eval"' 2025-09-22 17:54:37 +02:00
Mike Fährmann
b9429de774 [tests] use f-strings (##7671) 2025-08-14 10:22:42 +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
9872a9eae3 [tests/postprocessor] fix 'TypeError' when logging an error (#6582)
https://github.com/mikf/gallery-dl/issues/6582#issuecomment-3121493719
2025-07-27 09:37:06 +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
9e56d81292 fix Last-Modified mtime overwriting post processor mtime (#7529)
https://github.com/mikf/gallery-dl/issues/7529#issuecomment-2989955455

- split '_mtime' into '_mtime_http' and '_mtime_meta'
- add PathFormat.set_mtime() method
2025-06-20 16:19:37 +02:00
Mike Fährmann
6d928f3805 remove some pre-3.8 workarounds (#7671) 2025-06-17 12:56:47 +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
e08ec7e083 update copyright notices 2025-06-13 00:03:41 +02:00
Mike Fährmann
811b665e33 remove @staticmethod decorators
There might have been a time when calling a static method was faster
than a regular method, but that is no longer the case. According to
micro-benchmarks, it is 70% slower in CPython 3.13 and it also makes
executing the code of a class definition slower.
2025-06-12 22:50:52 +02:00
Mike Fährmann
9b43a3677e [pp:directory] add 'directory' post processor (#7432) 2025-04-28 09:08:35 +02:00
Mike Fährmann
edd90fbf02 [pp:metadata] add 'metadata-path' option (#6582)
https://github.com/mikf/gallery-dl/issues/6582#issuecomment-2781643835
2025-04-09 20:24:14 +02:00
Mike Fährmann
8eb365d4b6 [pp:metadata] fix handling of empty directory paths (#7296) 2025-04-08 17:03:27 +02:00
Mike Fährmann
9b2d782cb7 [pp:classify] rewrite & simplify (#5213)
Do not manually build paths, which get later overwritten by
pathfmt.build_path() anyway. Just update the target directory and let
the rest of the "path logic" handle it.

Fixes skipping previously downloaded and categorized files,
which was broken since 8124c16a50
2024-11-19 08:05:11 +01:00
Mike Fährmann
359572162b [pp:rename] improve renaming files 'to' a format (#5846, #6044) 2024-09-03 21:17:31 +02:00
Mike Fährmann
ae9b0da755 [pp:hash] add 'hash' post processor (#6099) 2024-08-31 17:04:44 +02:00
Mike Fährmann
17f5ba43a8 [pp:rename] add 'rename' post processor (#5846, #6044)
renames previously downloaded files to a different filename format
2024-08-30 18:21:36 +02:00
Mike Fährmann
4b94b7d477 [pp:metadata] add 'include' and 'exclude' options (#6058) 2024-08-19 21:58:57 +02:00
Mike Fährmann
605f6fba2c [pp:metadata] implement 'base-directory' option (#5262, #5728) 2024-08-07 10:15:06 +02:00
Mike Fährmann
1527ad79e2 [tests] fix syntax for Python < 3.6
no f-strings
2024-07-06 18:39:59 +02:00
Mike Fährmann
da9916c01f [pp:metadata] implement format strings for 'directory' (#5728) 2024-07-06 03:08:59 +02:00
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