koleo-cli 0.2.137.23.2__tar.gz → 0.2.137.23.3__tar.gz
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-0.2.137.23.2/koleo_cli.egg-info → koleo_cli-0.2.137.23.3}/PKG-INFO +1 -1
- {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/koleo/args.py +2 -3
- {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/koleo/cli/__init__.py +0 -1
- {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/koleo/cli/base.py +7 -3
- {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/koleo/utils.py +2 -1
- {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3/koleo_cli.egg-info}/PKG-INFO +1 -1
- {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/setup.py +1 -1
- {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/LICENSE +0 -0
- {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/MANIFEST.in +0 -0
- {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/README.md +0 -0
- {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/koleo/__init__.py +0 -0
- {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/koleo/__main__.py +0 -0
- {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/koleo/api/__init__.py +0 -0
- {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/koleo/api/base.py +0 -0
- {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/koleo/api/client.py +0 -0
- {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/koleo/api/errors.py +0 -0
- {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/koleo/api/logging.py +0 -0
- {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/koleo/api/types.py +0 -0
- {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/koleo/cli/aliases.py +0 -0
- {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/koleo/cli/connections.py +0 -0
- {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/koleo/cli/seats.py +0 -0
- {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/koleo/cli/station_board.py +0 -0
- {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/koleo/cli/stations.py +0 -0
- {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/koleo/cli/train_info.py +0 -0
- {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/koleo/cli/utils.py +0 -0
- {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/koleo/storage.py +0 -0
- {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/koleo_cli.egg-info/SOURCES.txt +0 -0
- {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/koleo_cli.egg-info/dependency_links.txt +0 -0
- {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/koleo_cli.egg-info/entry_points.txt +0 -0
- {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/koleo_cli.egg-info/requires.txt +0 -0
- {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/koleo_cli.egg-info/top_level.txt +0 -0
- {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/pyproject.toml +0 -0
- {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/requirements.txt +0 -0
- {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/setup.cfg +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from argparse import ArgumentParser
|
|
2
|
-
from asyncio import run
|
|
2
|
+
from asyncio import run
|
|
3
3
|
from datetime import datetime
|
|
4
4
|
from inspect import isawaitable
|
|
5
5
|
|
|
@@ -287,8 +287,7 @@ def main():
|
|
|
287
287
|
await client.close()
|
|
288
288
|
|
|
289
289
|
cli.client, cli.storage = client, storage
|
|
290
|
-
cli.
|
|
291
|
-
cli.no_color = args.nocolor
|
|
290
|
+
cli.init_console(args.nocolor)
|
|
292
291
|
if hasattr(args, "station") and args.station is None:
|
|
293
292
|
args.station = storage.favourite_station
|
|
294
293
|
elif hasattr(args, "station") and getattr(args, "save", False):
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import re
|
|
2
2
|
|
|
3
|
-
from rich.console import Console
|
|
4
|
-
|
|
5
3
|
from koleo.api import KoleoAPI
|
|
6
4
|
from koleo.api.types import ExtendedStationInfo, TrainOnStationInfo, TrainStop
|
|
7
5
|
from koleo.storage import Storage
|
|
@@ -18,7 +16,13 @@ class BaseCli:
|
|
|
18
16
|
self._client = client
|
|
19
17
|
self._storage = storage
|
|
20
18
|
self.no_color = no_color
|
|
21
|
-
|
|
19
|
+
|
|
20
|
+
def init_console(self, no_color: bool | None = None):
|
|
21
|
+
if no_color is not None:
|
|
22
|
+
self.no_color = no_color
|
|
23
|
+
if not self.no_color:
|
|
24
|
+
from rich.console import Console
|
|
25
|
+
self.console = Console(color_system="standard", highlight=False)
|
|
22
26
|
|
|
23
27
|
def print(self, text: str, *args, **kwargs):
|
|
24
28
|
if not text.strip():
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from argparse import Action
|
|
2
2
|
from datetime import datetime, time, timedelta
|
|
3
3
|
|
|
4
|
-
from .api.types import
|
|
4
|
+
from .api.types import SeatsAvailabilityResponse, TimeDict, TrainComposition
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
def parse_datetime(s: str):
|
|
@@ -69,6 +69,7 @@ TRANSLITERATIONS = {
|
|
|
69
69
|
"ź": "z",
|
|
70
70
|
"ż": "z",
|
|
71
71
|
" ": "-",
|
|
72
|
+
"/": "-",
|
|
72
73
|
"_": "-",
|
|
73
74
|
}
|
|
74
75
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|