From da673dd1d83bd7dbd1bae7d1d7e35b5018b79db2 Mon Sep 17 00:00:00 2001 From: ronbruins <43776917+ronbruins@users.noreply.github.com> Date: Sat, 1 Jun 2024 08:42:32 +0300 Subject: [PATCH 1/4] removed test comments --- homebox.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/homebox.py b/homebox.py index cb3712e..f8af104 100644 --- a/homebox.py +++ b/homebox.py @@ -18,7 +18,6 @@ def main(): #label_id = "2070e5f5-7e53-4aa6-bf87-a07b9e3b0d18" #update_label(label_id) -## main loop for the files ## def do_location_folder(): loc_idx = 0 for root, dirs, files in os.walk(loc_folder): @@ -33,7 +32,6 @@ def do_location_folder(): loc_idx = loc_idx + 1 -## get location ## def do_location(location): print(f"Location: {location}") locations = hb.get_location() @@ -46,7 +44,6 @@ def do_location(location): location_id = hb.create_location(location) return location_id -## added parent item ## def do_parent_item(parent_itemname,location_id,location): parent_item_id = hb.create_item(location_id,parent_itemname) pic_name = f"{parent_itemname}.jpeg" @@ -54,7 +51,6 @@ def do_parent_item(parent_itemname,location_id,location): hb.upload_photo(parent_item_id,pic_name,item_location) return parent_item_id,item_location -#added loop item# def loop_item(location_id,item_location,parent_item_id): for root, dirs, files in os.walk(item_location): for item in files: @@ -100,7 +96,6 @@ def loop_item(location_id,item_location,parent_item_id): hb.update_item_label(parent_item_id,item_id,location_id,itemname,labels,labelids) -## label update ### def update_label(label_id): items = hb.get_items() for item in items['items']: @@ -121,7 +116,6 @@ def update_label(label_id): hb.update_item_label(parent_item_id,item_id,location_id,name) except: pass -## loc comment ## def mv_loc_parent_item(): locations = hb.get_location() for location in locations: @@ -136,7 +130,6 @@ def mv_loc_parent_item(): print(item['name']) print(item['id']) hb.update_item(parent_item_id,item['id'],location_id,item['name']) -##exiftool ## def call_ssc(FileLoc): cmd = "-j -G -n" From 4a60521237c6d3524c7f607a3d598d05c2b2694e Mon Sep 17 00:00:00 2001 From: ronbruins <43776917+ronbruins@users.noreply.github.com> Date: Sat, 1 Jun 2024 08:43:06 +0300 Subject: [PATCH 2/4] removed debug commented out lines --- homebox.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/homebox.py b/homebox.py index f8af104..58469f7 100644 --- a/homebox.py +++ b/homebox.py @@ -99,11 +99,7 @@ def loop_item(location_id,item_location,parent_item_id): def update_label(label_id): items = hb.get_items() for item in items['items']: - #if "Feestje Twan" in item['name']: - - item_details = hb.get_item_by_id(item['id']) - #print(item_details['parent']['id']) name = item['name'] item_id = item['id'] try: From 81ffcf155c20040e215b7c6c8494b636ed0c031b Mon Sep 17 00:00:00 2001 From: ronbruins <43776917+ronbruins@users.noreply.github.com> Date: Sat, 1 Jun 2024 08:43:46 +0300 Subject: [PATCH 3/4] remove debug comment --- homebox.py | 1 - 1 file changed, 1 deletion(-) diff --git a/homebox.py b/homebox.py index 58469f7..816bbb7 100644 --- a/homebox.py +++ b/homebox.py @@ -132,7 +132,6 @@ def call_ssc(FileLoc): ssc_exec = f"{ssc_path} {cmd} '{FileLoc}'" output = str(subprocess.check_output(f"{ssc_exec}", shell=True, encoding='utf-8',stderr=subprocess.DEVNULL)) output = os.linesep.join([s for s in output.splitlines() if s]) - #print(output) return json.loads(output) if __name__ == '__main__': From f5df05460218514d16692544d6c8d0a2523c1900 Mon Sep 17 00:00:00 2001 From: ronbruins <43776917+ronbruins@users.noreply.github.com> Date: Sat, 1 Jun 2024 08:44:06 +0300 Subject: [PATCH 4/4] removed manual items naming --- homebox.py | 1 - 1 file changed, 1 deletion(-) diff --git a/homebox.py b/homebox.py index 816bbb7..9be8105 100644 --- a/homebox.py +++ b/homebox.py @@ -15,7 +15,6 @@ def main(): do_location_folder() #mv_loc_parent_item() - #label_id = "2070e5f5-7e53-4aa6-bf87-a07b9e3b0d18" #update_label(label_id) def do_location_folder():