From 0e2f1e51d7401bb768e28d677830a25e3b7652b0 Mon Sep 17 00:00:00 2001 From: stuebinm Date: Thu, 16 Mar 2023 22:44:34 +0100 Subject: minor fixes for 2023 --- fahrplan.rkt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'fahrplan.rkt') 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)) -- cgit v1.2.3