Add dictionary export
This commit is contained in:
parent
cc70da19d1
commit
17ab574eb0
1 changed files with 4 additions and 0 deletions
4
exif.py
4
exif.py
|
@ -60,6 +60,9 @@ class Exif:
|
||||||
def getJson(self):
|
def getJson(self):
|
||||||
return json.dumps(self.exif)
|
return json.dumps(self.exif)
|
||||||
|
|
||||||
|
def getDic(self):
|
||||||
|
return self.exif
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.filename
|
return self.filename
|
||||||
|
|
||||||
|
@ -70,5 +73,6 @@ xxx = Exif('./photo.jpg')
|
||||||
print(xxx.getJson())
|
print(xxx.getJson())
|
||||||
print(xxx.getValue('Keywords'))
|
print(xxx.getValue('Keywords'))
|
||||||
print(xxx.getValue('DateTimeOriginal'))
|
print(xxx.getValue('DateTimeOriginal'))
|
||||||
|
print(xxx.getDic())
|
||||||
print(xxx)
|
print(xxx)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue