From fbfb97f71f55751c66aea11daab5c3c3b17d39bc Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Sun, 10 Nov 2024 19:04:27 +0000 Subject: [PATCH 1/4] Only add 'toc' if not already defined --- scripts/merge-yaml.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/merge-yaml.js b/scripts/merge-yaml.js index 1dc522e..f9af3e0 100644 --- a/scripts/merge-yaml.js +++ b/scripts/merge-yaml.js @@ -39,7 +39,7 @@ function sortAndMergeYAMLFiles() { if (item.stops.length > 0) { outputString += ` - code: "${item.code}"\n`; outputString += ` stops: [${item.stops.map(stop => `${stop}`).join(',')}]\n`; - outputString += ` toc: "gw"\n`; + outputString += ` toc: "${item.toc || "gw"}"\n`; } }); -- 2.34.1 From fa74bc5fecfc6e73407216f8a705c417c646841b Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Sun, 10 Nov 2024 19:04:51 +0000 Subject: [PATCH 2/4] Remove merged file --- pis/auto-dgp2-2024-11-02_21-08-59.yaml | 248 ------------------------- 1 file changed, 248 deletions(-) delete mode 100644 pis/auto-dgp2-2024-11-02_21-08-59.yaml diff --git a/pis/auto-dgp2-2024-11-02_21-08-59.yaml b/pis/auto-dgp2-2024-11-02_21-08-59.yaml deleted file mode 100644 index f5b5823..0000000 --- a/pis/auto-dgp2-2024-11-02_21-08-59.yaml +++ /dev/null @@ -1,248 +0,0 @@ -# File produced by DGP2 - -- code: 6499 - # diagramDate: 2024-10-29 00:00:00 - # diagramHeadcode: 2O09 - # diagram_time1: 18.44 - # diagram_time2: 18.34 - - stops: gcr,shu,std,kem,swi,cpm,mkm,tro,wsb - # stpIndicator: O - # trainUid: G44115 - # scheduleStart: 2024-10-28T00:00:00.000Z - # scheduleEnd: 2024-10-31T23:59:59.000Z - # daysRun: M,T,W,TH - # trainStartTime: 1750 - - -- code: 6182 - # diagramDate: 2024-10-29 00:00:00 - # diagramHeadcode: 2T13 - # diagram_time1: 10.30 - # diagram_time2: 10.25 - - stops: exm,lym,top,nco,dig,exc,exd,ext,mbt,scs,dww,dwl,tgm,nta,trr,tqy,pgn - # stpIndicator: P - # trainUid: G43923 - # scheduleStart: 2024-06-02T23:00:00.000Z - # scheduleEnd: 2024-12-13T23:59:59.000Z - # daysRun: M,T,W,TH,F - # trainStartTime: 0957 - - # stpIndicator: P - # trainUid: G44071 - # scheduleStart: 2024-06-02T23:00:00.000Z - # scheduleEnd: 2024-12-13T23:59:59.000Z - # daysRun: M,T,W,TH,F - # trainStartTime: 1129 - - -- code: 6051 - # diagramDate: 2024-10-29 00:00:00 - # diagramHeadcode: 2K05 - # diagram_time1: 10.37 - # diagram_time2: 10.34 - - stops: exc,exd,ntc,cdi,oke - # stpIndicator: P - # trainUid: G44166 - # scheduleStart: 2024-06-02T23:00:00.000Z - # scheduleEnd: 2024-12-13T23:59:59.000Z - # daysRun: M,T,W,TH,F - # trainStartTime: 1032 - - #stops: svb,sar,avn,pri,shh,sml,cfn,rda,mtp,srd,lwh,bri - # stpIndicator: P - # trainUid: G45231 - # scheduleStart: 2024-06-02T23:00:00.000Z - # scheduleEnd: 2024-12-13T23:59:59.000Z - # daysRun: M,T,W,TH,F - # trainStartTime: 0701 - - -- code: 6089 - # diagramDate: 2024-10-29 00:00:00 - # diagramHeadcode: 2T29 - # diagram_time1: 17.56 - # diagram_time2: None - - stops: exm,lym,lyc,exn,top,nco,dig,pol,sjp,exc,exd,ext,scs,dww,dwl,tgm,nta,trr,tqy,pgn - # stpIndicator: P - # trainUid: G43924 - # scheduleStart: 2024-06-02T23:00:00.000Z - # scheduleEnd: 2024-12-13T23:59:59.000Z - # daysRun: M,T,W,TH,F - # trainStartTime: 1756 - - -- code: 5351 - # diagramDate: 2024-10-29 00:00:00 - # diagramHeadcode: 2B84 - # diagram_time1: 19.22 - # diagram_time2: 19.19 - - #stops: bne,coo,fzp,mai - # stpIndicator: P - # trainUid: G16617 - # scheduleStart: 2024-06-02T23:00:00.000Z - # scheduleEnd: 2024-12-13T23:59:59.000Z - # daysRun: M,T,W,TH,F - # trainStartTime: 1652 - - stops: exc,exd,ntc,cdi,yeo,cop,mrd,egg,umb,bnp - # stpIndicator: P - # trainUid: G45005 - # scheduleStart: 2024-06-02T23:00:00.000Z - # scheduleEnd: 2024-12-13T23:59:59.000Z - # daysRun: M,T,W,TH,F - # trainStartTime: 1917 - - -- code: 6293 - # diagramDate: 2024-10-29 00:00:00 - # diagramHeadcode: 2T31 - # diagram_time1: 19.30 - # diagram_time2: 19.26 - - stops: exm,lym,top,nco,dig,exc,exd,ext,mbt,scs,dwl,tgm,nta,trr,tqy,pgn - # stpIndicator: P - # trainUid: G44111 - # scheduleStart: 2024-06-02T23:00:00.000Z - # scheduleEnd: 2024-12-13T23:59:59.000Z - # daysRun: M,T,W,TH,F - # trainStartTime: 1856 - - # stops: nby,kit,hgd,bdw - # stpIndicator: P - # trainUid: G44127 - # scheduleStart: 2024-06-02T23:00:00.000Z - # scheduleEnd: 2024-12-13T23:59:59.000Z - # daysRun: M,T,W,TH,F - # trainStartTime: 2049 - - - # diagramDate: 2024-10-29 00:00:00 - # diagramHeadcode: 1D91 - # diagram_time1: 19.30 - # diagram_time2: None - - - - # diagramDate: 2024-10-29 00:00:00 - # diagramHeadcode: 2E30 - # diagram_time1: 21.00 - # diagram_time2: None - - #stops: pnz,ser,hyl,cbn,red,tru,sau,par,los,bod,lsk,men,sgm,sts,ply,ivy,tot,nta,exd - # stpIndicator: P - # trainUid: G44173 - # scheduleStart: 2024-06-02T23:00:00.000Z - # scheduleEnd: 2024-12-13T23:59:59.000Z - # daysRun: M,T,W,TH,F - # trainStartTime: 2100 - - -- code: 6310 - # diagramDate: 2024-10-29 00:00:00 - # diagramHeadcode: 2C66 - # diagram_time1: 23.48 - # diagram_time2: None - - stops: bri,nls,yat,wor,wsm,hig,bwt,tau,tvp,exd - # stpIndicator: P - # trainUid: G45476 - # scheduleStart: 2024-06-02T23:00:00.000Z - # scheduleEnd: 2024-12-12T23:59:59.000Z - # daysRun: M,T,W,TH - # trainStartTime: 2348 - - -- code: 6205 - # diagramDate: 2024-10-29 00:00:00 - # diagramHeadcode: 2T04 - # diagram_time1: 05.58 - # diagram_time2: None - - stops: exd,ext,mbt,scs,dww,dwl,tgm,nta,trr,tqy,pgn - # stpIndicator: P - # trainUid: G43918 - # scheduleStart: 2024-06-02T23:00:00.000Z - # scheduleEnd: 2024-12-13T23:59:59.000Z - # daysRun: M,T,W,TH,F - # trainStartTime: 0558 - - -- code: 6292 - # diagramDate: 2024-10-29 00:00:00 - # diagramHeadcode: 2F32 - # diagram_time1: 19.15 - # diagram_time2: None - - stops: pgn,tqy,trr,nta,tgm,dwl,dww,mbt,exd,exc,sjp,pol,dig,nco,top,exn,lyc,lym,exm - # stpIndicator: P - # trainUid: G45114 - # scheduleStart: 2024-06-02T23:00:00.000Z - # scheduleEnd: 2024-12-12T23:59:59.000Z - # daysRun: M,T,W,TH - # trainStartTime: 1915 - - -- code: 5352 - # diagramDate: 2024-10-29 00:00:00 - # diagramHeadcode: 2B82 - # diagram_time1: 17.19 - # diagram_time2: 17.17 - - #stops: bne,mlw - # stpIndicator: P - # trainUid: G16615 - # scheduleStart: 2024-06-02T23:00:00.000Z - # scheduleEnd: 2024-12-13T23:59:59.000Z - # daysRun: M,T,W,TH,F - # trainStartTime: 1652 - - stops: exc,exd,ntc,cdi,yeo,cop,mrd,lap,egg,kgn,pma,umb,cpn,bnp - # stpIndicator: P - # trainUid: G44413 - # scheduleStart: 2024-06-02T23:00:00.000Z - # scheduleEnd: 2024-12-13T23:59:59.000Z - # daysRun: M,T,W,TH,F - # trainStartTime: 1715 - - -- code: 5488 - # diagramDate: 2024-10-29 00:00:00 - # diagramHeadcode: 2C97 - # diagram_time1: 23.05 - # diagram_time2: 22.54 - - stops: bri,bmt,psn,nls,yat,wor,wnm,wsm,hig,bwt,tau,tvp,exd - # stpIndicator: P - # trainUid: G45072 - # scheduleStart: 2024-06-02T23:00:00.000Z - # scheduleEnd: 2024-12-13T23:59:59.000Z - # daysRun: M,T,W,TH,F - # trainStartTime: 2305 - - - - # diagramDate: 2024-10-29 00:00:00 - # diagramHeadcode: 2B85 - # diagram_time1: 20.23 - # diagram_time2: 20.21 - - #stops: exc,exd,cdi,yeo,cop,mrd,egg,umb,bnp - # stpIndicator: P - # trainUid: G44439 - # scheduleStart: 2024-06-02T23:00:00.000Z - # scheduleEnd: 2024-12-13T23:59:59.000Z - # daysRun: M,T,W,TH,F - # trainStartTime: 2019 - - # stops: mai,fzp,coo,bne,mlw - # stpIndicator: P - # trainUid: G45088 - # scheduleStart: 2024-06-02T23:00:00.000Z - # scheduleEnd: 2024-12-13T23:59:59.000Z - # daysRun: M,T,W,TH,F - # trainStartTime: 2036 -- 2.34.1 From 173042d741ab6b05fa7bdde154c97817843db2db Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Sun, 10 Nov 2024 19:05:46 +0000 Subject: [PATCH 3/4] Adjust 'toc' value for HEx services --- pis/gw.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pis/gw.yaml b/pis/gw.yaml index 263e917..2c998a4 100644 --- a/pis/gw.yaml +++ b/pis/gw.yaml @@ -4969,16 +4969,16 @@ pis: toc: "gw" - code: "8008" stops: [pad,rdg,tau,exd,nta,ply,lsk,bod,los,par,sau,tru,red,cbn,hyl,ser,pnz] - toc: "gw" + toc: "hx" - code: "9801" stops: [pad,hxx,hwv] - toc: "gw" + toc: "hx" - code: "9802" stops: [hxx,hwv] - toc: "gw" + toc: "hx" - code: "9811" stops: [hwv,hxx,pad] - toc: "gw" + toc: "hx" - code: "9812" stops: [hwv,hxx] - toc: "gw" + toc: "hx" -- 2.34.1 From 80762ad3c9ad5c557f43cffc8f60be5086831d45 Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Sun, 10 Nov 2024 19:06:29 +0000 Subject: [PATCH 4/4] adjust match for removing automatically generated files --- scripts/merge-yaml.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/merge-yaml.js b/scripts/merge-yaml.js index f9af3e0..b4df399 100644 --- a/scripts/merge-yaml.js +++ b/scripts/merge-yaml.js @@ -52,7 +52,7 @@ function sortAndMergeYAMLFiles() { // Remove any files created by dgp2 files.forEach(file => { - if (file.startsWith('auto-dgp2')) { + if (file.startsWith('auto-')) { fs.unlinkSync(directoryPath + file); console.log(`Deleted file: ${file}`); } -- 2.34.1