Skip to content

Commit c5de701

Browse files
committed
Update README
1 parent 552c4ff commit c5de701

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,15 @@ train = ICEPortal()
9090
train.init() # Explicit call to init method to initialize API connection
9191

9292
print(
93-
"Travelling at", train.speed, "m/s",
93+
f"Travelling at {train.speed} m/s",
9494
f"({kmh(ms=train.speed):.2f} km/h)",
95-
"with a delay of", train.delay, "seconds"
95+
f"with a delay of {train.delay.total_seconds():.0f} seconds"
9696
)
9797

9898
print(
99-
"Next stop:", train.current_station.name,
100-
"at", train.current_station.arrival.actual.strftime("%H:%M")
99+
f"Next stop: {train.current_station.name}",
100+
f"at {train.current_station.arrival.actual.strftime('%H:%M')}",
101+
f"on platform {train.current_station.platform.actual}"
101102
)
102103

103104
with ICEPortal() as train: # init automatically called
@@ -113,7 +114,7 @@ You can read more information about available attributes in the [trains document
113114
> As you may have noticed by now, the package always returns datetime or timedelta objects for time based values
114115
> and other values like distances, velocity, etc. in SI units,
115116
> so you have to convert to other units if you want to use values different from the SI units.
116-
> For convenience the ``onboardapis.units`` module has functions to convert between units.
117+
> For convenience the ``onboardapis.units`` module provides functions to convert between units.
117118
118119
---
119120

0 commit comments

Comments
 (0)