initial commit
This commit is contained in:
26
cp_exif.py
Normal file
26
cp_exif.py
Normal file
@@ -0,0 +1,26 @@
|
||||
#!python3
|
||||
|
||||
# https://github.com/hMatoba/Piexif
|
||||
# http://ce3wiki.theturninggate.net/doku.php?id=file_name_convention
|
||||
# destination: <BASE>/<year>/<YYYYMMDD> <Event>/ab-<YYYYMMDD>-<Event>-<nnnn>.jpg
|
||||
|
||||
from pathlib import Path
|
||||
import datetime as dt
|
||||
import piexif
|
||||
import re
|
||||
|
||||
SRC = r'E:\RawByUser\Andreas\Fuji Finepix 3D W3\Adjusted'
|
||||
DEST = r'E:\RawByUser\Andreas\Fuji Finepix 3D W3\2D'
|
||||
|
||||
src = Path(SRC)
|
||||
for raw in src.glob("*.mpo"):
|
||||
fn = raw.name
|
||||
if not raw.is_file():
|
||||
print(f"skipped {fn}")
|
||||
continue
|
||||
destfn = Path(DEST) / f"{raw.stem}.jpg"
|
||||
if not destfn.exists():
|
||||
print(f'skipped {destfn}, missing')
|
||||
continue
|
||||
print(f"{fn}", "->", destfn)
|
||||
piexif.transplant(str(raw), str(destfn))
|
||||
Reference in New Issue
Block a user