Add TIPLOC to PIS Data

This commit is contained in:
Fred Boniface 2023-05-31 22:59:38 +01:00
parent 7122233ac3
commit 6425c8e25a
4 changed files with 95 additions and 64 deletions

View File

@ -142,7 +142,7 @@ pis:
- code: 5071 - code: 5071
stops: [pnz,ser,hyl,cbn,red,tru,sau,par,los,bod,lsk,men,sgm,sts,sbf,key,doc,dvp,ply,ivy,tot,nta,swl,exd,tvp,tau,bwt,hig,wsm,wor,yat,nls,bri,fit,pwy,stj,nwp,cdf] stops: [pnz,ser,hyl,cbn,red,tru,sau,par,los,bod,lsk,men,sgm,sts,sbf,key,doc,dvp,ply,ivy,tot,nta,swl,exd,tvp,tau,bwt,hig,wsm,wor,yat,nls,bri,fit,pwy,stj,nwp,cdf]
- code: 5072 - code: 5072
stops: [pnz,ser,hyl,cbn,red,tru,sau,par,los,bod,lsk,sgm,sts,ply,ivy,tot,nta,exd,tvo,tau] stops: [pnz,ser,hyl,cbn,red,tru,sau,par,los,bod,lsk,sgm,sts,ply,ivy,tot,nta,exd,tvp,tau]
- code: 5073 - code: 5073
stops: [tau,bwt,hig,wsm,wnm,wor,yat,nls,bmt,bri] stops: [tau,bwt,hig,wsm,wnm,wor,yat,nls,bmt,bri]
- code: 5074 - code: 5074
@ -172,9 +172,9 @@ pis:
- code: 5086 - code: 5086
stops: [tau,bwt,hig,wsm,wor,yat,nls,bri,fit,pwy,stj,nwp,cdf] stops: [tau,bwt,hig,wsm,wor,yat,nls,bri,fit,pwy,stj,nwp,cdf]
- code: 5087 - code: 5087
stops: [tau,bwt,hig,wsm,wor,yat,nls,bri,srd,fit,pwy,pil,srj,nwp,cdf] stops: [tau,bwt,hig,wsm,wor,yat,nls,bri,srd,fit,pwy,pil,stj,nwp,cdf]
- code: 5088 - code: 5088
stops: [tau,bwt,hig,wsm,wor,yat,nls,bei,srd,fit,pwy,stj,nwp,cdf] stops: [tau,bwt,hig,wsm,wor,yat,nls,bri,srd,fit,pwy,stj,nwp,cdf]
- code: 5089 - code: 5089
stops: [tau,bwt,hig,wsm,wor,yat,nls,psn,bri,srd,fit,pwy,stj,nwp,cdf] stops: [tau,bwt,hig,wsm,wor,yat,nls,psn,bri,srd,fit,pwy,stj,nwp,cdf]
- code: 5090 - code: 5090
@ -392,37 +392,37 @@ pis:
- code: 5198 - code: 5198
stops: [wsb,tro,boa,avf,ffd,bth,olf,kyn,bri,lwh,srd,fit,stj,nwp,cdf] stops: [wsb,tro,boa,avf,ffd,bth,olf,kyn,bri,lwh,srd,fit,stj,nwp,cdf]
- code: 5199 - code: 5199
stops: [cpm,mlk,tro,wsb] stops: [cpm,mkm,tro,wsb]
- code: 5200 - code: 5200
stops: [gcr,cnm] stops: [gcr,cnm]
- code: 5201 - code: 5201
stops: [cnm,gcr,shu,std,kem,swi] stops: [cnm,gcr,shu,std,kem,swi]
- code: 5202 - code: 5202
stops: [cnm,gcr,shu,std,kem,swi,cpm,mlk,tro,wsb,dmh,wmn,sal,rom,sou] stops: [cnm,gcr,shu,std,kem,swi,cpm,mkm,tro,wsb,dmh,wmn,sal,rom,sou]
- code: 5203 - code: 5203
stops: [cnm,gcr,shu,std,kem,swi,cpm,mlk,tro,wsb] stops: [cnm,gcr,shu,std,kem,swi,cpm,mkm,tro,wsb]
- code: 5204 - code: 5204
stops: [gcr,shu,std,kem,swi] stops: [gcr,shu,std,kem,swi]
- code: 5205 - code: 5205
stops: [gcr,shu,std,kem,swi,cpm,mlk,tro,wsb,dmh,wmn,sal,rom,sou] stops: [gcr,shu,std,kem,swi,cpm,mkm,tro,wsb,dmh,wmn,sal,rom,sou]
- code: 5206 - code: 5206
stops: [swi,cpm,mlk,tro,wsb,fro] stops: [swi,cpm,mkm,tro,wsb,fro]
- code: 5207 - code: 5207
stops: [swi,cpm,mlk,tro,wsb,dmh,wmn] stops: [swi,cpm,mkm,tro,wsb,dmh,wmn]
- code: 5208 - code: 5208
stops: [swi,cpm,mlk,tro,wsb] stops: [swi,cpm,mkm,tro,wsb]
- code: 5209 - code: 5209
stops: [fro,wsb,tro,mlk,cpm,swi] stops: [fro,wsb,tro,mkm,cpm,swi]
- code: 5210 - code: 5210
stops: [swi,kem,std,shu,gcr,cnm] stops: [swi,kem,std,shu,gcr,cnm]
- code: 5211 - code: 5211
stops: [swi,kem,std,shu,gcr] stops: [swi,kem,std,shu,gcr]
- code: 5212 - code: 5212
stops: [wsb,tro,mlk,cpm] stops: [wsb,tro,mkm,cpm]
- code: 5213 - code: 5213
stops: [wsb,tro,mlk,cpm,swi,kem,std,shu,gcr,cnm] stops: [wsb,tro,mkm,cpm,swi,kem,std,shu,gcr,cnm]
- code: 5214 - code: 5214
stops: [wsb,tro,mlk,cpm,swi] stops: [wsb,tro,mkm,cpm,swi]
- code: 5215 - code: 5215
stops: [bri,kyn,olf,bth,ffd,avf,boa,tro,wsb,fro,bru,clc,yvp,tho,yet,cno,mdn,dcw,upw,wey] stops: [bri,kyn,olf,bth,ffd,avf,boa,tro,wsb,fro,bru,clc,yvp,tho,yet,cno,mdn,dcw,upw,wey]
- code: 5216 - code: 5216
@ -450,11 +450,11 @@ pis:
- code: 5227 - code: 5227
stops: [gmv,mvl,wof,wos,asc,cnm,gcr] stops: [gmv,mvl,wof,wos,asc,cnm,gcr]
- code: 5228 - code: 5228
stops: [gmv,mvl,wof,wos,asc,cnm,gcr,cdu,yae,bpw,fit,srd,lwh,bri,kyn,olf,bth,ffd,avf,boa,tro,wsb,fro,bru,clc,ypm,tho,yet,cno,mdn,dcw,upw,wey] stops: [gmv,mvl,wof,wos,asc,cnm,gcr,cdu,yae,bpw,fit,srd,lwh,bri,kyn,olf,bth,ffd,avf,boa,tro,wsb,fro,bru,clc,yvp,tho,yet,cno,mdn,dcw,upw,wey]
- code: 5229 - code: 5229
stops: [gmv,mvl,wof,wos,asc,cnm,gcr,cdu,yae,bpw,fit,srd,lwh,bri,kyn,olf,bth,ffd,avf,boa,tro,wsb] stops: [gmv,mvl,wof,wos,asc,cnm,gcr,cdu,yae,bpw,fit,srd,lwh,bri,kyn,olf,bth,ffd,avf,boa,tro,wsb]
- code: 5230 - code: 5230
stops: [wof,wos,asc,cnm,gcr,cdu,yae,bpw,fit,srd,lwh,bri,kyn,olf,bth,ffd,avf,boa,tro,wsb,fro,bru,clc,ypm,tho,yet,cno,mdn,dcw,upw,wey] stops: [wof,wos,asc,cnm,gcr,cdu,yae,bpw,fit,srd,lwh,bri,kyn,olf,bth,ffd,avf,boa,tro,wsb,fro,bru,clc,yvp,tho,yet,cno,mdn,dcw,upw,wey]
- code: 5231 - code: 5231
stops: [wos,asc,cnm,gcr,fit,bri] stops: [wos,asc,cnm,gcr,fit,bri]
- code: 5232 - code: 5232
@ -462,11 +462,11 @@ pis:
- code: 5233 - code: 5233
stops: [wos,asc,cnm,gcr] stops: [wos,asc,cnm,gcr]
- code: 5234 - code: 5234
stops: [wos,asc,cnm,gcr,cdu,yae,bpw,fit,bri,kyn,olf,bth,ffd,avf,boa,tro,wsb,fro,bru,clc,ypm,tho,yet,cno,mdn,dcw,upw,wey] stops: [wos,asc,cnm,gcr,cdu,yae,bpw,fit,bri,kyn,olf,bth,ffd,avf,boa,tro,wsb,fro,bru,clc,yvp,tho,yet,cno,mdn,dcw,upw,wey]
- code: 5235 - code: 5235
stops: [wos,asc,cnm,gcr,cdu,yae,bpw,fit,srd,lwh,bri,kyn,olf,bth,ffd,avf,boa,tro,wsb] stops: [wos,asc,cnm,gcr,cdu,yae,bpw,fit,srd,lwh,bri,kyn,olf,bth,ffd,avf,boa,tro,wsb]
- code: 5236 - code: 5236
stops: [wsm,wnm,yat,nls,bmt,bri,kyn,olf,bth,ffd,avf,boa,tro,wsb,fro,bru,clc,ypm,tho,yet,cno,mdn,dcw,upw,wey] stops: [wsm,wnm,yat,nls,bmt,bri,kyn,olf,bth,ffd,avf,boa,tro,wsb,fro,bru,clc,yvp,tho,yet,cno,mdn,dcw,upw,wey]
- code: 5237 - code: 5237
stops: [wsb,fro] stops: [wsb,fro]
- code: 5238 - code: 5238
@ -690,7 +690,7 @@ pis:
- code: 5341 - code: 5341
stops: [ply,ivy,tot,nta,tgm,dwl,exd] stops: [ply,ivy,tot,nta,tgm,dwl,exd]
- code: 5342 - code: 5342
stops: [ply,ivt,tot,nta] stops: [ply,ivy,tot,nta]
- code: 5343 - code: 5343
stops: [ser,lts,cbb,siv] stops: [ser,lts,cbb,siv]
- code: 5344 - code: 5344
@ -896,9 +896,9 @@ pis:
- code: 5450 - code: 5450
stops: [cdf,nwp,stj,fit,bri,bth,ffd,avf,boa,tro,wsb,wmn,sal,rom,sou,frm,csa,ftn,pms,pmh] stops: [cdf,nwp,stj,fit,bri,bth,ffd,avf,boa,tro,wsb,wmn,sal,rom,sou,frm,csa,ftn,pms,pmh]
- code: 5451 - code: 5451
stops: [cdf,nwp,stj,fir,bri,kyn,olf,bth,boa,tro,wsb,dmh,wmn,sal,rom,sou,frm,csa,ftn,pms,pmh] stops: [cdf,nwp,stj,fit,bri,kyn,olf,bth,boa,tro,wsb,dmh,wmn,sal,rom,sou,frm,csa,ftn,pms,pmh]
- code: 5452 - code: 5452
stops: [cdf,nwp,stj,fir,bri,kyn,olf,bth,boa,tro,wsb,dmh,wmn,sal,rom,sou,frm,csa,ftn,pms,pmh] stops: [cdf,nwp,stj,fit,bri,kyn,olf,bth,boa,tro,wsb,dmh,wmn,sal,rom,sou,frm,csa,ftn,pms,pmh]
- code: 5453 - code: 5453
stops: [exc,exd,dwl,tgm,nta,tqy,pgn] stops: [exc,exd,dwl,tgm,nta,tqy,pgn]
- code: 5454 - code: 5454
@ -922,11 +922,11 @@ pis:
- code: 5461 - code: 5461
stops: [gcr,cdu,yae,bpw,fit,lwh,bri,kyn,olf,bth,ffd,avf,boa,tro,wsb] stops: [gcr,cdu,yae,bpw,fit,lwh,bri,kyn,olf,bth,ffd,avf,boa,tro,wsb]
- code: 5462 - code: 5462
stops: [gcr,cdu,yae,bpw,fit,lwh,bri,kyn,olf,bth,ffd,avf,boa,tro,wsb,fro,bru,clc,ypm,tho,yet,cno,mdn,dcw,upw,wey] stops: [gcr,cdu,yae,bpw,fit,lwh,bri,kyn,olf,bth,ffd,avf,boa,tro,wsb,fro,bru,clc,yvp,tho,yet,cno,mdn,dcw,upw,wey]
- code: 5463 - code: 5463
stops: [gcr,cdu,yae,bpw,fit,lwh,bri,kyn,olf,bth,ffd,avf,boa,tro,wsb,fro,bru,clc,ypm,tho,yet,cno,mdn,dcw,upw,wey] stops: [gcr,cdu,yae,bpw,fit,lwh,bri,kyn,olf,bth,ffd,avf,boa,tro,wsb,fro,bru,clc,yvp,tho,yet,cno,mdn,dcw,upw,wey]
- code: 5464 - code: 5464
stops: [gcr,cdu,yae,bpw,fit,lwh,bri,kyn,olf,bth,ffd,avf,boa,tro,wsb,fro,bru,clc,ypm,tho,yet,cno,mdn,dcw,upw,wey] stops: [gcr,cdu,yae,bpw,fit,lwh,bri,kyn,olf,bth,ffd,avf,boa,tro,wsb,fro,bru,clc,yvp,tho,yet,cno,mdn,dcw,upw,wey]
- code: 5465 - code: 5465
stops: [gcr,cdu,yae,bpw,fit,srd,lwh,bri,kyn,olf,bth,ffd,avf,boa,tro,wsb] stops: [gcr,cdu,yae,bpw,fit,srd,lwh,bri,kyn,olf,bth,ffd,avf,boa,tro,wsb]
- code: 5466 - code: 5466
@ -966,7 +966,7 @@ pis:
- code: 5485 - code: 5485
stops: [wey,upw,dcw,mdn,cno,yet,tho,yvp,clc,bru,fro,wsb,tro,boa,avf,ffd,bth,olf,kyn,bri,fit,bpw,yae,cdu,gcr] stops: [wey,upw,dcw,mdn,cno,yet,tho,yvp,clc,bru,fro,wsb,tro,boa,avf,ffd,bth,olf,kyn,bri,fit,bpw,yae,cdu,gcr]
- code: 5486 - code: 5486
stops: [wos,asc,cnm,gcr,cdu,yae,bpw,fit,bri,kyn,olf,bth,ffd,avf,boa,tro,wsb,fro,bru,clc,ypm,tho,yet,cno,mdn,dcw,upw,wey] stops: [wos,asc,cnm,gcr,cdu,yae,bpw,fit,bri,kyn,olf,bth,ffd,avf,boa,tro,wsb,fro,bru,clc,yvp,tho,yet,cno,mdn,dcw,upw,wey]
- code: 5487 - code: 5487
stops: [wsm,wnm,wor,yat,nls,psn,bmt,bri,lwh,srd,mtp,rda,cfn,sml,shh,avn,sar,svb] stops: [wsm,wnm,wor,yat,nls,psn,bmt,bri,lwh,srd,mtp,rda,cfn,sml,shh,avn,sar,svb]
- code: 5488 - code: 5488
@ -1092,7 +1092,7 @@ pis:
- code: 5550 - code: 5550
stops: [wey,upw,dcw,mdn,cno,yet,tho,yvp,clc,bru,fro,wsb,tro,boa,avf,ffd,bth,olf,bri,fit,bpw,yae,cdu,gcr,cnm,asc,wos,wof,mvl,gmv] stops: [wey,upw,dcw,mdn,cno,yet,tho,yvp,clc,bru,fro,wsb,tro,boa,avf,ffd,bth,olf,bri,fit,bpw,yae,cdu,gcr,cnm,asc,wos,wof,mvl,gmv]
- code: 5551 - code: 5551
stops: [wos,asc,cnm,gcr,cdu,yae,bpw,fit,bri,kyn,olf,bth,ffd,avf,boa,tro,wsb,fro,bru,clc,ypm,tho,yet,cno,mdn,dcw,upw,wey] stops: [wos,asc,cnm,gcr,cdu,yae,bpw,fit,bri,kyn,olf,bth,ffd,avf,boa,tro,wsb,fro,bru,clc,yvp,tho,yet,cno,mdn,dcw,upw,wey]
- code: 5552 - code: 5552
stops: [wsm,wnm,wor,yat,nls,psn,bmt,bri,fit,bpw] stops: [wsm,wnm,wor,yat,nls,psn,bmt,bri,fit,bpw]
- code: 5553 - code: 5553
@ -1104,7 +1104,7 @@ pis:
- code: 5556 - code: 5556
stops: [wsb,tro,boa,ffd,bth,olf,kyn,bri,lwh,srd,fit,bpw] stops: [wsb,tro,boa,ffd,bth,olf,kyn,bri,lwh,srd,fit,bpw]
- code: 5557 - code: 5557
stops: [wsb,tro,mlk,cpm,swi,kem,std,shu,gcr,cnm] stops: [wsb,tro,mkm,cpm,swi,kem,std,shu,gcr,cnm]
- code: 5558 - code: 5558
stops: [wsb,tro,boa,avf,ffd,bth,olf,kyn,bri,lwh,srd,fit] stops: [wsb,tro,boa,avf,ffd,bth,olf,kyn,bri,lwh,srd,fit]
- code: 5559 - code: 5559
@ -1116,7 +1116,7 @@ pis:
- code: 5562 - code: 5562
stops: [wsm,wor,yat,nls,bri] stops: [wsm,wor,yat,nls,bri]
- code: 5564 - code: 5564
stops: [bri,wsm,hig,bwt,tau,tvp,exd,ext,dww,dwl,tgm,nta,tot,ivy,ply,lsk,bod,los,par,lux,bgl,roc,scr,qui,nwq] stops: [bri,wsm,hig,bwt,tau,tvp,exd,ext,dww,dwl,tgm,nta,tot,ivy,ply,lsk,bod,los,par,lux,bgl,roc,scr,qui,nqy]
- code: 5565 - code: 5565
stops: [exd,ext,dww,dwl,tgm,nta,trr,tqy,pgn] stops: [exd,ext,dww,dwl,tgm,nta,trr,tqy,pgn]
- code: 5566 - code: 5566
@ -1164,9 +1164,9 @@ pis:
- code: 5587 - code: 5587
stops: [bri,psn,nls,yat,wor,wnm,wsm,hig,bwt,tau,tvp,exd] stops: [bri,psn,nls,yat,wor,wnm,wsm,hig,bwt,tau,tvp,exd]
- code: 5588 - code: 5588
stops: [bri,kyn,olf,bth,ffd,boa,tro,wsb,fro,bru,clc,ypm,tho,yet,cno,mdn,dcw,upw,wey] stops: [bri,kyn,olf,bth,ffd,boa,tro,wsb,fro,bru,clc,yvp,tho,yet,cno,mdn,dcw,upw,wey]
- code: 5589 - code: 5589
stops: [bri,kyn,olf,bth,ffd,boa,tro,wsb,fro,bru,clc,ypm,tho,yet,cno,mdn,dcw,upw,wey] stops: [bri,kyn,olf,bth,ffd,boa,tro,wsb,fro,bru,clc,yvp,tho,yet,cno,mdn,dcw,upw,wey]
- code: 5590 - code: 5590
stops: [cnm,gcr,cdu,yae,bpw,fit,bri,bmt,psn,nls,yat,wor,wsm,hig,bwt,tau] stops: [cnm,gcr,cdu,yae,bpw,fit,bri,bmt,psn,nls,yat,wor,wsm,hig,bwt,tau]
- code: 5591 - code: 5591
@ -1212,11 +1212,11 @@ pis:
- code: 5611 - code: 5611
stops: [tau,bwt,hig,wsm,wmn,wor,yat,nls,psn,bmt,bri,kyn,olf,bth,ffd,avf,boa,tro,wsb] stops: [tau,bwt,hig,wsm,wmn,wor,yat,nls,psn,bmt,bri,kyn,olf,bth,ffd,avf,boa,tro,wsb]
- code: 5612 - code: 5612
stops: [wey,upw,dcw,mdn,cno,yet,tho,ypm,clc,bru,fro,wsb,tro,boa,bth,bri,fit,bpw,yae,cdu,gcr] stops: [wey,upw,dcw,mdn,cno,yet,tho,yvp,clc,bru,fro,wsb,tro,boa,bth,bri,fit,bpw,yae,cdu,gcr]
- code: 5613 - code: 5613
stops: [wos,asc,cnm,gcr,cdu,yae,bpw,fit,bri,bmt,psn,nls,yat,wor,wnm,wsm] stops: [wos,asc,cnm,gcr,cdu,yae,bpw,fit,bri,bmt,psn,nls,yat,wor,wnm,wsm]
- code: 5614 - code: 5614
stops: [wmn,dmh,wsb,tro,mlk,cpm,swi] stops: [wmn,dmh,wsb,tro,mkm,cpm,swi]
- code: 5615 - code: 5615
stops: [wsm,wnm,wor,yat,nls,psn,bmt,bri,lwh,srd,fit,bpw] stops: [wsm,wnm,wor,yat,nls,psn,bmt,bri,lwh,srd,fit,bpw]
- code: 5616 - code: 5616
@ -1270,17 +1270,17 @@ pis:
- code: 5643 - code: 5643
stops: [tau,bwt,hig,wsm,wnm,wor,yat,nls,bri,lwh,srd,mtp,rda,cfn,sml,shh,avn] stops: [tau,bwt,hig,wsm,wnm,wor,yat,nls,bri,lwh,srd,mtp,rda,cfn,sml,shh,avn]
- code: 5644 - code: 5644
stops: [wey,upw,dcw,mdn,cno,yet,tho,ypm,clc,bru,fro,wsb,tro,boa,avf,ffd,bth,olf,kyn,bri,fit,bpw,yae,cdu,gcr] stops: [wey,upw,dcw,mdn,cno,yet,tho,yvp,clc,bru,fro,wsb,tro,boa,avf,ffd,bth,olf,kyn,bri,fit,bpw,yae,cdu,gcr]
- code: 5645 - code: 5645
stops: [tau,bwt,hig,wsm,wnm,wor,yat,nls,bri,lwh,srd,mtp,rda,cfn,sml,shh,avn,sar,svb] stops: [tau,bwt,hig,wsm,wnm,wor,yat,nls,bri,lwh,srd,mtp,rda,cfn,sml,shh,avn,sar,svb]
- code: 5647 - code: 5647
stops: [wey,upw,dcw,mdn,cno,yet,tho,ypm,clc,bru,fro,wsb,tro,mlk,cpm,swi] stops: [wey,upw,dcw,mdn,cno,yet,tho,yvp,clc,bru,fro,wsb,tro,mkm,cpm,swi]
- code: 5648 - code: 5648
stops: [wsm,wnm,wor,yat,nls,psn,bri] stops: [wsm,wnm,wor,yat,nls,psn,bri]
- code: 5649 - code: 5649
stops: [tau,bwt,hig,wsm,wnm,wor,yat,nls,psn,bri,lwh,srd,mtp,rda,cfn,sml,shh,avn,sar,svb] stops: [tau,bwt,hig,wsm,wnm,wor,yat,nls,psn,bri,lwh,srd,mtp,rda,cfn,sml,shh,avn,sar,svb]
- code: 5650 - code: 5650
stops: [wsm,wnm,wor,yat,nls,bmt,bri,bth,ffd,avf,boa,tro,wsb,fro,bru,clc,ypm,tho,yet,cno,mdn,dcw,upw,wey] stops: [wsm,wnm,wor,yat,nls,bmt,bri,bth,ffd,avf,boa,tro,wsb,fro,bru,clc,yvp,tho,yet,cno,mdn,dcw,upw,wey]
- code: 5651 - code: 5651
stops: [wsb,tro,boa,avf,ffd,bth,olf,kyn,bri,fit,stj,nwp,cdf] stops: [wsb,tro,boa,avf,ffd,bth,olf,kyn,bri,fit,stj,nwp,cdf]
- code: 5652 - code: 5652
@ -1332,11 +1332,11 @@ pis:
- code: 5679 - code: 5679
stops: [tau,bwt,hig,wsm,wnm,wor,yat,nls,psn,bmt,bri,lwh,srd,mtp,rda,cfn,sml,shh,avn,sar,svb] stops: [tau,bwt,hig,wsm,wnm,wor,yat,nls,psn,bmt,bri,lwh,srd,mtp,rda,cfn,sml,shh,avn,sar,svb]
- code: 5680 - code: 5680
stops: [wey,dcw,mdn,cno,yet,tho,ypm,clc,bru,fro,wsb,tro,boa,avf,ffd,bth,olf,kyn,bri,fit,stj,nwp,cdf] stops: [wey,dcw,mdn,cno,yet,tho,yvp,clc,bru,fro,wsb,tro,boa,avf,ffd,bth,olf,kyn,bri,fit,stj,nwp,cdf]
- code: 5681 - code: 5681
stops: [wos,asc,cnm,gcr,cdu,yae,bpw,fit,bri,bmt,psn,nls,yat,wor,wnm,wsm,hig,bwt,tau] stops: [wos,asc,cnm,gcr,cdu,yae,bpw,fit,bri,bmt,psn,nls,yat,wor,wnm,wsm,hig,bwt,tau]
- code: 5682 - code: 5682
stops: [wsm,wnm,wor,yat,nls,psn,bmt,bri,kyn,olf,bth,ffd,avf,boa,tro,wsb,fro,bru,clc,ypm,tho,yet,cno,mdn,dcw,upw,wey] stops: [wsm,wnm,wor,yat,nls,psn,bmt,bri,kyn,olf,bth,ffd,avf,boa,tro,wsb,fro,bru,clc,yvp,tho,yet,cno,mdn,dcw,upw,wey]
- code: 5683 - code: 5683
stops: [wsb,tro,boa,avf,ffd,bth,olf,kyn,bri,fit,pwy,stj,nwp,cdf] stops: [wsb,tro,boa,avf,ffd,bth,olf,kyn,bri,fit,pwy,stj,nwp,cdf]
- code: 5685 - code: 5685
@ -1378,9 +1378,9 @@ pis:
- code: 5703 - code: 5703
stops: [bri,fit,bpw,yae,cdu,gcr,cnm,asc,wos,wof] stops: [bri,fit,bpw,yae,cdu,gcr,cnm,asc,wos,wof]
- code: 5706 - code: 5706
stops: [bpw,fit,bri,kyn,olf,bth,ffd,avf,boa,tro,wsb,fro,bru,clc,ypm,tho,yet,cno,mdn,dcw,upw,wey] stops: [bpw,fit,bri,kyn,olf,bth,ffd,avf,boa,tro,wsb,fro,bru,clc,yvp,tho,yet,cno,mdn,dcw,upw,wey]
- code: 5707 - code: 5707
stops: [bpw,fit,srd,lwh,bri,kyn,olf,bth,ffd,avf,boa,tro,wsb,fro,bru,clc,ypm,tho,yet,cno,mdn,dcw,upw,wey] stops: [bpw,fit,srd,lwh,bri,kyn,olf,bth,ffd,avf,boa,tro,wsb,fro,bru,clc,yvp,tho,yet,cno,mdn,dcw,upw,wey]
- code: 5708 - code: 5708
stops: [bpw,fit,srd,lwh,bri,bmt,psn,nls,yat,wor,wnm,wsm] stops: [bpw,fit,srd,lwh,bri,bmt,psn,nls,yat,wor,wnm,wsm]
- code: 5709 - code: 5709
@ -1422,11 +1422,11 @@ pis:
- code: 5731 - code: 5731
stops: [gcr,cdu,yae,bpw,fit,bri] stops: [gcr,cdu,yae,bpw,fit,bri]
- code: 5732 - code: 5732
stops: [gcr,cdu,yae,bpw,fit,bri,kyn,olf,bth,ffd,avf,boa,tro,wsb,fro,bru,clc,ypm,tho,yet,cno,mdn,dcw,upw,wey] stops: [gcr,cdu,yae,bpw,fit,bri,kyn,olf,bth,ffd,avf,boa,tro,wsb,fro,bru,clc,yvp,tho,yet,cno,mdn,dcw,upw,wey]
- code: 5733 - code: 5733
stops: [gcr,cdu,yae,bpw,fit,bri,kyn,olf,bth,ffd,avf,boa,tro,wsb] stops: [gcr,cdu,yae,bpw,fit,bri,kyn,olf,bth,ffd,avf,boa,tro,wsb]
- code: 5737 - code: 5737
stops: [gmv,mvl,wof,wos,asc,cnm,gcr,cdu,yae,bpw,fit,bri,kyn,olf,bth,ffd,avf,boa,tro,wsb,fro,bru,clc,ypm,tho,yet,cno,mdn,dcw,upw,wey] stops: [gmv,mvl,wof,wos,asc,cnm,gcr,cdu,yae,bpw,fit,bri,kyn,olf,bth,ffd,avf,boa,tro,wsb,fro,bru,clc,yvp,tho,yet,cno,mdn,dcw,upw,wey]
- code: 5738 - code: 5738
stops: [gmv,mvl,wof,wos,asc,cnm,gcr,cdu,yae,bpw,fit,bri,kyn,olf,bth,ffd,avf,boa,tro,wsb] stops: [gmv,mvl,wof,wos,asc,cnm,gcr,cdu,yae,bpw,fit,bri,kyn,olf,bth,ffd,avf,boa,tro,wsb]
- code: 5740 - code: 5740
@ -1458,7 +1458,7 @@ pis:
- code: 5753 - code: 5753
stops: [ply,lsk,bod,los,par,sau,tru,red,cbn,hyl,ser,pnz] stops: [ply,lsk,bod,los,par,sau,tru,red,cbn,hyl,ser,pnz]
- code: 5754 - code: 5754
stops: [swi,cpm,mlk,tro,wsb,dmh,wmn,sal,rom,sou] stops: [swi,cpm,mkm,tro,wsb,dmh,wmn,sal,rom,sou]
- code: 5255 - code: 5255
stops: [sou,rom,sal,wmn,dmh,wsb,tro,boa,avf,ffd,bth,olf,kyn,bri] stops: [sou,rom,sal,wmn,dmh,wsb,tro,boa,avf,ffd,bth,olf,kyn,bri]
- code: 5756 - code: 5756
@ -1478,7 +1478,7 @@ pis:
- code: 5763 - code: 5763
stops: [tau,bwt,hig,wsm,wor,yat,nls,psn,bmt,bri,lwh,srd,fit,stj,nwp,cdf] stops: [tau,bwt,hig,wsm,wor,yat,nls,psn,bmt,bri,lwh,srd,fit,stj,nwp,cdf]
- code: 5764 - code: 5764
stops: [wey,upw,dcw,mdn,cno,yet,tho,ypm,clc,bru,fro,wsb,tro,boa,avf,ffd,bth,olf,kyn,bri,lwh,srd,fit] stops: [wey,upw,dcw,mdn,cno,yet,tho,yvp,clc,bru,fro,wsb,tro,boa,avf,ffd,bth,olf,kyn,bri,lwh,srd,fit]
- code: 5767 - code: 5767
stops: [wos,asc,cnm,gcr,bpw,fit,bri] stops: [wos,asc,cnm,gcr,bpw,fit,bri]
- code: 5768 - code: 5768
@ -1498,7 +1498,7 @@ pis:
- code: 5777 - code: 5777
stops: [cnm,gcr,cdu,yae,bpw,fit,srd,lwh,bri,bmt,psn,nls,yat,wor,wnm,wsm] stops: [cnm,gcr,cdu,yae,bpw,fit,srd,lwh,bri,bmt,psn,nls,yat,wor,wnm,wsm]
- code: 5799 - code: 5799
stops: [wey,upw,dcw,mdn,cno,yet,tho,ypm,clc,bru,fro,wsb,tro,boa,avf,ffd,bth,olf,kyn,bri,lwh,srd,fit,bpw,yae,cdu,gcr] stops: [wey,upw,dcw,mdn,cno,yet,tho,yvp,clc,bru,fro,wsb,tro,boa,avf,ffd,bth,olf,kyn,bri,lwh,srd,fit,bpw,yae,cdu,gcr]
- code: 5339 - code: 5339
stops: [bri,bmt,psn,nls,yat,wor,wnm,wsm,hig,bwt,tau,tvp,exd,dwl,tgm,nta,tot,ivy,ply,sbf,sts,sgm,lsk,bod,los,par,sau,tru,red,cbn,hyl,ser,pnz] stops: [bri,bmt,psn,nls,yat,wor,wnm,wsm,hig,bwt,tau,tvp,exd,dwl,tgm,nta,tot,ivy,ply,sbf,sts,sgm,lsk,bod,los,par,sau,tru,red,cbn,hyl,ser,pnz]
- code: 5660 - code: 5660
@ -1572,9 +1572,9 @@ pis:
- code: 5798 - code: 5798
stops: [pmh,pms,ftn,csa,frm,sou,rom,sal,wmn,dmh,wsb,tro,boa,bth,bri,fit,nwp,cdf] stops: [pmh,pms,ftn,csa,frm,sou,rom,sal,wmn,dmh,wsb,tro,boa,bth,bri,fit,nwp,cdf]
- code: 5800 - code: 5800
stops: [wos,asc,cnm,gcr,cdu,yae,bpw,fit,bri,kyn,olf,bth,ffd,avf,boa,tro,wsb,fro,bru,clc,ypm,tho,yet,cno,mdn,dcw,upw,wey] stops: [wos,asc,cnm,gcr,cdu,yae,bpw,fit,bri,kyn,olf,bth,ffd,avf,boa,tro,wsb,fro,bru,clc,yvp,tho,yet,cno,mdn,dcw,upw,wey]
- code: 5801 - code: 5801
stops: [sal,wmn,wsb,tro,mlk,cpm,swi,kem,std,shu,gcr,cnm] stops: [sal,wmn,wsb,tro,mkm,cpm,swi,kem,std,shu,gcr,cnm]
- code: 5802 - code: 5802
stops: [bri,lwh,srd,fit,bpw,yae,cdu,gcr,cnm,asc,wos,wof] stops: [bri,lwh,srd,fit,bpw,yae,cdu,gcr,cnm,asc,wos,wof]
- code: 5803 - code: 5803
@ -1594,7 +1594,7 @@ pis:
- code: 5810 - code: 5810
stops: [wsb,tro,boa,avf,ffd,bth,olf,kyn,bri,lwh,srd,fit,bpw,yae,cdu,gcr] stops: [wsb,tro,boa,avf,ffd,bth,olf,kyn,bri,lwh,srd,fit,bpw,yae,cdu,gcr]
- code: 5811 - code: 5811
stops: [bri,wsm,hig,bwt,tau,exd,exc,sjp,pol,dig,nco,top,exn,lyc,lym,exmS] stops: [bri,wsm,hig,bwt,tau,exd,exc,sjp,pol,dig,nco,top,exn,lyc,lym,exm]
- code: 5812 - code: 5812
stops: [bri,yat,bwt,tau,tvp,exd,dww,dwl,tgm,nta,tot,ivy,ply,dpt,doc,key,sbf,sts,sgm,lsk,bod,los,par,sau,tru,red,cbn,hyl,ser,pnz] stops: [bri,yat,bwt,tau,tvp,exd,dww,dwl,tgm,nta,tot,ivy,ply,dpt,doc,key,sbf,sts,sgm,lsk,bod,los,par,sau,tru,red,cbn,hyl,ser,pnz]
- code: 5813 - code: 5813
@ -1672,7 +1672,7 @@ pis:
- code: 5850 - code: 5850
stops: [gmv,mvl,wof,wos,asc,cnm,gcr,cdu,yae,bpw,pwy,stj,nwp,cdf] stops: [gmv,mvl,wof,wos,asc,cnm,gcr,cdu,yae,bpw,pwy,stj,nwp,cdf]
- code: 5851 - code: 5851
stops: [bpw,yar,cdu,gcr] stops: [bpw,yae,cdu,gcr]
- code: 5852 - code: 5852
stops: [cdf,nwp,stj,pwy,bpw,yae,cdu,gcr] stops: [cdf,nwp,stj,pwy,bpw,yae,cdu,gcr]
- code: 5853 - code: 5853
@ -1700,15 +1700,15 @@ pis:
- code: 5864 - code: 5864
stops: [exd,dww,tgm,nta,tot,ivy,ply,lsk,bod,par,nqy] stops: [exd,dww,tgm,nta,tot,ivy,ply,lsk,bod,par,nqy]
- code: 5865 - code: 5865
stops: [bri,bth,ffd,avf,boa,tro,wsb,fro,bru,clc,ypm,mdn,dcw,upw,wey] stops: [bri,bth,ffd,avf,boa,tro,wsb,fro,bru,clc,yvp,mdn,dcw,upw,wey]
- code: 5866 - code: 5866
stops: [sal,wmn,dmh,wsb,tro,boa,avf,ffd,bth,olf,kyn,bri] stops: [sal,wmn,dmh,wsb,tro,boa,avf,ffd,bth,olf,kyn,bri]
- code: 5867 - code: 5867
stops: [bri,bth,ffd,avf,boa,tro,wsb,fro,bru,clc,ypm,mdn,dcw,upw,wey] stops: [bri,bth,ffd,avf,boa,tro,wsb,fro,bru,clc,yvp,mdn,dcw,upw,wey]
- code: 5868 - code: 5868
stops: [pmh,pms,ftn,csa,frm,sou,rom,sal,wmn,dmh,wsb,tro,boa,bth,fit,bpw,pwy,stj,nwp,cdf] stops: [pmh,pms,ftn,csa,frm,sou,rom,sal,wmn,dmh,wsb,tro,boa,bth,fit,bpw,pwy,stj,nwp,cdf]
- code: 5869 - code: 5869
stops: [bri,olf,bth,ffd,avf,boa,tro,wsb,fro,bru,clc,ypm,mdn,dcw,upw,wey] stops: [bri,olf,bth,ffd,avf,boa,tro,wsb,fro,bru,clc,yvp,mdn,dcw,upw,wey]
- code: 5870 - code: 5870
stops: [wmn,dmh,wsb,tro,boa,avf,ffd,bth,olf,kyn,bri] stops: [wmn,dmh,wsb,tro,boa,avf,ffd,bth,olf,kyn,bri]
- code: 5871 - code: 5871
@ -1720,7 +1720,7 @@ pis:
- code: 5874 - code: 5874
stops: [wsb,fro,clc,yvp,tho,yet,cno,mdn,dcw,upw,wey] stops: [wsb,fro,clc,yvp,tho,yet,cno,mdn,dcw,upw,wey]
- code: 5875 - code: 5875
stops: [wey,upw,dcw,mdn,cno,yet,tho,ypm,clc,bru,fro,wsb,tro,boa,avf,ffd,bth,olf,kyn,bri] stops: [wey,upw,dcw,mdn,cno,yet,tho,yvp,clc,bru,fro,wsb,tro,boa,avf,ffd,bth,olf,kyn,bri]
- code: 5876 - code: 5876
stops: [wey,dcw,mdn,yvp,clc,bru,fro,wsb,tro,boa,bth,bri] stops: [wey,dcw,mdn,yvp,clc,bru,fro,wsb,tro,boa,bth,bri]
- code: 5877 - code: 5877
@ -1800,7 +1800,7 @@ pis:
- code: 5913 - code: 5913
stops: [pmh,pms,ftn,csa,frm,sou,rom,sal,wmn,wsb,tro,boa,avf,ffd,bth,olf,kyn,fit,bpw,stj,nwp,cdf] stops: [pmh,pms,ftn,csa,frm,sou,rom,sal,wmn,wsb,tro,boa,avf,ffd,bth,olf,kyn,fit,bpw,stj,nwp,cdf]
- code: 5914 - code: 5914
stops: [wey,upw,dcw,mdn,cno,yet,tho,yvp,clc,bru,fro,wsb,tro,mlk,cpm,swi] stops: [wey,upw,dcw,mdn,cno,yet,tho,yvp,clc,bru,fro,wsb,tro,mkm,cpm,swi]
- code: 5915 - code: 5915
stops: [cdf,nwp,bpw,yae,cdu,gcr,cnm,asc,wos,wof] stops: [cdf,nwp,bpw,yae,cdu,gcr,cnm,asc,wos,wof]
- code: 5916 - code: 5916
@ -1886,7 +1886,7 @@ pis:
- code: 5959 - code: 5959
stops: [wmn,dmh,wsb,tro,boa,avf,ffd,bth,olf,kyn,lwh,srd,fit,bpw] stops: [wmn,dmh,wsb,tro,boa,avf,ffd,bth,olf,kyn,lwh,srd,fit,bpw]
- code: 5960 - code: 5960
stops: [pmh,pms,ftm,csa,frm,sou,rom,sal,wmn,wsb,tro,boa,bth,fit,bpw,pwy,srj,nwp,cdf] stops: [pmh,pms,ftm,csa,frm,sou,rom,sal,wmn,wsb,tro,boa,bth,fit,bpw,pwy,stj,nwp,cdf]
- code: 5961 - code: 5961
stops: [btn,gmv] ### Not in use, intermediate stops omitted stops: [btn,gmv] ### Not in use, intermediate stops omitted
- code: 5962 - code: 5962
@ -1942,7 +1942,7 @@ pis:
- code: 5990 - code: 5990
stops: [pnz,ser,cbn,red,tru,sau,par,bod,lsk,ply] stops: [pnz,ser,cbn,red,tru,sau,par,bod,lsk,ply]
- code: 5991 - code: 5991
stops: [wey,upw,dcw,mdn,cno,yet,tho,ypm,clc,bru,fro,wsb,tro,boa,avf,ffd,bth,olf,kyn,lwh,srd,fit] stops: [wey,upw,dcw,mdn,cno,yet,tho,yvp,clc,bru,fro,wsb,tro,boa,avf,ffd,bth,olf,kyn,lwh,srd,fit]
- code: 5992 - code: 5992
stops: [cdf,nwp,stj,bpw,fit,kyn,bth,boa,tro,wsb,wmn,sal,rom,sou,frm,csa,ftn,pms,pmh] stops: [cdf,nwp,stj,bpw,fit,kyn,bth,boa,tro,wsb,wmn,sal,rom,sou,frm,csa,ftn,pms,pmh]
- code: 5993 - code: 5993
@ -2086,7 +2086,7 @@ pis:
- code: 6070 - code: 6070
stops: [svb,sar,avn,pri,shh,sml,cfn,rda,mtp,srd,lwh,bri] stops: [svb,sar,avn,pri,shh,sml,cfn,rda,mtp,srd,lwh,bri]
- code: 6071 - code: 6071
stops: [gcr,shu,std,kem,swi,cpm,mlk,tro,wsb,dmh,wmn] stops: [gcr,shu,std,kem,swi,cpm,mkm,tro,wsb,dmh,wmn]
- code: 6072 - code: 6072
stops: [wof,wos,asc,cnm,gcr,cdu,yae,bpw,fit,bri,kyn,olf,bth,ffd,avf,boa,tro,wsb,fro,bru,clc,yvp,tho,yet,cno,mdn,dcw,upw,wey] stops: [wof,wos,asc,cnm,gcr,cdu,yae,bpw,fit,bri,kyn,olf,bth,ffd,avf,boa,tro,wsb,fro,bru,clc,yvp,tho,yet,cno,mdn,dcw,upw,wey]
- code: 6073 - code: 6073
@ -2148,7 +2148,7 @@ pis:
- code: 6102 - code: 6102
stops: [pnz,ser,hyl,cbn,red,tru,sau,par,los,bod,lsk,sgm,sts,ply,ivy,tot,nta,tgm,dwl,exd,tau,bwt,hig,wsm,wor,yat,nls,psn,bmt,bri,fit,pwy,stj,nwp,cdf] stops: [pnz,ser,hyl,cbn,red,tru,sau,par,los,bod,lsk,sgm,sts,ply,ivy,tot,nta,tgm,dwl,exd,tau,bwt,hig,wsm,wor,yat,nls,psn,bmt,bri,fit,pwy,stj,nwp,cdf]
- code: 6103 - code: 6103
stops: [cdf,nwl,stj,pwy,fit,bri,nls,yat,wor,wsm,hig,bwt,tau,tvp,exd,dww,dwl,tgm,nta,tot,ivy,ply,sts,sgm,lsk,bod,los,par,sau,tru,red,cbn,hyl,ser,pnz] stops: [cdf,nwp,stj,pwy,fit,bri,nls,yat,wor,wsm,hig,bwt,tau,tvp,exd,dww,dwl,tgm,nta,tot,ivy,ply,sts,sgm,lsk,bod,los,par,sau,tru,red,cbn,hyl,ser,pnz]
- code: 6104 - code: 6104
stops: [tau,bwt,hig,wsm,wor,yat,nls,bri,fit,bpw,yae,cdu,gcr] stops: [tau,bwt,hig,wsm,wor,yat,nls,bri,fit,bpw,yae,cdu,gcr]
- code: 6105 - code: 6105
@ -2190,9 +2190,9 @@ pis:
- code: 6123 - code: 6123
stops: [bri,nls,yat,wor,wsm,hig,bwt,tau,tvp,exd,nta,tot,ivy,ply,sts,sgm,lsk,bod,los,par,sau,tru,red,cbn,hyl,ser,pnz] stops: [bri,nls,yat,wor,wsm,hig,bwt,tau,tvp,exd,nta,tot,ivy,ply,sts,sgm,lsk,bod,los,par,sau,tru,red,cbn,hyl,ser,pnz]
- code: 6124 - code: 6124
stops: [ply,ivt,tot,nta,tgm,dwl,exd,tvp,tau,bwt,hig,wsm,wor,yat,nls,bri,fit,pwy,stj,nwp,cdf] stops: [ply,ivy,tot,nta,tgm,dwl,exd,tvp,tau,bwt,hig,wsm,wor,yat,nls,bri,fit,pwy,stj,nwp,cdf]
- code: 6125 - code: 6125
stops: [cdf,nwl,stj,pwy,fit,bri,bmt,psn,nls,yat,wor,wnm,wsm,hig,bwt,tau,tvp,exd,dww,tgm,nta,tot,ivy,ply,sts,sgm,lsk,bod,los,par,sau,tru,red,cbn,hyl,ser,pnz] stops: [cdf,nwp,stj,pwy,fit,bri,bmt,psn,nls,yat,wor,wnm,wsm,hig,bwt,tau,tvp,exd,dww,tgm,nta,tot,ivy,ply,sts,sgm,lsk,bod,los,par,sau,tru,red,cbn,hyl,ser,pnz]
- code: 6126 - code: 6126
stops: [pnz,ser,hyl,cbn,red,tru,sau,par,los,bod,lsk,sgm,sts,ply,ivy,tot,nta,tgm,dwl,dww,scs,ext,exd] stops: [pnz,ser,hyl,cbn,red,tru,sau,par,los,bod,lsk,sgm,sts,ply,ivy,tot,nta,tgm,dwl,dww,scs,ext,exd]
- code: 6127 - code: 6127

