Add dictionary export

This commit is contained in:
Nyymix 2022-05-27 16:25:31 +03:00
parent cc70da19d1
commit 17ab574eb0

View file

@ -59,6 +59,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)