28 lines
636 B
Python
28 lines
636 B
Python
#!/usr/bin/env python3
|
|
"""Resize exported images so the longer side is at most 2000 pixels."""
|
|
|
|
from pathlib import Path
|
|
|
|
from imagepipeline import Pipeline
|
|
|
|
INPUT = Path("/home/frank/pics/20260525_Shooting Baxxter Boys/darktable_exported")
|
|
OUTPUT_BASE = Path.home() / "pipeline_output"
|
|
|
|
MAX_EDGE = 2000
|
|
|
|
|
|
def main() -> None:
|
|
with Pipeline(
|
|
name="2000px",
|
|
input_dir=INPUT,
|
|
output_base=OUTPUT_BASE,
|
|
) as p:
|
|
p.step("imagemagick_resize", inputs="input", max_edge=MAX_EDGE)
|
|
output_root = p.run()
|
|
|
|
print(f"Pipeline finished. Output: {output_root}")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|