changes before turning into a flake

This commit is contained in:
2024-10-31 23:43:37 -06:00
parent cf627acdb0
commit bd50a7ce71
77 changed files with 252 additions and 131 deletions

View File

@@ -0,0 +1,12 @@
#!/usr/bin/env python3
from pathlib import Path
import re
path = Path('/home/jawz/Downloads/Jubilations/485935')
pattern = re.compile(r" (\(\d{1,2}\)(?=\.\w))")
for picture in path.iterdir():
if re.search(pattern, picture.name):
newname = (re.sub(pattern, "", picture.name))
if not (path / newname).exists():
(path / picture.name).rename(path / newname)