diff options
author | stuebinm | 2023-03-16 22:44:34 +0100 |
---|---|---|
committer | stuebinm | 2023-03-16 22:44:34 +0100 |
commit | 0e2f1e51d7401bb768e28d677830a25e3b7652b0 (patch) | |
tree | cf83930842725df34ac3ed5c91df274ee8400b52 | |
parent | 87689d245aa57d1da97ff4a431eb3ece58e8304c (diff) |
minor fixes for 2023
Diffstat (limited to '')
-rwxr-xr-x | fahrplan.rkt | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/fahrplan.rkt b/fahrplan.rkt index 07f2b08..7428e90 100755 --- a/fahrplan.rkt +++ b/fahrplan.rkt @@ -1,9 +1,9 @@ #!/usr/bin/env racket #lang racket/base -(define input-file "fahrplan-2022.csv") +(define input-file "fahrplan.csv") (define gtfs-prefix "gtfs-template/") -(define out-prefix "gtfs/") +(define out-prefix "gtfs-generated/") (require racket/string @@ -103,13 +103,15 @@ (lambda (chunk) (let ((number (fp-cell (car chunk) col))) ; does this column contain a train number? - (if (equal? "" number) + (if (or (equal? "" number) (equal? "Fahrt" number)) #f ; extract all lines that look like they contain stations `(,number ,(filter-map (lambda (line) - (if (station? (list-ref stations line)) + (if (and (station? (list-ref stations line)) + ; not all lines serve all stations + (not (equal? (list-ref (list-ref planfahr col) line) "-"))) `(,(list-ref stations line) ,(list-ref (list-ref planfahr col) line)) #f)) |