Skip to content

Commit

Permalink
Make generated config file prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
jbruechert committed Feb 16, 2024
1 parent d3f0c00 commit 8f1ccab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 3 additions & 1 deletion ci/generate-motis-config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
8 changes: 2 additions & 6 deletions motis/config.ini.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8f1ccab

Please sign in to comment.