View File

@ -14,7 +14,7 @@
# program. If not, see # program. If not, see
# https://git.fjla.uk/OwlBoard/db-manager/src/branch/main/LICENSE # https://git.fjla.uk/OwlBoard/db-manager/src/branch/main/LICENSE
version = "2023.5.9" version = "2023.5.10"
print(f"main.py: Initialising db-manager v{version}") print(f"main.py: Initialising db-manager v{version}")
#Third Party Imports #Third Party Imports

View File

@ -182,3 +182,8 @@ def putMetaHash(target :str, hash :str):
"hash": hash "hash": hash
} }
res = col.update_one(filter, {"$set": update}, upsert=True) res = col.update_one(filter, {"$set": update}, upsert=True)
def query(collection, query):
col = db[collection]
log.out(f"mongo.query: Running query: {query}")
return col.find_one(query)

View File

@ -2,8 +2,11 @@ import yaml, hashlib
import logger as log import logger as log
import mongo import mongo
REBUILD :bool = False # Set to True to force rebuild
print("pis.py: PIS Module Loaded", "DBUG") print("pis.py: PIS Module Loaded", "DBUG")
file_location :str = "/app/data/pis/gwr.yaml" #file_location :str = "/app/data/pis/gwr.yaml" # Production & Testing
file_location :str = "/home/fred.boniface/git/owlboard/db-manager/data/pis/gwr.yaml" # Local Development
def runUpdate(): def runUpdate():
if (not requiresUpdate()): if (not requiresUpdate()):
@ -14,8 +17,12 @@ def runUpdate():
pis_parsed = parse(pis_data) pis_parsed = parse(pis_data)
mongo.dropCollection("pis") mongo.dropCollection("pis")
mongo.putMany("pis", pis_parsed) mongo.putMany("pis", pis_parsed)
mongo.createSingleIndex("pis", "stops")
mongo.createSingleIndex("pis", "tiplocs")
def requiresUpdate(): def requiresUpdate():
if REBUILD:
return True
currentHash = mongo.getMetaHash("pis") currentHash = mongo.getMetaHash("pis")
with open(file_location, "r") as f: with open(file_location, "r") as f:
text = f.read() text = f.read()
@ -39,13 +46,32 @@ def load(): # Programatically add a `toc` field to each entry.
def parse(codeList): def parse(codeList):
StartLen = len(codeList) StartLen = len(codeList)
print(f"pis.parse: codeList starting length: {StartLen}") log.out(f"pis.parse: codeList starting length: {StartLen}", "DBUG")
log.out(f"pis.parse: Removing duplicate codes & adding TIPLOCs")
for i in codeList: for i in codeList:
stops = i['stops'] stops = i['stops']
print(stops)
code = i['code'] code = i['code']
for ii in codeList: for ii in codeList:
if stops == ii['stops'] and code != ii['code']: if stops == ii['stops'] and code != ii['code']:
print(f"Identical stopping pattern found: {ii['code']}") print(f"Identical stopping pattern found: {ii['code']}")
codeList.remove(ii) codeList.remove(ii)
tiplocs = []
for iii in stops:
print(iii)
tiplocs.append(getTiploc(iii))
i['tiplocs'] = tiplocs
print(f"pis.parse: Removed {StartLen - len(codeList)} duplicates") print(f"pis.parse: Removed {StartLen - len(codeList)} duplicates")
return codeList return codeList
def getTiploc(crs :str):
CRS = crs.upper()
#log.out(f"pis.getTiploc: Finding TIPLOC for {CRS}")
query = {
'3ALPHA': CRS
}
res = mongo.query("stations", query)
print(res)
if 'TIPLOC' in res:
return res['TIPLOC']
return "UNKNOWN"