hspylib-clitt 0.9.47__py3-none-any.whl → 0.9.49__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 hspylib-clitt might be problematic. Click here for more details.
- clitt/.version +1 -1
- clitt/__classpath__.py +1 -1
- clitt/__init__.py +2 -2
- clitt/addons/__init__.py +2 -2
- clitt/addons/appman/__init__.py +2 -2
- clitt/addons/appman/appman.py +1 -1
- clitt/addons/appman/templates/__init__.py +2 -2
- clitt/addons/widman/__init__.py +2 -2
- clitt/addons/widman/widgets/__init__.py +2 -2
- clitt/core/__init__.py +3 -3
- clitt/core/icons/__init__.py +2 -2
- clitt/core/icons/emojis/__init__.py +2 -2
- clitt/core/icons/font_awesome/__init__.py +2 -2
- clitt/core/term/__init__.py +14 -0
- clitt/core/term/commons.py +63 -0
- clitt/core/{tty → term}/cursor.py +5 -4
- clitt/core/{tty → term}/screen.py +8 -12
- clitt/core/{tty → term}/terminal.py +24 -65
- clitt/core/tui/__init__.py +2 -2
- clitt/core/tui/mchoose/__init__.py +2 -2
- clitt/core/tui/mchoose/menu_choose.py +2 -2
- clitt/core/tui/mdashboard/__init__.py +2 -2
- clitt/core/tui/mdashboard/menu_dashboard.py +2 -2
- clitt/core/tui/menu/__init__.py +2 -2
- clitt/core/tui/menu/tui_menu_item.py +2 -2
- clitt/core/tui/menu/tui_menu_ui.py +3 -4
- clitt/core/tui/menu/tui_menu_view.py +1 -1
- clitt/core/tui/minput/__init__.py +2 -2
- clitt/core/tui/minput/menu_input.py +4 -3
- clitt/core/tui/minput/minput_utils.py +1 -1
- clitt/core/tui/mselect/__init__.py +2 -2
- clitt/core/tui/mselect/menu_select.py +2 -2
- clitt/core/tui/table/__init__.py +2 -2
- clitt/core/tui/table/table_renderer.py +10 -14
- clitt/core/tui/tui_application.py +11 -5
- clitt/core/tui/tui_component.py +21 -17
- clitt/core/tui/tui_preferences.py +3 -0
- clitt/utils/__init__.py +2 -2
- {hspylib_clitt-0.9.47.dist-info → hspylib_clitt-0.9.49.dist-info}/METADATA +2 -2
- {hspylib_clitt-0.9.47.dist-info → hspylib_clitt-0.9.49.dist-info}/RECORD +42 -42
- clitt/core/tty/__init__.py +0 -14
- clitt/core/tty/tty_types.py +0 -11
- {hspylib_clitt-0.9.47.dist-info → hspylib_clitt-0.9.49.dist-info}/WHEEL +0 -0
- {hspylib_clitt-0.9.47.dist-info → hspylib_clitt-0.9.49.dist-info}/top_level.txt +0 -0
clitt/.version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.9.
|
|
1
|
+
0.9.49
|
clitt/__classpath__.py
CHANGED
clitt/__init__.py
CHANGED
clitt/addons/__init__.py
CHANGED
clitt/addons/appman/__init__.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# _*_ coding: utf-8 _*_
|
|
2
2
|
#
|
|
3
|
-
# hspylib-clitt v0.9.
|
|
3
|
+
# hspylib-clitt v0.9.49
|
|
4
4
|
#
|
|
5
5
|
# Package: main.clitt.addons.appman
|
|
6
6
|
"""Package initialization."""
|
|
@@ -10,4 +10,4 @@ __all__ = [
|
|
|
10
10
|
'appman_enums',
|
|
11
11
|
'templates'
|
|
12
12
|
]
|
|
13
|
-
__version__ = '0.9.
|
|
13
|
+
__version__ = '0.9.49'
|
clitt/addons/appman/appman.py
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
Copyright 2023, HsPyLib team
|
|
14
14
|
"""
|
|
15
15
|
from clitt.addons.appman.appman_enums import AppExtension, AppType
|
|
16
|
-
from clitt.core.
|
|
16
|
+
from clitt.core.term.terminal import Terminal
|
|
17
17
|
from clitt.core.tui.minput.input_validator import InputValidator
|
|
18
18
|
from clitt.core.tui.minput.minput import MenuInput, minput
|
|
19
19
|
from hspylib.core.enums.charset import Charset
|
clitt/addons/widman/__init__.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# _*_ coding: utf-8 _*_
|
|
2
2
|
#
|
|
3
|
-
# hspylib-clitt v0.9.
|
|
3
|
+
# hspylib-clitt v0.9.49
|
|
4
4
|
#
|
|
5
5
|
# Package: main.clitt.addons.widman
|
|
6
6
|
"""Package initialization."""
|
|
@@ -11,4 +11,4 @@ __all__ = [
|
|
|
11
11
|
'widgets',
|
|
12
12
|
'widman'
|
|
13
13
|
]
|
|
14
|
-
__version__ = '0.9.
|
|
14
|
+
__version__ = '0.9.49'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# _*_ coding: utf-8 _*_
|
|
2
2
|
#
|
|
3
|
-
# hspylib-clitt v0.9.
|
|
3
|
+
# hspylib-clitt v0.9.49
|
|
4
4
|
#
|
|
5
5
|
# Package: main.clitt.addons.widman.widgets
|
|
6
6
|
"""Package initialization."""
|
|
@@ -11,4 +11,4 @@ __all__ = [
|
|
|
11
11
|
'widget_send_msg',
|
|
12
12
|
'widget_time_calc'
|
|
13
13
|
]
|
|
14
|
-
__version__ = '0.9.
|
|
14
|
+
__version__ = '0.9.49'
|
clitt/core/__init__.py
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# _*_ coding: utf-8 _*_
|
|
2
2
|
#
|
|
3
|
-
# hspylib-clitt v0.9.
|
|
3
|
+
# hspylib-clitt v0.9.49
|
|
4
4
|
#
|
|
5
5
|
# Package: main.clitt.core
|
|
6
6
|
"""Package initialization."""
|
|
7
7
|
|
|
8
8
|
__all__ = [
|
|
9
9
|
'icons',
|
|
10
|
-
'
|
|
10
|
+
'term',
|
|
11
11
|
'tui'
|
|
12
12
|
]
|
|
13
|
-
__version__ = '0.9.
|
|
13
|
+
__version__ = '0.9.49'
|
clitt/core/icons/__init__.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# _*_ coding: utf-8 _*_
|
|
2
2
|
#
|
|
3
|
-
# hspylib-clitt v0.9.
|
|
3
|
+
# hspylib-clitt v0.9.49
|
|
4
4
|
#
|
|
5
5
|
# Package: main.clitt.core.icons
|
|
6
6
|
"""Package initialization."""
|
|
@@ -9,4 +9,4 @@ __all__ = [
|
|
|
9
9
|
'emojis',
|
|
10
10
|
'font_awesome'
|
|
11
11
|
]
|
|
12
|
-
__version__ = '0.9.
|
|
12
|
+
__version__ = '0.9.49'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# _*_ coding: utf-8 _*_
|
|
2
2
|
#
|
|
3
|
-
# hspylib-clitt v0.9.
|
|
3
|
+
# hspylib-clitt v0.9.49
|
|
4
4
|
#
|
|
5
5
|
# Package: main.clitt.core.icons.emojis
|
|
6
6
|
"""Package initialization."""
|
|
@@ -9,4 +9,4 @@ __all__ = [
|
|
|
9
9
|
'emojis',
|
|
10
10
|
'face_smiling'
|
|
11
11
|
]
|
|
12
|
-
__version__ = '0.9.
|
|
12
|
+
__version__ = '0.9.49'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# _*_ coding: utf-8 _*_
|
|
2
2
|
#
|
|
3
|
-
# hspylib-clitt v0.9.
|
|
3
|
+
# hspylib-clitt v0.9.49
|
|
4
4
|
#
|
|
5
5
|
# Package: main.clitt.core.icons.font_awesome
|
|
6
6
|
"""Package initialization."""
|
|
@@ -14,4 +14,4 @@ __all__ = [
|
|
|
14
14
|
'nav_icons',
|
|
15
15
|
'widget_icons'
|
|
16
16
|
]
|
|
17
|
-
__version__ = '0.9.
|
|
17
|
+
__version__ = '0.9.49'
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import logging as log
|
|
2
|
+
import re
|
|
3
|
+
import sys
|
|
4
|
+
import termios
|
|
5
|
+
import tty
|
|
6
|
+
from shutil import get_terminal_size
|
|
7
|
+
from typing import TypeVar, Tuple, Callable, Union
|
|
8
|
+
|
|
9
|
+
from hspylib.core.exception.exceptions import NotATerminalError
|
|
10
|
+
from hspylib.core.tools.commons import is_debugging
|
|
11
|
+
from hspylib.modules.cli.vt100.vt_100 import Vt100
|
|
12
|
+
|
|
13
|
+
DIMENSION = TypeVar("DIMENSION", bound=Tuple[int, int])
|
|
14
|
+
|
|
15
|
+
POSITION = TypeVar("POSITION", bound=Tuple[int, int])
|
|
16
|
+
|
|
17
|
+
CB_RESIZE = TypeVar("CB_RESIZE", bound=Callable[[None], None])
|
|
18
|
+
|
|
19
|
+
MOVE_DIRECTION = TypeVar("MOVE_DIRECTION", bound="Cursor.Direction")
|
|
20
|
+
|
|
21
|
+
ERASE_DIRECTION = TypeVar("ERASE_DIRECTION", bound=Union["Cursor.Direction", "Screen.Portion"])
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def get_dimensions(fallback: Tuple[int, int] = (24, 80)) -> Tuple[int, int]:
|
|
25
|
+
"""Retrieve the size of the terminal.
|
|
26
|
+
:return lines, columns
|
|
27
|
+
"""
|
|
28
|
+
if not sys.stdout.isatty():
|
|
29
|
+
log.error(NotATerminalError("screen_size:: Requires a terminal (TTY)"))
|
|
30
|
+
return fallback
|
|
31
|
+
dim = get_terminal_size((fallback[1], fallback[0]))
|
|
32
|
+
return dim.lines, dim.columns
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def get_cursor_position(fallback: Tuple[int, int] = (0, 0)) -> Tuple[int, int]:
|
|
36
|
+
"""Get the terminal cursor position.
|
|
37
|
+
:return line, column
|
|
38
|
+
"""
|
|
39
|
+
pos, buf = fallback, ""
|
|
40
|
+
|
|
41
|
+
if not sys.stdout.isatty():
|
|
42
|
+
log.error(NotATerminalError("get_cursor_position:: Requires a terminal (TTY)"))
|
|
43
|
+
return pos
|
|
44
|
+
|
|
45
|
+
if is_debugging():
|
|
46
|
+
return pos
|
|
47
|
+
|
|
48
|
+
stdin = sys.stdin.fileno() # Get the stdin file descriptor.
|
|
49
|
+
attrs = termios.tcgetattr(stdin) # Save terminal attributes.
|
|
50
|
+
|
|
51
|
+
try:
|
|
52
|
+
tty.setcbreak(stdin, termios.TCSANOW)
|
|
53
|
+
sys.stdout.write(Vt100.get_cursor_pos())
|
|
54
|
+
sys.stdout.flush()
|
|
55
|
+
while not buf or buf[-1] != "R":
|
|
56
|
+
buf += sys.stdin.read(1)
|
|
57
|
+
if matches := re.match(r"^\x1b\[(\d*);(\d*)R", buf): # If the response is 'Esc[r;cR'
|
|
58
|
+
groups = matches.groups()
|
|
59
|
+
pos = int(groups[0]), int(groups[1])
|
|
60
|
+
finally:
|
|
61
|
+
termios.tcsetattr(stdin, termios.TCSANOW, attrs) # Reset terminal attributes
|
|
62
|
+
|
|
63
|
+
return pos
|
|
@@ -9,13 +9,14 @@ from hspylib.modules.cli.vt100.vt_100 import Vt100
|
|
|
9
9
|
from hspylib.modules.cli.vt100.vt_code import VtCode
|
|
10
10
|
from hspylib.modules.cli.vt100.vt_color import VtColor
|
|
11
11
|
|
|
12
|
-
from clitt.core.
|
|
13
|
-
from clitt.core.tty.tty_types import POSITION, MOVE_DIRECTION, ERASE_DIRECTION
|
|
12
|
+
from clitt.core.term.commons import POSITION, MOVE_DIRECTION, ERASE_DIRECTION, get_cursor_position
|
|
14
13
|
|
|
15
14
|
|
|
16
15
|
class Cursor(metaclass=Singleton):
|
|
17
16
|
"""Provide a base class for the screen cursor."""
|
|
18
17
|
|
|
18
|
+
INSTANCE = None
|
|
19
|
+
|
|
19
20
|
CURSOR_HOME = 1, 1
|
|
20
21
|
|
|
21
22
|
class Direction(Enumeration):
|
|
@@ -28,7 +29,7 @@ class Cursor(metaclass=Singleton):
|
|
|
28
29
|
# fmt: on
|
|
29
30
|
|
|
30
31
|
def __init__(self):
|
|
31
|
-
self._position: POSITION =
|
|
32
|
+
self._position: POSITION = get_cursor_position() or self.CURSOR_HOME
|
|
32
33
|
self._bottom: POSITION = self.CURSOR_HOME
|
|
33
34
|
self._saved_attrs = self._position, self._bottom
|
|
34
35
|
|
|
@@ -91,7 +92,7 @@ class Cursor(metaclass=Singleton):
|
|
|
91
92
|
|
|
92
93
|
def track(self) -> POSITION:
|
|
93
94
|
"""Track the cursor position."""
|
|
94
|
-
self.position =
|
|
95
|
+
self.position = get_cursor_position() or self.position
|
|
95
96
|
return self.position
|
|
96
97
|
|
|
97
98
|
def write(self, obj: Any, end: str = "") -> POSITION:
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import atexit
|
|
2
1
|
import threading
|
|
3
2
|
from threading import Timer
|
|
4
3
|
from typing import Optional, List
|
|
@@ -7,9 +6,8 @@ from hspylib.core.enums.enumeration import Enumeration
|
|
|
7
6
|
from hspylib.core.metaclass.singleton import Singleton
|
|
8
7
|
from hspylib.core.tools.commons import sysout
|
|
9
8
|
|
|
10
|
-
from clitt.core.
|
|
11
|
-
from clitt.core.
|
|
12
|
-
from clitt.core.tty.tty_types import DIMENSION, CB_RESIZE
|
|
9
|
+
from clitt.core.term.commons import DIMENSION, CB_RESIZE, get_dimensions
|
|
10
|
+
from clitt.core.term.cursor import Cursor
|
|
13
11
|
from clitt.core.tui.tui_preferences import TUIPreferences
|
|
14
12
|
|
|
15
13
|
|
|
@@ -28,14 +26,12 @@ class Screen(metaclass=Singleton):
|
|
|
28
26
|
# fmt: on
|
|
29
27
|
|
|
30
28
|
def __init__(self):
|
|
31
|
-
self._preferences: TUIPreferences = TUIPreferences.INSTANCE
|
|
32
|
-
self._dimension: DIMENSION =
|
|
33
|
-
self._cursor: Cursor = Cursor()
|
|
29
|
+
self._preferences: TUIPreferences = TUIPreferences.INSTANCE
|
|
30
|
+
self._dimension: DIMENSION = get_dimensions()
|
|
31
|
+
self._cursor: Cursor = Cursor.INSTANCE or Cursor()
|
|
34
32
|
self._resize_timer: Optional[Timer] = None
|
|
35
33
|
self._cb_watchers: List[CB_RESIZE] = []
|
|
36
34
|
self._alternate: bool = False
|
|
37
|
-
|
|
38
|
-
atexit.register(Terminal.exit)
|
|
39
35
|
self._resize_watcher()
|
|
40
36
|
|
|
41
37
|
def __str__(self):
|
|
@@ -78,8 +74,8 @@ class Screen(metaclass=Singleton):
|
|
|
78
74
|
self.cursor.track()
|
|
79
75
|
|
|
80
76
|
def clear(self) -> None:
|
|
81
|
-
"""Clear
|
|
82
|
-
|
|
77
|
+
"""Clear terminal and move the cursor to HOME position (0, 0)."""
|
|
78
|
+
sysout("%ED2%%HOM%", end="")
|
|
83
79
|
self.cursor.home()
|
|
84
80
|
|
|
85
81
|
def add_watcher(self, watcher: CB_RESIZE) -> None:
|
|
@@ -92,7 +88,7 @@ class Screen(metaclass=Singleton):
|
|
|
92
88
|
"""Add a watcher for screen resizes. If a resize is detected, the callback is called with the
|
|
93
89
|
new dimension."""
|
|
94
90
|
if self._cb_watchers and threading.main_thread().is_alive():
|
|
95
|
-
dimension: DIMENSION =
|
|
91
|
+
dimension: DIMENSION = get_dimensions()
|
|
96
92
|
self._resize_timer = Timer(self.RESIZE_WATCH_INTERVAL, self._resize_watcher)
|
|
97
93
|
if dimension != self._dimension:
|
|
98
94
|
list(map(lambda cb_w: cb_w(), self._cb_watchers))
|
|
@@ -12,42 +12,37 @@
|
|
|
12
12
|
|
|
13
13
|
Copyright 2023, HsPyLib team
|
|
14
14
|
"""
|
|
15
|
+
import atexit
|
|
15
16
|
import logging as log
|
|
16
17
|
import os
|
|
17
18
|
import platform
|
|
18
|
-
import re
|
|
19
19
|
import select
|
|
20
20
|
import shlex
|
|
21
21
|
import signal
|
|
22
22
|
import subprocess
|
|
23
23
|
import sys
|
|
24
|
-
import
|
|
25
|
-
import tty
|
|
26
|
-
from abc import ABC
|
|
27
|
-
from shutil import get_terminal_size
|
|
28
|
-
from typing import Optional, Tuple
|
|
24
|
+
from typing import Optional, Tuple, Any
|
|
29
25
|
|
|
30
26
|
from hspylib.core.enums.charset import Charset
|
|
31
27
|
from hspylib.core.exception.exceptions import NotATerminalError
|
|
32
|
-
from hspylib.core.
|
|
28
|
+
from hspylib.core.metaclass.singleton import Singleton
|
|
33
29
|
from hspylib.core.tools.commons import sysout
|
|
34
30
|
from hspylib.modules.application.exit_status import ExitStatus
|
|
35
31
|
from hspylib.modules.cli.keyboard import Keyboard
|
|
36
32
|
from hspylib.modules.cli.vt100.vt_100 import Vt100
|
|
37
33
|
|
|
34
|
+
from clitt.core.term.screen import Screen
|
|
38
35
|
|
|
39
|
-
|
|
36
|
+
|
|
37
|
+
class Terminal(metaclass=Singleton):
|
|
40
38
|
"""Utility class to provide terminal features."""
|
|
41
39
|
|
|
40
|
+
INSTANCE = None
|
|
41
|
+
|
|
42
42
|
@staticmethod
|
|
43
43
|
def is_a_tty() -> bool:
|
|
44
44
|
return sys.stdout.isatty()
|
|
45
45
|
|
|
46
|
-
@staticmethod
|
|
47
|
-
def clear() -> None:
|
|
48
|
-
"""Clear terminal and move the cursor to HOME position (0, 0)."""
|
|
49
|
-
sysout("%ED2%%HOM%", end="")
|
|
50
|
-
|
|
51
46
|
@staticmethod
|
|
52
47
|
def shell_exec(cmd_line: str, **kwargs) -> Tuple[Optional[str], ExitStatus]:
|
|
53
48
|
"""Execute command with arguments and return it's run status."""
|
|
@@ -102,63 +97,12 @@ class Terminal(ABC):
|
|
|
102
97
|
else:
|
|
103
98
|
raise NotImplementedError(f"OS '{my_os}' is not supported")
|
|
104
99
|
|
|
105
|
-
@classmethod
|
|
106
|
-
def exit(
|
|
107
|
-
cls,
|
|
108
|
-
exit_msg: str | None = "") -> None:
|
|
109
|
-
"""Exit the application. Commonly called by hooked signals.
|
|
110
|
-
:param exit_msg: the exiting message to be displayed.
|
|
111
|
-
"""
|
|
112
|
-
cls.restore()
|
|
113
|
-
sysout(f"%MOD(0)%" f"{exit_msg}")
|
|
114
|
-
|
|
115
100
|
@classmethod
|
|
116
101
|
def restore(cls) -> None:
|
|
117
102
|
"""Clear the terminal and restore default attributes [wrap,cursor,echo]."""
|
|
103
|
+
sysout("%MOD(0)%")
|
|
118
104
|
cls.set_attributes(show_cursor=True, auto_wrap=True, enable_echo=True)
|
|
119
105
|
|
|
120
|
-
@classmethod
|
|
121
|
-
def get_dimensions(cls, fallback: Tuple[int, int] = (24, 80)) -> Tuple[int, int]:
|
|
122
|
-
"""Retrieve the size of the terminal.
|
|
123
|
-
:return lines, columns
|
|
124
|
-
"""
|
|
125
|
-
if not sys.stdout.isatty():
|
|
126
|
-
log.error(NotATerminalError("screen_size:: Requires a terminal (TTY)"))
|
|
127
|
-
return fallback
|
|
128
|
-
dim = get_terminal_size((fallback[1], fallback[0]))
|
|
129
|
-
return dim.lines, dim.columns
|
|
130
|
-
|
|
131
|
-
@classmethod
|
|
132
|
-
def get_cursor_position(cls, fallback: Tuple[int, int] = (0, 0)) -> Tuple[int, int]:
|
|
133
|
-
"""Get the terminal cursor position.
|
|
134
|
-
:return line, column
|
|
135
|
-
"""
|
|
136
|
-
pos, buf = fallback, ""
|
|
137
|
-
|
|
138
|
-
if not cls.is_a_tty():
|
|
139
|
-
log.error(NotATerminalError("get_cursor_position:: Requires a terminal (TTY)"))
|
|
140
|
-
return pos
|
|
141
|
-
|
|
142
|
-
if is_debugging():
|
|
143
|
-
return pos
|
|
144
|
-
|
|
145
|
-
stdin = sys.stdin.fileno() # Get the stdin file descriptor.
|
|
146
|
-
attrs = termios.tcgetattr(stdin) # Save terminal attributes.
|
|
147
|
-
|
|
148
|
-
try:
|
|
149
|
-
tty.setcbreak(stdin, termios.TCSANOW)
|
|
150
|
-
sys.stdout.write(Vt100.get_cursor_pos())
|
|
151
|
-
sys.stdout.flush()
|
|
152
|
-
while not buf or buf[-1] != "R":
|
|
153
|
-
buf += sys.stdin.read(1)
|
|
154
|
-
if matches := re.match(r"^\x1b\[(\d*);(\d*)R", buf): # If the response is 'Esc[r;cR'
|
|
155
|
-
groups = matches.groups()
|
|
156
|
-
pos = int(groups[0]), int(groups[1])
|
|
157
|
-
finally:
|
|
158
|
-
termios.tcsetattr(stdin, termios.TCSANOW, attrs) # Reset terminal attributes
|
|
159
|
-
|
|
160
|
-
return pos
|
|
161
|
-
|
|
162
106
|
@classmethod
|
|
163
107
|
def set_enable_echo(cls, enabled: bool = True) -> None:
|
|
164
108
|
"""Enable echo in the terminal.
|
|
@@ -206,3 +150,18 @@ class Terminal(ABC):
|
|
|
206
150
|
cls.set_auto_wrap(auto_wrap)
|
|
207
151
|
if show_cursor is not None:
|
|
208
152
|
cls.set_show_cursor(show_cursor)
|
|
153
|
+
|
|
154
|
+
def __init__(self):
|
|
155
|
+
self._screen = Screen.INSTANCE or Screen()
|
|
156
|
+
atexit.register(self.restore)
|
|
157
|
+
|
|
158
|
+
@property
|
|
159
|
+
def screen(self) -> Screen:
|
|
160
|
+
return self._screen
|
|
161
|
+
|
|
162
|
+
def echo(self, obj: Any, end=os.linesep) -> None:
|
|
163
|
+
"""Write the string representation of the object to the screen."""
|
|
164
|
+
self.screen.cursor.write(obj, end=end)
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
assert Terminal().INSTANCE is not None, "Failed to create Terminal instance"
|
clitt/core/tui/__init__.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# _*_ coding: utf-8 _*_
|
|
2
2
|
#
|
|
3
|
-
# hspylib-clitt v0.9.
|
|
3
|
+
# hspylib-clitt v0.9.49
|
|
4
4
|
#
|
|
5
5
|
# Package: main.clitt.core.tui
|
|
6
6
|
"""Package initialization."""
|
|
@@ -16,4 +16,4 @@ __all__ = [
|
|
|
16
16
|
'tui_component',
|
|
17
17
|
'tui_preferences'
|
|
18
18
|
]
|
|
19
|
-
__version__ = '0.9.
|
|
19
|
+
__version__ = '0.9.49'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# _*_ coding: utf-8 _*_
|
|
2
2
|
#
|
|
3
|
-
# hspylib-clitt v0.9.
|
|
3
|
+
# hspylib-clitt v0.9.49
|
|
4
4
|
#
|
|
5
5
|
# Package: main.clitt.core.tui.mchoose
|
|
6
6
|
"""Package initialization."""
|
|
@@ -9,4 +9,4 @@ __all__ = [
|
|
|
9
9
|
'mchoose',
|
|
10
10
|
'menu_choose'
|
|
11
11
|
]
|
|
12
|
-
__version__ = '0.9.
|
|
12
|
+
__version__ = '0.9.49'
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
Copyright 2023, HsPyLib team
|
|
14
14
|
"""
|
|
15
15
|
from clitt.core.icons.font_awesome.nav_icons import NavIcons
|
|
16
|
-
from clitt.core.
|
|
17
|
-
from clitt.core.
|
|
16
|
+
from clitt.core.term.cursor import Cursor
|
|
17
|
+
from clitt.core.term.screen import Screen
|
|
18
18
|
from clitt.core.tui.tui_component import TUIComponent
|
|
19
19
|
from functools import cached_property
|
|
20
20
|
from hspylib.modules.cli.keyboard import Keyboard
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# _*_ coding: utf-8 _*_
|
|
2
2
|
#
|
|
3
|
-
# hspylib-clitt v0.9.
|
|
3
|
+
# hspylib-clitt v0.9.49
|
|
4
4
|
#
|
|
5
5
|
# Package: main.clitt.core.tui.mdashboard
|
|
6
6
|
"""Package initialization."""
|
|
@@ -11,4 +11,4 @@ __all__ = [
|
|
|
11
11
|
'mdashboard',
|
|
12
12
|
'menu_dashboard'
|
|
13
13
|
]
|
|
14
|
-
__version__ = '0.9.
|
|
14
|
+
__version__ = '0.9.49'
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
Copyright 2023, HsPyLib team
|
|
14
14
|
"""
|
|
15
15
|
from clitt.core.icons.font_awesome.nav_icons import NavIcons
|
|
16
|
-
from clitt.core.
|
|
17
|
-
from clitt.core.
|
|
16
|
+
from clitt.core.term.cursor import Cursor
|
|
17
|
+
from clitt.core.term.screen import Screen
|
|
18
18
|
from clitt.core.tui.mdashboard.dashboard_builder import DashboardBuilder
|
|
19
19
|
from clitt.core.tui.mdashboard.dashboard_item import DashboardItem
|
|
20
20
|
from clitt.core.tui.tui_component import TUIComponent
|
clitt/core/tui/menu/__init__.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# _*_ coding: utf-8 _*_
|
|
2
2
|
#
|
|
3
|
-
# hspylib-clitt v0.9.
|
|
3
|
+
# hspylib-clitt v0.9.49
|
|
4
4
|
#
|
|
5
5
|
# Package: main.clitt.core.tui.menu
|
|
6
6
|
"""Package initialization."""
|
|
@@ -13,4 +13,4 @@ __all__ = [
|
|
|
13
13
|
'tui_menu_ui',
|
|
14
14
|
'tui_menu_view'
|
|
15
15
|
]
|
|
16
|
-
__version__ = '0.9.
|
|
16
|
+
__version__ = '0.9.49'
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"""
|
|
15
15
|
|
|
16
16
|
from clitt.core.icons.font_awesome.nav_icons import NavIcons
|
|
17
|
-
from clitt.core.
|
|
18
|
-
from clitt.core.
|
|
17
|
+
from clitt.core.term.cursor import Cursor
|
|
18
|
+
from clitt.core.term.screen import Screen
|
|
19
19
|
from clitt.core.tui.menu.tui_menu import TUIMenu
|
|
20
20
|
from clitt.core.tui.menu.tui_menu_ui import TUIMenuUi
|
|
21
21
|
from functools import cached_property
|
|
@@ -12,8 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
Copyright 2023, HsPyLib team
|
|
14
14
|
"""
|
|
15
|
-
from clitt.core.
|
|
16
|
-
from clitt.core.tty.screen import Screen
|
|
15
|
+
from clitt.core.term.terminal import Terminal
|
|
17
16
|
from clitt.core.tui.menu.tui_menu import TUIMenu
|
|
18
17
|
from clitt.core.tui.tui_preferences import TUIPreferences
|
|
19
18
|
from hspylib.core.metaclass.singleton import Singleton
|
|
@@ -28,9 +27,9 @@ class TUIMenuUi(metaclass=Singleton):
|
|
|
28
27
|
APP_TITLE = "Main Menu"
|
|
29
28
|
|
|
30
29
|
# fmt: off
|
|
31
|
-
PREFS = TUIPreferences.INSTANCE
|
|
30
|
+
PREFS = TUIPreferences.INSTANCE
|
|
32
31
|
|
|
33
|
-
SCREEN =
|
|
32
|
+
SCREEN = Terminal.INSTANCE.screen
|
|
34
33
|
|
|
35
34
|
MENU_LINE = f"{'--' * PREFS.title_line_length}"
|
|
36
35
|
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
Copyright 2023, HsPyLib team
|
|
14
14
|
"""
|
|
15
|
-
from clitt.core.
|
|
15
|
+
from clitt.core.term.cursor import Cursor
|
|
16
16
|
from clitt.core.tui.menu.tui_menu import ON_TRIGGER_CB, TUIMenu
|
|
17
17
|
from clitt.core.tui.menu.tui_menu_ui import TUIMenuUi
|
|
18
18
|
from typing import Callable, Optional
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# _*_ coding: utf-8 _*_
|
|
2
2
|
#
|
|
3
|
-
# hspylib-clitt v0.9.
|
|
3
|
+
# hspylib-clitt v0.9.49
|
|
4
4
|
#
|
|
5
5
|
# Package: main.clitt.core.tui.minput
|
|
6
6
|
"""Package initialization."""
|
|
@@ -16,4 +16,4 @@ __all__ = [
|
|
|
16
16
|
'minput',
|
|
17
17
|
'minput_utils'
|
|
18
18
|
]
|
|
19
|
-
__version__ = '0.9.
|
|
19
|
+
__version__ = '0.9.49'
|
|
@@ -23,8 +23,9 @@ from hspylib.modules.cli.keyboard import Keyboard
|
|
|
23
23
|
|
|
24
24
|
from clitt.core.icons.font_awesome.form_icons import FormIcons
|
|
25
25
|
from clitt.core.icons.font_awesome.nav_icons import NavIcons
|
|
26
|
-
from clitt.core.
|
|
27
|
-
from clitt.core.
|
|
26
|
+
from clitt.core.term.commons import get_cursor_position
|
|
27
|
+
from clitt.core.term.cursor import Cursor
|
|
28
|
+
from clitt.core.term.terminal import Terminal
|
|
28
29
|
from clitt.core.tui.minput.form_builder import FormBuilder
|
|
29
30
|
from clitt.core.tui.minput.form_field import FormField
|
|
30
31
|
from clitt.core.tui.minput.input_type import InputType
|
|
@@ -267,7 +268,7 @@ class MenuInput(TUIComponent):
|
|
|
267
268
|
:param field_index: the current form field index.
|
|
268
269
|
:param field_size: the form field length.
|
|
269
270
|
"""
|
|
270
|
-
if f_pos :=
|
|
271
|
+
if f_pos := get_cursor_position() \
|
|
271
272
|
if self.positions[field_index] == (0, 0) \
|
|
272
273
|
else self.positions[field_index]:
|
|
273
274
|
self.positions[field_index] = f_pos
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# _*_ coding: utf-8 _*_
|
|
2
2
|
#
|
|
3
|
-
# hspylib-clitt v0.9.
|
|
3
|
+
# hspylib-clitt v0.9.49
|
|
4
4
|
#
|
|
5
5
|
# Package: main.clitt.core.tui.mselect
|
|
6
6
|
"""Package initialization."""
|
|
@@ -9,4 +9,4 @@ __all__ = [
|
|
|
9
9
|
'menu_select',
|
|
10
10
|
'mselect'
|
|
11
11
|
]
|
|
12
|
-
__version__ = '0.9.
|
|
12
|
+
__version__ = '0.9.49'
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
Copyright 2023, HsPyLib team
|
|
14
14
|
"""
|
|
15
15
|
from clitt.core.icons.font_awesome.nav_icons import NavIcons
|
|
16
|
-
from clitt.core.
|
|
17
|
-
from clitt.core.
|
|
16
|
+
from clitt.core.term.cursor import Cursor
|
|
17
|
+
from clitt.core.term.screen import Screen
|
|
18
18
|
from clitt.core.tui.tui_component import TUIComponent
|
|
19
19
|
from functools import cached_property
|
|
20
20
|
from hspylib.modules.cli.keyboard import Keyboard
|
clitt/core/tui/table/__init__.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# _*_ coding: utf-8 _*_
|
|
2
2
|
#
|
|
3
|
-
# hspylib-clitt v0.9.
|
|
3
|
+
# hspylib-clitt v0.9.49
|
|
4
4
|
#
|
|
5
5
|
# Package: main.clitt.core.tui.table
|
|
6
6
|
"""Package initialization."""
|
|
@@ -9,4 +9,4 @@ __all__ = [
|
|
|
9
9
|
'table_enums',
|
|
10
10
|
'table_renderer'
|
|
11
11
|
]
|
|
12
|
-
__version__ = '0.9.
|
|
12
|
+
__version__ = '0.9.49'
|
|
@@ -12,16 +12,16 @@
|
|
|
12
12
|
|
|
13
13
|
Copyright 2023, HsPyLib team
|
|
14
14
|
"""
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
from
|
|
15
|
+
import csv
|
|
16
|
+
import os
|
|
17
|
+
from typing import Any, Callable, Iterable, List
|
|
18
|
+
|
|
18
19
|
from hspylib.core.preconditions import check_argument
|
|
19
20
|
from hspylib.core.tools.commons import file_is_not_empty
|
|
20
21
|
from hspylib.core.tools.text_tools import elide_text, ensure_endswith
|
|
21
|
-
from typing import Any, Callable, Iterable, List
|
|
22
22
|
|
|
23
|
-
import
|
|
24
|
-
import
|
|
23
|
+
from clitt.core.term.terminal import Terminal
|
|
24
|
+
from clitt.core.tui.table.table_enums import TextAlignment, TextCase
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
class TableRenderer:
|
|
@@ -57,7 +57,7 @@ class TableRenderer:
|
|
|
57
57
|
:param caption: table caption to be displayed.
|
|
58
58
|
"""
|
|
59
59
|
|
|
60
|
-
self.
|
|
60
|
+
self._terminal = Terminal.INSTANCE
|
|
61
61
|
self._headers = headers
|
|
62
62
|
self._columns = range(len(self._headers))
|
|
63
63
|
self._data = data if data else []
|
|
@@ -78,12 +78,8 @@ class TableRenderer:
|
|
|
78
78
|
self.adjust_auto_fit()
|
|
79
79
|
|
|
80
80
|
@property
|
|
81
|
-
def
|
|
82
|
-
return self.
|
|
83
|
-
|
|
84
|
-
@property
|
|
85
|
-
def cursor(self) -> Cursor:
|
|
86
|
-
return self.screen.cursor
|
|
81
|
+
def terminal(self) -> Terminal:
|
|
82
|
+
return self._terminal
|
|
87
83
|
|
|
88
84
|
@property
|
|
89
85
|
def data(self) -> Iterable:
|
|
@@ -195,7 +191,7 @@ class TableRenderer:
|
|
|
195
191
|
|
|
196
192
|
def _display_data(self, data: Any) -> None:
|
|
197
193
|
"""Print out data into the screen."""
|
|
198
|
-
self.cursor.writeln(data)
|
|
194
|
+
self.terminal.cursor.writeln(data)
|
|
199
195
|
|
|
200
196
|
def _format_header_row(self) -> str:
|
|
201
197
|
"""Format the table header using the defined preferences."""
|
|
@@ -20,8 +20,9 @@ from hspylib.modules.application.application import Application
|
|
|
20
20
|
from hspylib.modules.application.exit_status import ExitStatus
|
|
21
21
|
from hspylib.modules.application.version import Version
|
|
22
22
|
|
|
23
|
-
from clitt.core.
|
|
24
|
-
from clitt.core.
|
|
23
|
+
from clitt.core.term.cursor import Cursor
|
|
24
|
+
from clitt.core.term.screen import Screen
|
|
25
|
+
from clitt.core.term.terminal import Terminal
|
|
25
26
|
|
|
26
27
|
|
|
27
28
|
class TUIApplication(Application, metaclass=AbstractSingleton):
|
|
@@ -38,16 +39,20 @@ class TUIApplication(Application, metaclass=AbstractSingleton):
|
|
|
38
39
|
log_dir: str = None):
|
|
39
40
|
|
|
40
41
|
super().__init__(name, version, description, usage, epilog, resource_dir, log_dir)
|
|
41
|
-
self.
|
|
42
|
+
self._terminal = Terminal.INSTANCE
|
|
42
43
|
self._app_name = os.path.basename(sys.argv[0]) if name is None else name
|
|
43
44
|
|
|
45
|
+
@property
|
|
46
|
+
def terminal(self) -> Terminal():
|
|
47
|
+
return self._terminal
|
|
48
|
+
|
|
44
49
|
@property
|
|
45
50
|
def screen(self) -> Screen():
|
|
46
|
-
return self.
|
|
51
|
+
return self.terminal.screen
|
|
47
52
|
|
|
48
53
|
@property
|
|
49
54
|
def cursor(self) -> Cursor:
|
|
50
|
-
return self.
|
|
55
|
+
return self.terminal.cursor
|
|
51
56
|
|
|
52
57
|
def _setup_arguments(self) -> None:
|
|
53
58
|
pass
|
|
@@ -58,3 +63,4 @@ class TUIApplication(Application, metaclass=AbstractSingleton):
|
|
|
58
63
|
def _cleanup(self) -> None:
|
|
59
64
|
if self.screen.alternate and self._exit_code == ExitStatus.SUCCESS:
|
|
60
65
|
self.screen.alternate = not self.screen.alternate
|
|
66
|
+
self.terminal.restore()
|
clitt/core/tui/tui_component.py
CHANGED
|
@@ -19,9 +19,9 @@ from hspylib.core.tools.text_tools import elide_text
|
|
|
19
19
|
from hspylib.modules.cli.keyboard import Keyboard
|
|
20
20
|
|
|
21
21
|
from clitt.core.icons.font_awesome.awesome import Awesome
|
|
22
|
-
from clitt.core.
|
|
23
|
-
from clitt.core.
|
|
24
|
-
from clitt.core.
|
|
22
|
+
from clitt.core.term.terminal import Terminal
|
|
23
|
+
from clitt.core.term.cursor import Cursor
|
|
24
|
+
from clitt.core.term.screen import Screen
|
|
25
25
|
from clitt.core.tui.tui_preferences import TUIPreferences
|
|
26
26
|
|
|
27
27
|
T = TypeVar("T", bound=Any)
|
|
@@ -34,7 +34,19 @@ class TUIComponent(ABC):
|
|
|
34
34
|
self._re_render = True
|
|
35
35
|
self._done = False
|
|
36
36
|
self._title = title
|
|
37
|
-
self.
|
|
37
|
+
self._terminal = Terminal.INSTANCE
|
|
38
|
+
|
|
39
|
+
@property
|
|
40
|
+
def terminal(self) -> Terminal:
|
|
41
|
+
return self._terminal
|
|
42
|
+
|
|
43
|
+
@property
|
|
44
|
+
def screen(self) -> Screen:
|
|
45
|
+
return self.terminal.screen
|
|
46
|
+
|
|
47
|
+
@property
|
|
48
|
+
def cursor(self) -> Cursor:
|
|
49
|
+
return self.terminal.screen.cursor
|
|
38
50
|
|
|
39
51
|
@property
|
|
40
52
|
def title(self) -> str:
|
|
@@ -42,28 +54,20 @@ class TUIComponent(ABC):
|
|
|
42
54
|
|
|
43
55
|
@property
|
|
44
56
|
def rows(self) -> int:
|
|
45
|
-
return self.
|
|
57
|
+
return self.screen.lines
|
|
46
58
|
|
|
47
59
|
@property
|
|
48
60
|
def columns(self) -> int:
|
|
49
|
-
return self.
|
|
61
|
+
return self.screen.columns
|
|
50
62
|
|
|
51
63
|
@property
|
|
52
64
|
def prefs(self) -> TUIPreferences:
|
|
53
65
|
return self.screen.preferences
|
|
54
66
|
|
|
55
|
-
@property
|
|
56
|
-
def screen(self) -> Screen:
|
|
57
|
-
return self._screen
|
|
58
|
-
|
|
59
|
-
@property
|
|
60
|
-
def cursor(self) -> Cursor:
|
|
61
|
-
return self._screen.cursor
|
|
62
|
-
|
|
63
67
|
def _prepare_render(self, auto_wrap: bool = False, show_cursor: bool = False) -> None:
|
|
64
68
|
"""Prepare the screen for renderization."""
|
|
65
69
|
|
|
66
|
-
self.
|
|
70
|
+
self.screen.add_watcher(self.invalidate)
|
|
67
71
|
Terminal.set_auto_wrap(auto_wrap)
|
|
68
72
|
Terminal.set_show_cursor(show_cursor)
|
|
69
73
|
self.screen.clear()
|
|
@@ -121,11 +125,11 @@ class TUIComponent(ABC):
|
|
|
121
125
|
|
|
122
126
|
def write(self, obj: Any) -> None:
|
|
123
127
|
"""Write the string representation of the object to the screen."""
|
|
124
|
-
self.
|
|
128
|
+
self.terminal.echo(obj, end='')
|
|
125
129
|
|
|
126
130
|
def writeln(self, obj: Any) -> None:
|
|
127
131
|
"""Write the string representation of the object to the screen, appending a new line."""
|
|
128
|
-
self.
|
|
132
|
+
self.terminal.echo(obj)
|
|
129
133
|
|
|
130
134
|
def invalidate(self) -> None:
|
|
131
135
|
"""Invalidate current TUI renderization."""
|
clitt/utils/__init__.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: hspylib-clitt
|
|
3
|
-
Version: 0.9.
|
|
3
|
+
Version: 0.9.49
|
|
4
4
|
Summary: HsPyLib - CLI Terminal Tools
|
|
5
5
|
Home-page: https://github.com/yorevs/hspylib
|
|
6
6
|
Author: Hugo Saporetti Junior
|
|
@@ -31,7 +31,7 @@ Requires-Dist: hspylib
|
|
|
31
31
|
## Create professional CLI applications
|
|
32
32
|
|
|
33
33
|
[](LICENSE.md)
|
|
34
|
-
[](CHANGELOG.md#unreleased)
|
|
35
35
|
[](https://pypi.org/project/hspylib-clitt)
|
|
36
36
|
[](https://github.com/yorevs/hspylib)
|
|
37
37
|
[](https://gitter.im/hspylib/community)
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
clitt/.version,sha256=
|
|
2
|
-
clitt/__classpath__.py,sha256=
|
|
3
|
-
clitt/__init__.py,sha256=
|
|
1
|
+
clitt/.version,sha256=nXsDUfbzDS0aU_dlHV4FIbcc8707B-Ug0dC-TYatR7Y,7
|
|
2
|
+
clitt/__classpath__.py,sha256=kYZgQkSaFnCHBKz_NslH61gm2jUygluqiILe29MTVSo,784
|
|
3
|
+
clitt/__init__.py,sha256=hx5zMi2l4rcbIUAFXjFa5Br0WFf6B3sRoam6VUeDGfk,176
|
|
4
4
|
clitt/__main__.py,sha256=GZV_8hSXmN7HCGVtwduLh08vYgj2Moqz6O0Orj-KjNc,5328
|
|
5
5
|
clitt/welcome.txt,sha256=z72ySJw-1VQHvWmd8pZ95P6t4zEkIWGbqTRT83P2hJw,169
|
|
6
|
-
clitt/addons/__init__.py,sha256=
|
|
7
|
-
clitt/addons/appman/__init__.py,sha256=
|
|
8
|
-
clitt/addons/appman/appman.py,sha256=
|
|
6
|
+
clitt/addons/__init__.py,sha256=FCVR5R9DzTIcJgW0Nvpwn_EWA_tTLAyAYGMiNbDmONI,173
|
|
7
|
+
clitt/addons/appman/__init__.py,sha256=YNzPeptzkZ52jyjZDvfBCyHsz1ZlXplbhb7dGaeVKsQ,202
|
|
8
|
+
clitt/addons/appman/appman.py,sha256=lZGOU0A-2SDXj6DG9QfNE3whPb_qFCqbs7m7Vve2meY,13146
|
|
9
9
|
clitt/addons/appman/appman_enums.py,sha256=vBCmCSGYfVY1VwyEAw9UzbcvNkZSGvHtlUhBBMgcDz0,872
|
|
10
|
-
clitt/addons/appman/templates/__init__.py,sha256=
|
|
10
|
+
clitt/addons/appman/templates/__init__.py,sha256=0Ym4ZNfzH_RBozMLqS7dxZCoL51d3PWAHY8gva4vI7o,169
|
|
11
11
|
clitt/addons/appman/templates/build.gradle.tpl,sha256=VQKs4r41xPr7P14PtQPt3alYCmNuXaGraaXbKB_FKkM,1817
|
|
12
12
|
clitt/addons/appman/templates/classpath.py.tpl,sha256=R60uLvVxeJ7nJCXCvav_9LAnDe5VOfJqWO-T1QAlwAc,397
|
|
13
13
|
clitt/addons/appman/templates/dependencies.hspd.tpl,sha256=bbVNU6XBm5QT28lvH7Bp_4nlXvoD-LwX5kGQ-CPhOEA,764
|
|
@@ -20,21 +20,21 @@ clitt/addons/appman/templates/run.sh.tpl,sha256=2xpuHjZP9-7j14dAA2CqPm4G2xtnuenf
|
|
|
20
20
|
clitt/addons/appman/templates/test_main.py.tpl,sha256=x_xuKy2O2b1bs6tuzOUqF5shnx-2-EfFRc7sBV4Fndc,1239
|
|
21
21
|
clitt/addons/appman/templates/usage.txt.tpl,sha256=R0e48HCeD7PDbWnX6HGIjz6gr_hBdp-zK6V42U1Aexw,217
|
|
22
22
|
clitt/addons/appman/templates/widget.py.tpl,sha256=JmlO5rh2ETCF5ldiB9MStfjB4oB4JLI8UUnNP5SAAcM,1668
|
|
23
|
-
clitt/addons/widman/__init__.py,sha256=
|
|
23
|
+
clitt/addons/widman/__init__.py,sha256=YOP97L-Nq5FDoWdMeTjfNDATmkSkZq4YeS_9OLBNFaU,213
|
|
24
24
|
clitt/addons/widman/widget.py,sha256=mIEB3Fs4ypaUMhh85meg2vMhKJVjW8Tyxkp_XqHIHtA,1920
|
|
25
25
|
clitt/addons/widman/widget_entry.py,sha256=8Shj4_esh6KN69usTrCcUsfGVas81Xz0QabsY_zV9o0,1350
|
|
26
26
|
clitt/addons/widman/widman.py,sha256=kfv3CcDSjUZglurPXa4Bv1jYELtEkbixOjpVL8yRf3M,5260
|
|
27
|
-
clitt/addons/widman/widgets/__init__.py,sha256=
|
|
27
|
+
clitt/addons/widman/widgets/__init__.py,sha256=1PnahR51qaL-gn43nDIJXVu9UY7s14ZUktWe5HpLaaE,244
|
|
28
28
|
clitt/addons/widman/widgets/widget_free.py,sha256=C5RNyItm_VVM8UlpzeC5mER6KTykJ0eIS3Q5H2bgSKw,3989
|
|
29
29
|
clitt/addons/widman/widgets/widget_punch.py,sha256=dUb3w2MEvcwilxZZYWQZirut0-thQZMwAzSa4904vqg,10522
|
|
30
30
|
clitt/addons/widman/widgets/widget_send_msg.py,sha256=MMBOGTBc6c3jgLgZBzbQIiQsSs5jl-8ohqy7evMSNQU,11056
|
|
31
31
|
clitt/addons/widman/widgets/widget_time_calc.py,sha256=JQOHRf5OFDL73Y-GJEWtdN5_s2vKR-9mX0yoisxNQRg,5100
|
|
32
|
-
clitt/core/__init__.py,sha256=
|
|
33
|
-
clitt/core/icons/__init__.py,sha256=
|
|
34
|
-
clitt/core/icons/emojis/__init__.py,sha256=
|
|
32
|
+
clitt/core/__init__.py,sha256=CRRpGei7AJ4DKshTVIdtwd7mpcsjD9wTIkcaqo4nlcg,178
|
|
33
|
+
clitt/core/icons/__init__.py,sha256=JPZAEu8_MEYYYFaeBajyEfm6mZWdJjtLcldSxjWJ4Bg,183
|
|
34
|
+
clitt/core/icons/emojis/__init__.py,sha256=GVgNY8BrfUTg5djdb7bKU3M44pNJhjX8qvUPUlrV0Mk,190
|
|
35
35
|
clitt/core/icons/emojis/emojis.py,sha256=LbwpjJonRlNVPa6eMEDTreQz1fmFfFK4dOk6X-4XHrI,1109
|
|
36
36
|
clitt/core/icons/emojis/face_smiling.py,sha256=qho6t7W3za6-H9bW51_0RoYKah_f0_DCJ0EiCiwvQwI,1269
|
|
37
|
-
clitt/core/icons/font_awesome/__init__.py,sha256=
|
|
37
|
+
clitt/core/icons/font_awesome/__init__.py,sha256=nqy_vFW3KoNczbQkh47vL3ScJNLpl_ot7xkVhzisK-k,288
|
|
38
38
|
clitt/core/icons/font_awesome/app_icons.py,sha256=cMPlXVWOn5YnLmlk20nwhFgA16Ug2jFiHZPYlwwH724,1662
|
|
39
39
|
clitt/core/icons/font_awesome/awesome.py,sha256=oEOi0DWj0yvJbmg18fXE5hgSrMmCckTYC0cbgw1cyQQ,1831
|
|
40
40
|
clitt/core/icons/font_awesome/control_icons.py,sha256=OuAnvXRIusxDRVnPHxltTn4V6tF_uc2gfoqoQWB7Bks,1075
|
|
@@ -42,49 +42,49 @@ clitt/core/icons/font_awesome/dashboard_icons.py,sha256=MGXLJ-I_xXalOaLeWHkaZe5Z
|
|
|
42
42
|
clitt/core/icons/font_awesome/form_icons.py,sha256=mDF_0nFJ9VYO2ZoXWSTETm7qEd03dcIgeCUpFnH0sLI,2314
|
|
43
43
|
clitt/core/icons/font_awesome/nav_icons.py,sha256=A3GqJuwD-RKybY67THimI1oqcNlDSEaA_Hdy8LSzfqo,1105
|
|
44
44
|
clitt/core/icons/font_awesome/widget_icons.py,sha256=Oho4jPezyMSw-tKWSjpdK3dv-FK2GC_62liNeThhhAs,1024
|
|
45
|
-
clitt/core/
|
|
46
|
-
clitt/core/
|
|
47
|
-
clitt/core/
|
|
48
|
-
clitt/core/
|
|
49
|
-
clitt/core/
|
|
50
|
-
clitt/core/tui/__init__.py,sha256=
|
|
51
|
-
clitt/core/tui/tui_application.py,sha256=
|
|
52
|
-
clitt/core/tui/tui_component.py,sha256=
|
|
53
|
-
clitt/core/tui/tui_preferences.py,sha256=
|
|
54
|
-
clitt/core/tui/mchoose/__init__.py,sha256=
|
|
45
|
+
clitt/core/term/__init__.py,sha256=hoVeNh9ej5SoOXeri_-AsPHzx9kR2s9NYoHwjvYYxI8,205
|
|
46
|
+
clitt/core/term/commons.py,sha256=qsE575i6VTehljHbezgQKJAu4hcoVz-D1kDhbes_elE,2055
|
|
47
|
+
clitt/core/term/cursor.py,sha256=2sWYzEdZmOn9j6ded21Jb_2NSYRA-eEmaQPk6ADL-nU,4822
|
|
48
|
+
clitt/core/term/screen.py,sha256=9su9S6kxSlgMt9VRCJh1tYFBADgs9lSZZ9aQig6ASYg,3090
|
|
49
|
+
clitt/core/term/terminal.py,sha256=GOBVKGB0Cs395U77DG1zIJTB5uoYd-K8DfB_R2meVkU,6383
|
|
50
|
+
clitt/core/tui/__init__.py,sha256=dYhsFg8AqBiTHui7b3abfYEgSQ52psxDKfz8DAar3_E,294
|
|
51
|
+
clitt/core/tui/tui_application.py,sha256=cMihfVoampEAdWqG-J8SA9uVeannJIDRomGK9g9dwYQ,1942
|
|
52
|
+
clitt/core/tui/tui_component.py,sha256=5xMzTvCmWodTng1URvL6fybcxmPracWz8b76vvcng_M,4770
|
|
53
|
+
clitt/core/tui/tui_preferences.py,sha256=N1HAbdz7q556iegqgwDhxQ2s6QNOoKTnIBsFCYWBwpQ,4803
|
|
54
|
+
clitt/core/tui/mchoose/__init__.py,sha256=cZ9qlcTGM910pzFAGwr748lMh9YBX8wbTsUsiomHatQ,189
|
|
55
55
|
clitt/core/tui/mchoose/mchoose.py,sha256=ZW7mr7WCP2Lc545PBy2-QRaUt6BNYP5cAwczooU86eU,1180
|
|
56
|
-
clitt/core/tui/mchoose/menu_choose.py,sha256=
|
|
57
|
-
clitt/core/tui/mdashboard/__init__.py,sha256=
|
|
56
|
+
clitt/core/tui/mchoose/menu_choose.py,sha256=C2si3HuytBqMwKibEUT6AB7VqNSCadbC8SqMcjwe5Ms,7022
|
|
57
|
+
clitt/core/tui/mdashboard/__init__.py,sha256=K-QsibNOgLpgxc6dxqSzDw1mVX3ziRysyARWQCF31ro,243
|
|
58
58
|
clitt/core/tui/mdashboard/dashboard_builder.py,sha256=wWcT1UyQnOrvalV920XtmBUg5lRVbhA8hMrmxRcLrtY,1658
|
|
59
59
|
clitt/core/tui/mdashboard/dashboard_item.py,sha256=4MK6bxROWo1ZK9FlMoSm38z0qe5HoxqH0W5tt3iUT5M,886
|
|
60
60
|
clitt/core/tui/mdashboard/mdashboard.py,sha256=juNPFzmoKQRJa2CZFxVZAFr2QXFna3cvsoYlFNaQjis,890
|
|
61
|
-
clitt/core/tui/mdashboard/menu_dashboard.py,sha256=
|
|
62
|
-
clitt/core/tui/menu/__init__.py,sha256=
|
|
61
|
+
clitt/core/tui/mdashboard/menu_dashboard.py,sha256=uUlWPr66h3sz-Qh8WiKcs4V9VXJdD6EzIheOwN0CZv8,5496
|
|
62
|
+
clitt/core/tui/menu/__init__.py,sha256=OUYmgDfEDTaViO2r4aeT59jbuRodrT-x-Yb8YMGhaO4,272
|
|
63
63
|
clitt/core/tui/menu/tui_menu.py,sha256=nAux3qJ6_kyvV6Z2IbIG6dS62zFfTo5qA4rB8cXAIYk,3593
|
|
64
64
|
clitt/core/tui/menu/tui_menu_action.py,sha256=AH7G3RHVRqcAUD0wHd_t6-vEOZoB0Xo5wtfS8ZBcDIM,1539
|
|
65
65
|
clitt/core/tui/menu/tui_menu_factory.py,sha256=rL33KX5yD2ppvVRAEFIAme5ka7GrBQecVr63aUf2hf0,4459
|
|
66
|
-
clitt/core/tui/menu/tui_menu_item.py,sha256=
|
|
67
|
-
clitt/core/tui/menu/tui_menu_ui.py,sha256=
|
|
68
|
-
clitt/core/tui/menu/tui_menu_view.py,sha256=
|
|
69
|
-
clitt/core/tui/minput/__init__.py,sha256=
|
|
66
|
+
clitt/core/tui/menu/tui_menu_item.py,sha256=EEaV09ZsSvspZAXrqzHHnhQdyyOVfmotC0m2mjyaRbg,7490
|
|
67
|
+
clitt/core/tui/menu/tui_menu_ui.py,sha256=R_Ov_NpCe9lGmzp2MqH0igD6jxIMN5uPqSrjAuDLvwo,3332
|
|
68
|
+
clitt/core/tui/menu/tui_menu_view.py,sha256=4HrwHcKuAyCx7npIy1ds5Jmvg8yIxndwq65wPUevn50,1926
|
|
69
|
+
clitt/core/tui/minput/__init__.py,sha256=tw_U2QhqUPpkKhS5u5RfO145ljlempXF1E3uzud0YMk,318
|
|
70
70
|
clitt/core/tui/minput/access_type.py,sha256=Dss6okfXHCoUI3_OOu2nKsgpy2NeStIwhdDvTR2z-2w,636
|
|
71
71
|
clitt/core/tui/minput/field_builder.py,sha256=5te6nDYHCa9VmzGK0b1lXRCc7n4GbMIVIR2InLdLzXg,4414
|
|
72
72
|
clitt/core/tui/minput/form_builder.py,sha256=CwUpswLD9rTCs3PXaOpu0bFKavHsbUkgs4OnQgbS-RQ,2865
|
|
73
73
|
clitt/core/tui/minput/form_field.py,sha256=5p-IT_2RgzkU4RfyXihrNdD9_yV4X5FqNgIckDE9zEQ,5766
|
|
74
74
|
clitt/core/tui/minput/input_type.py,sha256=O6-jk_QSjjRGeHsGVzIDZSCLg739f2xtnVV_ElcHYpA,722
|
|
75
75
|
clitt/core/tui/minput/input_validator.py,sha256=XjK9O435OIvuyAHAY7XJt_ELvJ-sJsWIO-jv6hVt2-c,3360
|
|
76
|
-
clitt/core/tui/minput/menu_input.py,sha256=
|
|
76
|
+
clitt/core/tui/minput/menu_input.py,sha256=reQsGdjiTRIPcwXUlG1A0pNstJXLjQxKtIW8fHdfyT8,12818
|
|
77
77
|
clitt/core/tui/minput/minput.py,sha256=20Vz-SRVaNuqYJrG6kdkdE4bVy_YNjXEcYaFEnRCqNQ,1532
|
|
78
|
-
clitt/core/tui/minput/minput_utils.py,sha256=
|
|
79
|
-
clitt/core/tui/mselect/__init__.py,sha256=
|
|
80
|
-
clitt/core/tui/mselect/menu_select.py,sha256=
|
|
78
|
+
clitt/core/tui/minput/minput_utils.py,sha256=2jjKFwO376OmyS5CWPGjT3QXdaN02Pq5eqfmRvWkKSw,5266
|
|
79
|
+
clitt/core/tui/mselect/__init__.py,sha256=pvbrl1L6mbhPPVW3I5ejCF5o4J8ejaCACGp7HGN1GVM,189
|
|
80
|
+
clitt/core/tui/mselect/menu_select.py,sha256=zb2GGcRVldzsdY54_rQZuYdqZ3CrqhLdjYNdpC4ZRWg,6184
|
|
81
81
|
clitt/core/tui/mselect/mselect.py,sha256=3Q4X2XMqhXCicO5XhDXsldn9m-1bWOQ9ez1MLMj8fps,1040
|
|
82
|
-
clitt/core/tui/table/__init__.py,sha256=
|
|
82
|
+
clitt/core/tui/table/__init__.py,sha256=LZLSa5r6Gwa6NLyPCzoEACJnWLjmQQYqlnXOqTEiY9g,194
|
|
83
83
|
clitt/core/tui/table/table_enums.py,sha256=gbA2e7kgpjLjL8oxbIGalcX-cyaXPfdXy01wzivqpWc,1183
|
|
84
|
-
clitt/core/tui/table/table_renderer.py,sha256=
|
|
85
|
-
clitt/utils/__init__.py,sha256=
|
|
84
|
+
clitt/core/tui/table/table_renderer.py,sha256=cFFm1peA3VoThI845qPqhz-62Oa3Ll4m3hLmYL4jHjA,9622
|
|
85
|
+
clitt/utils/__init__.py,sha256=woGidTyKxiECgDbtst-J2Uf0fGph6UzzrBqVwM9paJQ,162
|
|
86
86
|
clitt/utils/git_utils.py,sha256=avAsBjaG3jcBNsBvu5dcH99RERkZSY6cQXmJLYAOV8c,2386
|
|
87
|
-
hspylib_clitt-0.9.
|
|
88
|
-
hspylib_clitt-0.9.
|
|
89
|
-
hspylib_clitt-0.9.
|
|
90
|
-
hspylib_clitt-0.9.
|
|
87
|
+
hspylib_clitt-0.9.49.dist-info/METADATA,sha256=n24pW67P27qdcDSkOt3-KnNez7DnIr_jumPEVHeXHjY,1733
|
|
88
|
+
hspylib_clitt-0.9.49.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
|
|
89
|
+
hspylib_clitt-0.9.49.dist-info/top_level.txt,sha256=vrnpkFU7dZ-vH7x5xdcY1vJSuboTqPBUcc3jD6SJkAo,6
|
|
90
|
+
hspylib_clitt-0.9.49.dist-info/RECORD,,
|
clitt/core/tty/__init__.py
DELETED
clitt/core/tty/tty_types.py
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
from typing import TypeVar, Tuple, Callable, Union
|
|
2
|
-
|
|
3
|
-
DIMENSION = TypeVar("DIMENSION", bound=Tuple[int, int])
|
|
4
|
-
|
|
5
|
-
POSITION = TypeVar("POSITION", bound=Tuple[int, int])
|
|
6
|
-
|
|
7
|
-
CB_RESIZE = TypeVar("CB_RESIZE", bound=Callable[[None], None])
|
|
8
|
-
|
|
9
|
-
MOVE_DIRECTION = TypeVar("MOVE_DIRECTION", bound="Cursor.Direction")
|
|
10
|
-
|
|
11
|
-
ERASE_DIRECTION = TypeVar("ERASE_DIRECTION", bound=Union["Cursor.Direction", "Screen.Portion"])
|
|
File without changes
|
|
File without changes
|