aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorGuido G√ľnther <agx@sigxcpu.org>2017-02-21 19:45:00 +0100
committerGuido G√ľnther <agx@sigxcpu.org>2017-02-22 19:04:20 +0100
commit08f93e930e6f0046d3617a47f629e681f3511825 (patch)
tree7fdd4f0df9b9d5a69b6fc5f64ecffc33be44af8d /examples
parent962708cb8f072892a3842b13b7f08f3c7b25bbbe (diff)
trip-query: Add departure and arrival platform
to default output
Diffstat (limited to 'examples')
-rw-r--r--examples/trip-query.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/trip-query.py b/examples/trip-query.py
index c3d541f..a9c5900 100644
--- a/examples/trip-query.py
+++ b/examples/trip-query.py
@@ -119,9 +119,13 @@ def format_terse(trips):
end = trip.props.parts[-1].props.end
print(" Start: %s" % start.props.name)
print(" Departure: %s" % start.props.departure.format("%F %H:%M"))
+ if start.props.dep_plat:
+ print(" Platform: %s" % start.props.dep_plat)
print(" Delay: %s" % start.props.departure_delay)
print(" End: %s" % end.props.name)
print(" Arrival: %s" % end.props.arrival.format("%F %H:%M"))
+ if end.props.arr_plat:
+ print(" Platform: %s" % end.props.arr_plat)
print(" Delay: %s" % end.props.arrival_delay)
print(" Switches: %d" % (len(trip.props.parts)-1))
print(' Duration: %.2d:%.2d' % duration(trip))