You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
624 B
Python

2 years ago
import os
2 years ago
2 years ago
for root, dirs, files in os.walk("."):
for f in files:
base, ext = os.path.splitext(f)
2 years ago
if ext[1:].lower() in ("png", "jpg", "jpeg"):
2 years ago
src = os.path.join(root, f)
target = os.path.join(root, base + "-320x.webp")
Command(f"{target}", f"{src}", action="convert -resize 320x $SOURCE $TARGET")
2 years ago
2 years ago
Command("staff.fragment.html", "staff.md", action="pandoc $SOURCE -o $TARGET")
Command("staff.html", "staff.md", action="pandoc --standalone $SOURCE -o $TARGET")
Command("staff.fragment.abs.html", "staff.fragment.html", action="python3 scripts/absurls.py --baseurl https://xpub.nl/staff/ < $SOURCE > $TARGET")