From 8f1ccabcac28881dc8a9a4c451cdec4f42a7a554 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonah=20Br=C3=BCchert?= Date: Fri, 16 Feb 2024 22:51:25 +0100 Subject: [PATCH] Make generated config file prettier --- ci/generate-motis-config.py | 4 +++- motis/config.ini.j2 | 8 ++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/ci/generate-motis-config.py b/ci/generate-motis-config.py index 1fb2b3ec..a658b9e3 100755 --- a/ci/generate-motis-config.py +++ b/ci/generate-motis-config.py @@ -37,4 +37,6 @@ with open("motis/config.ini.j2") as f: template = Template(f.read()) - print(template.render(gtfs_feeds=gtfs_feeds, pbf_file=osm_map)) + + with open("motis/config.ini", "w") as fo: + fo.write(template.render(gtfs_feeds=gtfs_feeds, pbf_file=osm_map)) diff --git a/motis/config.ini.j2 b/motis/config.ini.j2 index 233c47ac..82317d03 100644 --- a/motis/config.ini.j2 +++ b/motis/config.ini.j2 @@ -18,13 +18,9 @@ dataset.no_schedule=true host=127.0.0.1 [import] -{% if pbf_file %} -paths=osm:{{ pbf_file }} -{% endif %} -{% for feed in gtfs_feeds %} -paths=schedule-{{ feed.id }}:{{ feed.path }} +{% if pbf_file %}paths=osm:{{ pbf_file }}{% endif %} +{% for feed in gtfs_feeds %}paths=schedule-{{ feed.id }}:{{ feed.path }} {% endfor %} - [nigiri] first_day=TODAY num_days=365