(name: str)
| 114 | |
| 115 | |
| 116 | def already_formatted(name: str) -> bool: |
| 117 | # matches: YYYY-MM-DD_HH-MM-SS or with prefix and/or _NN |
| 118 | pattern = r"^(?:[A-Za-z0-9_]+_)?\d{4}-\d{2}-\d{2}_\d{2}-\d{2}-\d{2}(?:_\d{2})?$" |
| 119 | return re.match(pattern, Path(name).stem) is not None |
| 120 | |
| 121 | |
| 122 | def gather_photos(folder: Path, recursive: bool) -> list[Path]: |