Add Support of maxWeight
Tento commit je obsažen v:
rodič
e9fbf09a35
revize
c971d90595
1 změnil soubory, kde provedl 8 přidání a 0 odebrání
|
@ -85,6 +85,13 @@ def is_machine_dryer(row):
|
||||||
return DRYER_STRING in row.contents[0].text
|
return DRYER_STRING in row.contents[0].text
|
||||||
|
|
||||||
|
|
||||||
|
def get_machine_weight(row):
|
||||||
|
"""
|
||||||
|
Find the maximum weight supported by the machine.
|
||||||
|
"""
|
||||||
|
return int(re.search("LINGE (.*?) KG", row.contents[0].text).group(1))
|
||||||
|
|
||||||
|
|
||||||
def get_machine_number(row):
|
def get_machine_number(row):
|
||||||
"""
|
"""
|
||||||
Gets the current machine number.
|
Gets the current machine number.
|
||||||
|
@ -184,6 +191,7 @@ def get_parsed_data(rows):
|
||||||
machine = {
|
machine = {
|
||||||
"number": get_machine_number(row),
|
"number": get_machine_number(row),
|
||||||
"state": state.value,
|
"state": state.value,
|
||||||
|
"maxWeight ": get_machine_weight(row),
|
||||||
"startTime": "",
|
"startTime": "",
|
||||||
"endTime": "",
|
"endTime": "",
|
||||||
"donePercent": "",
|
"donePercent": "",
|
||||||
|
|
Načítání…
Odkázat v novém problému