python scripts: isort & black pass

This commit is contained in:
Geoffrey Frogeye 2023-11-23 22:59:09 +01:00
parent 58b4fbcdf0
commit ca4c74e236
Signed by: geoffrey
GPG key ID: C72403E7F82E6AD8
18 changed files with 47 additions and 42 deletions

View file

@ -39,7 +39,7 @@ def main(args: argparse.Namespace) -> None:
log.warning("Processing files...")
for full_path in get_pictures(**kwargs):
# Find date
with open(full_path, 'rb') as fd:
with open(full_path, "rb") as fd:
exif_data = exifread.process_file(fd)
if not exif_data:
log.warning(f"{full_path} does not have EXIF data")
@ -54,8 +54,8 @@ def main(args: argparse.Namespace) -> None:
# Determine new filename
ext = os.path.splitext(full_path)[1].lower()
if ext == '.jpeg':
ext = '.jpg'
if ext == ".jpeg":
ext = ".jpg"
new_name = date.isoformat().replace(":", "-").replace("T", "_") + args.suffix
# First substitution is to allow images being sent to a NTFS filesystem
# Second substitution is for esthetics