python scripts: isort & black pass
This commit is contained in:
parent
58b4fbcdf0
commit
ca4c74e236
18 changed files with 47 additions and 42 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue