Skip to content

Commit c81bab6

Browse files
author
James Campbell
committed
updated to include iptcinfo3 example
1 parent 87bfa3d commit c81bab6

File tree

5 files changed

+22
-0
lines changed

5 files changed

+22
-0
lines changed

Pipfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ matplotlib = "*"
4343
xlrd = "*"
4444
pyicu = "*"
4545
pprint = "*"
46+
iptcinfo3 = "*"
4647

4748
[requires]
4849
python_version = "3.7"

assets/iptc-example.jpg

20 Bytes
Loading

assets/iptc-example.jpg~

43.6 KB
Binary file not shown.

iptcinfo3-example.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
"""
2+
What: IPTCINFO3 example
3+
Author: James Campbell
4+
Date: 5 July 2019
5+
"""
6+
import sys
7+
8+
import iptcinfo3
9+
10+
im = open(sys.argv[1])
11+
try:
12+
info = iptcinfo3.IPTCInfo(sys.argv[1])
13+
print('-------IPTC DATA FOUND-------')
14+
for k, v in info._data.items():
15+
print(k, v)
16+
# info['city'] = '#magistræde #🇩🇰'
17+
# info.save()
18+
except Exception as e:
19+
if str(e) != "No IPTC data found.":
20+
raise

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,4 @@ matplotlib
3232
xlrd
3333
pyicu
3434
pprint
35+
iptcinfo3

0 commit comments

Comments
 (0)