Marthee commited on
Commit
cd09547
·
verified ·
1 Parent(s): 5372136

Update Doors_Schedule.py

Browse files
Files changed (1) hide show
  1. Doors_Schedule.py +47 -2
Doors_Schedule.py CHANGED
@@ -677,7 +677,7 @@ def get_similar_colors_secondary(selected_columns_new, user_input):
677
 
678
  return dict(col_dict)
679
 
680
- def get_width_info_tobeprinted_secondary(new_data, main_info, secondary_info):
681
  width_info_tobeprinted = []
682
  secondary_info_tobeprinted = []
683
 
@@ -719,8 +719,51 @@ def get_width_info_tobeprinted_secondary(new_data, main_info, secondary_info):
719
  h = int(float(h))
720
  width_info_tobeprinted.append(f"{w} mm wide x {h} mm high")
721
  secondary_info_tobeprinted.append((acous, fire))
722
- return width_info_tobeprinted, secondary_info_tobeprinted
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
723
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
724
  def get_flattened_tuples_list_SECONDARY(col_dict):
725
  tuples_list = []
726
 
@@ -980,6 +1023,7 @@ def get_cleaned_data_gpt(locations):
980
  print(new_text)
981
  return secondary_printed_clean'''
982
 
 
983
  def get_secondary_tobeprinted_clean(selected_secondary_info, secondary_tobeprinted, secondary_info):
984
  secondary_printed_clean = []
985
  if len(secondary_info) == 1:
@@ -998,6 +1042,7 @@ def get_secondary_tobeprinted_clean(selected_secondary_info, secondary_tobeprint
998
  print(new_text)
999
  return secondary_printed_clean
1000
 
 
1001
  def mix_width_secondary(widths, secondary_printed_clean):
1002
  all_print = []
1003
  for i in range(len(widths)):
 
677
 
678
  return dict(col_dict)
679
 
680
+ '''def get_width_info_tobeprinted_secondary(new_data, main_info, secondary_info):
681
  width_info_tobeprinted = []
682
  secondary_info_tobeprinted = []
683
 
 
719
  h = int(float(h))
720
  width_info_tobeprinted.append(f"{w} mm wide x {h} mm high")
721
  secondary_info_tobeprinted.append((acous, fire))
722
+ return width_info_tobeprinted, secondary_info_tobeprinted'''
723
+
724
+ def get_width_info_tobeprinted_secondary(new_data, main_info, secondary_info):
725
+ width_info_tobeprinted = []
726
+ secondary_info_tobeprinted = []
727
+
728
+ if len(main_info) == 2 and len(secondary_info) == 1:
729
+ for coords, label, acous, color in new_data:
730
+ secondary_info_tobeprinted.append(acous)
731
+
732
+
733
+ if len(main_info) == 2 and len(secondary_info) == 2:
734
+ for coords, label, acous, fire, color in new_data:
735
+ secondary_info_tobeprinted.append((acous, fire))
736
+
737
+ if len(main_info) == 3 and len(secondary_info) == 1:
738
+ for coords, label, width, acous, color in new_data:
739
+ width_info_tobeprinted.append(width)
740
+ secondary_info_tobeprinted.append(acous)
741
+
742
 
743
+ if len(main_info) == 3 and len(secondary_info) == 2:
744
+ for coords, label, width, acous, fire, color in new_data:
745
+ width_info_tobeprinted.append(width)
746
+ secondary_info_tobeprinted.append((acous, fire))
747
+
748
+ if len(main_info) == 4 and len(secondary_info) == 1:
749
+ for coords, label, width, height, acous, color in new_data:
750
+ w = re.sub(r",", "", width)
751
+ h = re.sub(r",", "", height)
752
+ w = int(float(w))
753
+ h = int(float(h))
754
+ width_info_tobeprinted.append(f"{w} mm wide x {h} mm high")
755
+ secondary_info_tobeprinted.append(acous)
756
+
757
+
758
+ if len(main_info) == 4 and len(secondary_info) == 2:
759
+ for coords, label, width, height, acous, fire, color in new_data:
760
+ #w = re.sub(r",", "", width)
761
+ #h = re.sub(r",", "", height)
762
+ #w = int(float(w))
763
+ #h = int(float(h))
764
+ width_info_tobeprinted.append(f"{width} mm wide x {height} mm high")
765
+ secondary_info_tobeprinted.append((acous, fire))
766
+ return width_info_tobeprinted, secondary_info_tobeprinted
767
  def get_flattened_tuples_list_SECONDARY(col_dict):
768
  tuples_list = []
769
 
 
1023
  print(new_text)
1024
  return secondary_printed_clean'''
1025
 
1026
+
1027
  def get_secondary_tobeprinted_clean(selected_secondary_info, secondary_tobeprinted, secondary_info):
1028
  secondary_printed_clean = []
1029
  if len(secondary_info) == 1:
 
1042
  print(new_text)
1043
  return secondary_printed_clean
1044
 
1045
+
1046
  def mix_width_secondary(widths, secondary_printed_clean):
1047
  all_print = []
1048
  for i in range(len(widths)):