Updated images_snapshot.py

master
Jonathan Chan 2 years ago
parent c6138c5a19
commit 0ab71290e4

@ -68,7 +68,8 @@ for site in os.listdir(images_dir): # Loop through SITES
for image_filename in image_list: # Loop through IMAGES
year_path = year_path.replace('Photoshop', 'Registered')
registered_image_path = year_path + '/' + image_filename[:-4] + '_registered.jpg'
image_filename_no_suffix = image_filename.replace("_tagged","");
registered_image_path = year_path + '/' + image_filename_no_suffix[:-4] + '_registered.jpg'
# Finding the Latest Deleted Image Logic:
# Iterate through 'Images/Processed'
@ -106,7 +107,7 @@ for site in os.listdir(images_dir): # Loop through SITES
# Add site stability data (# registered / # processed)
for i, row in stats_csv.iterrows():
stability = "{0:.0%}".format(stats_csv.at[i, '# registered'] / stats_csv.at[i, '# processed'])
stability = "{0:.0%}".format(stats_csv.at[i, '# registered'] / stats_csv.at[i, '# photoshop'])
stats_csv.at[i,'stability'] = stability
stats_csv.set_index('site', inplace = True)

Loading…
Cancel
Save