Compare commits

..

3 Commits
v0.4 ... main

Author SHA1 Message Date
d88c87434d Merge pull request 'New Summary function' (#5) from dev into main
Reviewed-on: #5
2024-02-07 14:48:15 +01:00
83ea4a509a Fix: System didnt get File Descripten for alt text correct
New: Summary before post
2024-02-07 14:42:12 +01:00
46e3210d10 CHANGELOG.md aktualisiert 2023-11-01 15:11:48 +00:00
2 changed files with 18 additions and 5 deletions

View File

@ -1,6 +1,6 @@
# Release Notes
## Unreleased
## v0.4
### Add

View File

@ -45,8 +45,9 @@ def getItemDescription(filename):
if exif_data:
for tag, value in exif_data.items():
tag_name = TAGS.get(tag, tag)
if tag_name == "ImageDescription":
imageDescription = value
if str(tag_name) == "ImageDescription":
imageDescription = str(value)
break
else:
imageDescription = "This image has no description. Please let me know so that I can update it."
else:
@ -77,6 +78,7 @@ def getPostText(filename):
if cam != "" and tag_name == "Model":
cam += " " + value
if tag_name == "Object Name":
print(value)
title = value
else:
raise ValueError("No EXIF data found.")
@ -167,7 +169,18 @@ def sendImages(Token, url, imagedir, uploadType, deleteFile):
if uploadType == 0:
postText = getPostText(f)
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)
else:
deleteFile = False
print(f"File upload aborted.")
else:
if postText == "":
postText = getPostText(f)