aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorclarkzjw <[email protected]>2024-04-27 18:18:31 -0700
committerclarkzjw <[email protected]>2024-04-27 18:18:31 -0700
commit23477dc11338f7b769c9fde95f73b18a9355c853 (patch)
tree9d911349af3a2239779c71570bc1cbc62ed63f44
parent925be23c70fab3191ca82754ebd4b679de8d53a6 (diff)
downloadSquare-23477dc11338f7b769c9fde95f73b18a9355c853.tar.gz
add ricoh focal length stats
-rw-r--r--ricoh_focal.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/ricoh_focal.py b/ricoh_focal.py
new file mode 100644
index 0000000..a69742f
--- /dev/null
+++ b/ricoh_focal.py
@@ -0,0 +1,28 @@
1import os
2import pathlib
3import platform
4import sys
5import exiftool
6from pathlib import Path
7from collections import defaultdict
8from pprint import pprint
9
10
11raw_dir = "/mnt/pool1/Media/Photo/RAW/2024/202404/Italy"
12
13focal_length = defaultdict(int)
14count = 0
15
16if __name__ == "__main__":
17 path = Path(raw_dir)
18 for dirpath, dirnames, files in os.walk(path):
19 if len(files) != 0:
20 for f in files:
21 if f.endswith(".DNG") and "PXL_" not in f:
22 filename = dirpath + "/" + f
23 with exiftool.ExifToolHelper() as et:
24 for d in et.get_tags(filename, tags="EXIF:FocalLengthIn35mmFormat"):
25 count += 1
26 print("{}: {} {}".format(count, filename, d["EXIF:FocalLengthIn35mmFormat"]))
27 focal_length[d["EXIF:FocalLengthIn35mmFormat"]] += 1
28 pprint(focal_length) \ No newline at end of file
Powered by cgit v1.2.3 (git 2.41.0)