Add source file to YAML output

This commit is contained in:
Fred Boniface 2024-05-02 12:19:38 +01:00
parent 259c5bc9b7
commit 452ce699ee
2 changed files with 3 additions and 0 deletions

View File

@ -14,6 +14,7 @@ def humanYaml(pis_list):
additional_pis += f' - code: "{pis["pis"]}"\n'
additional_pis += f' #headcode: {pis["headcode"]}\n'
additional_pis += f' #date: {pis["date"]}\n'
additional_pis += f' #source_file: {pis["diagram_file"]}\n'
additional_pis += f' stops: [{",".join(crs)}]\n'
except Exception as err:
print(err)
@ -22,6 +23,7 @@ def humanYaml(pis_list):
manual_review += f' - code: "{pis["pis"]}"\n'
manual_review += f' #headcode: {pis["headcode"]}\n'
manual_review += f' #date: {pis["date"]}\n'
manual_review += f' #source_file: {pis["diagram_file"]}\n'
for service in pis["services"]:
crs = []
if service and service['stops']:

View File

@ -48,6 +48,7 @@ def start():
'headcode': item['headcode'],
'date': item['date'],
'services': [],
'diagram_file': item['diagram_file']
}
for service in item['services']:
service_detail = owlboard_connector.get_service_detail(service['trainUid'], item['date'])