2
0
forked from s444420/AL-2020
AL-2020/assigning.py
2020-06-09 21:57:37 +02:00

19 lines
451 B
Python

import os
from codes_recognizer.rocognizer import recognizer
def assigning(product_code_path, shelfs):
c = None
code = recognizer(product_code_path)
print(code)
product_color = str(code[0]) + str(code[1])
print(product_color)
for shelf in shelfs:
if shelf.color == product_color:
shelf.add_product(code)
c = shelf.get_field()
print("Product", product_code_path, "is on", c)
return c