koleo-cli 0.2.137.10__py3-none-any.whl → 0.2.137.11__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of koleo-cli might be problematic. Click here for more details.
- koleo/cli.py +6 -4
- {koleo_cli-0.2.137.10.dist-info → koleo_cli-0.2.137.11.dist-info}/METADATA +1 -1
- {koleo_cli-0.2.137.10.dist-info → koleo_cli-0.2.137.11.dist-info}/RECORD +7 -7
- {koleo_cli-0.2.137.10.dist-info → koleo_cli-0.2.137.11.dist-info}/WHEEL +1 -1
- {koleo_cli-0.2.137.10.dist-info → koleo_cli-0.2.137.11.dist-info}/LICENSE +0 -0
- {koleo_cli-0.2.137.10.dist-info → koleo_cli-0.2.137.11.dist-info}/entry_points.txt +0 -0
- {koleo_cli-0.2.137.10.dist-info → koleo_cli-0.2.137.11.dist-info}/top_level.txt +0 -0
koleo/cli.py
CHANGED
|
@@ -241,11 +241,8 @@ class CLI:
|
|
|
241
241
|
dep = arr_dep_to_dt(i["departure"])
|
|
242
242
|
travel_time = (arr - dep).seconds
|
|
243
243
|
parts.append(
|
|
244
|
-
f"[bold green][link=https://koleo.pl/travel-options/{i["id"]}]{dep.strftime("%H:%M")} - {arr.strftime("%H:%M")}[/bold green] {travel_time//3600}h{(travel_time % 3600)/60:.0f}m {i['distance']}km:
|
|
244
|
+
f"[bold green][link=https://koleo.pl/travel-options/{i["id"]}]{dep.strftime("%H:%M")} - {arr.strftime("%H:%M")}[/bold green] {travel_time//3600}h{(travel_time % 3600)/60:.0f}m {i['distance']}km:[/link]"
|
|
245
245
|
)
|
|
246
|
-
if i["constriction_info"]:
|
|
247
|
-
for constriction in i["constriction_info"]:
|
|
248
|
-
parts.append(f" [bold red]- {constriction} [/bold red]")
|
|
249
246
|
if len(i["trains"]) == 1:
|
|
250
247
|
train = i["trains"][0]
|
|
251
248
|
stop = next(iter(i for i in train["stops"] if i["station_id"] == train["start_station_id"]), {})
|
|
@@ -258,10 +255,15 @@ class CLI:
|
|
|
258
255
|
)
|
|
259
256
|
)
|
|
260
257
|
brand = next(iter(i for i in api_brands if i["id"] == train["brand_id"]), {}).get("logo_text")
|
|
258
|
+
s = f" [red]{brand}[/red] {train["train_full_name"]}[purple] {stop_station['name']} {self.format_position(stop["platform"], stop["track"])}[/purple]"
|
|
261
259
|
parts[-1] += (
|
|
262
260
|
f" [red]{brand}[/red] {train["train_full_name"]}[purple] {stop_station['name']} {self.format_position(stop["platform"], stop["track"])}[/purple]"
|
|
263
261
|
)
|
|
262
|
+
for constriction in i["constriction_info"]:
|
|
263
|
+
parts.append(f" [bold red]- {constriction}[/bold red]")
|
|
264
264
|
else:
|
|
265
|
+
for constriction in i["constriction_info"]:
|
|
266
|
+
parts.append(f" [bold red]- {constriction}[/bold red]")
|
|
265
267
|
previous_arrival: datetime | None = None
|
|
266
268
|
for train in i["trains"]:
|
|
267
269
|
brand = next(iter(i for i in api_brands if i["id"] == train["brand_id"]), {}).get("logo_text")
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
koleo/__init__.py,sha256=N_IkOBZCSPCCw31Hu72CFys707PziGFmXpNVl0CXAz8,47
|
|
2
2
|
koleo/__main__.py,sha256=wu5N2wk8mvBgyvr2ghmQf4prezAe0_i-p123VVreyYc,62
|
|
3
3
|
koleo/api.py,sha256=07PSwLFmirdJ_JhPBJ7rO1nv_v90njIcwmOoxT4P_4M,5708
|
|
4
|
-
koleo/cli.py,sha256=
|
|
4
|
+
koleo/cli.py,sha256=ixTi_44y-j4Yf_cgpZz-9iI5sH1pdyaqHRV-WtqzLbQ,23500
|
|
5
5
|
koleo/storage.py,sha256=U1ydt8AZ3WsiNBOmThD-cxomLzLrpHRG4BZbMg-14Fc,2304
|
|
6
6
|
koleo/types.py,sha256=pjVCIH39rUNeipazeRKOuTRCWoslLdbGivKiQmfd5Pw,5226
|
|
7
7
|
koleo/utils.py,sha256=CsYWNf3IPhHJln445tzXSA7r2z3NpmqVSmw8Rrb7YT0,1822
|
|
8
|
-
koleo_cli-0.2.137.
|
|
9
|
-
koleo_cli-0.2.137.
|
|
10
|
-
koleo_cli-0.2.137.
|
|
11
|
-
koleo_cli-0.2.137.
|
|
12
|
-
koleo_cli-0.2.137.
|
|
13
|
-
koleo_cli-0.2.137.
|
|
8
|
+
koleo_cli-0.2.137.11.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
9
|
+
koleo_cli-0.2.137.11.dist-info/METADATA,sha256=G2q-fowwyDNeu6aY9osXfKDV8vZu9VKJa0CB46NoifY,3096
|
|
10
|
+
koleo_cli-0.2.137.11.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
|
|
11
|
+
koleo_cli-0.2.137.11.dist-info/entry_points.txt,sha256=LtCidkVDq8Zd7-fxpRbys1Xa9LTHMZwXVbdcQEscdes,41
|
|
12
|
+
koleo_cli-0.2.137.11.dist-info/top_level.txt,sha256=AlWdXotkRYzHpFfOBYi6xOXl1H0zq4-tqtZ2XivoWB4,6
|
|
13
|
+
koleo_cli-0.2.137.11.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|