Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
d88c87434d | |||
83ea4a509a | |||
46e3210d10 |
@ -1,6 +1,6 @@
|
|||||||
# Release Notes
|
# Release Notes
|
||||||
|
|
||||||
## Unreleased
|
## v0.4
|
||||||
|
|
||||||
### Add
|
### Add
|
||||||
|
|
||||||
|
@ -45,8 +45,9 @@ def getItemDescription(filename):
|
|||||||
if exif_data:
|
if exif_data:
|
||||||
for tag, value in exif_data.items():
|
for tag, value in exif_data.items():
|
||||||
tag_name = TAGS.get(tag, tag)
|
tag_name = TAGS.get(tag, tag)
|
||||||
if tag_name == "ImageDescription":
|
if str(tag_name) == "ImageDescription":
|
||||||
imageDescription = value
|
imageDescription = str(value)
|
||||||
|
break
|
||||||
else:
|
else:
|
||||||
imageDescription = "This image has no description. Please let me know so that I can update it."
|
imageDescription = "This image has no description. Please let me know so that I can update it."
|
||||||
else:
|
else:
|
||||||
@ -77,6 +78,7 @@ def getPostText(filename):
|
|||||||
if cam != "" and tag_name == "Model":
|
if cam != "" and tag_name == "Model":
|
||||||
cam += " " + value
|
cam += " " + value
|
||||||
if tag_name == "Object Name":
|
if tag_name == "Object Name":
|
||||||
|
print(value)
|
||||||
title = value
|
title = value
|
||||||
else:
|
else:
|
||||||
raise ValueError("No EXIF data found.")
|
raise ValueError("No EXIF data found.")
|
||||||
@ -167,7 +169,18 @@ def sendImages(Token, url, imagedir, uploadType, deleteFile):
|
|||||||
if uploadType == 0:
|
if uploadType == 0:
|
||||||
postText = getPostText(f)
|
postText = getPostText(f)
|
||||||
newFileID = newFile.get("id")
|
newFileID = newFile.get("id")
|
||||||
|
print(f"----------------------------------------")
|
||||||
|
print(f"Post Summary: ")
|
||||||
|
print(f"ImageID: " + newFileID)
|
||||||
|
print(f"Image Description: " + newFile.get("description"))
|
||||||
|
print(f"Post Text: " + postText)
|
||||||
|
print(f"----------------------------------------")
|
||||||
|
print(f"Do you want to Publish this?")
|
||||||
|
if confirm():
|
||||||
createNewPost(Token, url, newFileID, postText)
|
createNewPost(Token, url, newFileID, postText)
|
||||||
|
else:
|
||||||
|
deleteFile = False
|
||||||
|
print(f"File upload aborted.")
|
||||||
else:
|
else:
|
||||||
if postText == "":
|
if postText == "":
|
||||||
postText = getPostText(f)
|
postText = getPostText(f)
|
||||||
|
Loading…
Reference in New Issue
Block a user