wicej zmian

This commit is contained in:
2025-10-17 13:24:03 +02:00
parent 3b9f8fa038
commit ecd531ffe8
5 changed files with 1877 additions and 44 deletions

23
main.py
View File

@@ -26,17 +26,23 @@ def get_finish_type(row_data):
if not color_top or not color_body:
return None
top_last_char = color_top[-1]
body_last_char = color_body[-1]
# pobierz część po ostatnim myślniku
top_suffix = color_top.split('-')[-1].upper()
body_suffix = color_body.split('-')[-1].upper()
if top_last_char == 'G' and body_last_char == 'G':
if (top_suffix == 'G' or top_suffix == None) and body_suffix == 'G':
return "GLOSS"
elif top_last_char == 'S' and body_last_char == 'S':
elif (top_suffix == 'S' or top_suffix == None) and body_suffix == 'S':
return "SATIN"
elif top_last_char in ('G', 'S') and body_last_char == 'M':
elif top_suffix in ('G', 'S') and body_suffix == 'M':
return "MIX"
elif top_last_char in ('M', 'R') and body_last_char in ('M', 'R'):
elif top_suffix in ('M', 'R', 'MAT', 'RAW') and body_suffix in ('M', 'R', 'MAT'):
return "MAT"
elif top_suffix in ('M', 'R', 'MAT', 'RAW') and body_suffix in ('G', 'S'):
return "MIX"
elif top_suffix is None and body_suffix in ('M', 'R', 'MAT'):
return "MAT"
except (KeyError, AttributeError):
return None
return None
@@ -104,9 +110,10 @@ def main():
info.get("color_body"),
info.get("color_neck"),
info.get("color_head"),
info.get("finish"),
info.get("finish_kc"),
info.get("finish_s"),
]
print(f"raw_data: {row_data}")
rows_to_process.append(row_data)
counter += 1