fork download
  1. # rename_pairs.py — still.jpg ↔ still-loop.mp4
  2. # For a batch of product shots we generate a short loop from each still
  3. # with an [visit website](https://w...content-available-to-author-only...3.io/) (Wan 3.0) and keep the names in lockstep.
  4. import pathlib
  5. for p in pathlib.Path('.').glob('*-still.jpg'):
  6. loop = p.with_name(p.name.replace('-still.jpg','-loop.mp4'))
  7. print(p.name, '->', loop.name if loop.exists() else 'MISSING')
Success #stdin #stdout 0.14s 16256KB
stdin
Standard input is empty
stdout
Standard output is empty