diff --git a/src/pis_file.py b/src/pis_file.py index f99fe39..63d98a1 100644 --- a/src/pis_file.py +++ b/src/pis_file.py @@ -5,7 +5,8 @@ def create_new_pis_file(input): file_content = "# File produced by DGP2\n\nFor Review before merging\nXXXX\n\n" for train in input: file_content += f"""\n -- code: {train.get('diagram_pis_code', 'N/A')} +pis: + - code: {train.get('diagram_pis_code', 'N/A')} # diagramDate: {train.get('diagram_date', 'N/A')} # diagramHeadcode: {train.get('train_headcode', 'N/A')} # diagram_time1: {train.get('diagram_time1', 'N/A')} @@ -13,7 +14,7 @@ def create_new_pis_file(input): """ for entry in train.get('timetable_entries', []): file_content += f""" - stops: {",".join(stop.lower() for stop in entry.get('stops', []))} + stops: [{",".join(stop.lower() for stop in entry.get('stops', []))}] # stpIndicator: {entry.get('stpIndicator', 'N/A')} # trainUid: {entry.get('trainUid', 'N/A')} # scheduleStart: {entry.get('scheduleStart', 'N/A')}