mirror of
https://github.com/SoPat712/BeReal-Export-Manager.git
synced 2025-08-21 10:18:46 -04:00
removed unnecesarily lines/methods
This commit is contained in:
32
main.py
32
main.py
@@ -18,21 +18,6 @@ def get_datetime_from_str(time: str):
|
||||
return dt.strptime(time, format_string)
|
||||
|
||||
|
||||
def print_memory_info(memory: json):
|
||||
"""
|
||||
Takes a memory object from the ``memories.json`` file and prints out all necessarily information like:
|
||||
- names from the images
|
||||
- the taken time
|
||||
- the location if available
|
||||
"""
|
||||
print(" - BeReal Moment: %s\n - Time Taken: %s\n - Front Image: %s\n - Back Image: %s\n - Location: %s\n - isLate: %s"
|
||||
% (memory['berealMoment'],
|
||||
memory['takenTime'],
|
||||
get_img_filename(memory['frontImage']), get_img_filename(memory['backImage']),
|
||||
get_memory_location(memory),
|
||||
memory['isLate']))
|
||||
|
||||
|
||||
def apply_memory_on_imgs(memory: json):
|
||||
"""
|
||||
Makes a copy of the front and back images and adds information from the memory object as exif tags to the image
|
||||
@@ -55,23 +40,10 @@ def apply_memory_on_imgs(memory: json):
|
||||
params=["-P", "-overwrite_original"])
|
||||
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
f = open('memories.json')
|
||||
|
||||
apply_memory_on_imgs(json.load(f)[0])
|
||||
|
||||
# et().set_tags("2024-09-01_12-54-39_front.jpg", tags={"File:FileCreateDate": dt.strftime(dt.now(), "%Y:%m:%d %H:%M:%S")}, params=["-P", "-overwrite_original"])
|
||||
# n = 0
|
||||
# for i in json.load(f):
|
||||
# print("\nBeReal Nr. %s: " % n)
|
||||
# print_memory_info(i)
|
||||
# n+=1
|
||||
|
||||
# for d in et().get_metadata("./Photos/post/ZB_-vUE7j2JePeEN.webp"):
|
||||
# for k, v in d.items():
|
||||
# print(f"{k} = {v}")
|
||||
|
||||
for i in json.load(f):
|
||||
apply_memory_on_imgs(i)
|
||||
|
||||
f.close()
|
||||
|
Reference in New Issue
Block a user