hspylib-clitt 0.9.115__py3-none-any.whl → 0.9.117__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 +2 -2
- clitt/__init__.py +3 -3
- clitt/__main__.py +3 -3
- clitt/addons/__init__.py +3 -3
- clitt/addons/appman/__init__.py +3 -3
- clitt/addons/appman/templates/__init__.py +3 -3
- clitt/addons/appman/templates/main_qt_view.py.tpl +1 -1
- clitt/addons/widman/__init__.py +3 -3
- clitt/addons/widman/widgets/__init__.py +3 -3
- clitt/core/__init__.py +3 -3
- clitt/core/exception/__init__.py +3 -3
- clitt/core/icons/__init__.py +3 -3
- clitt/core/icons/emojis/__init__.py +3 -3
- clitt/core/icons/font_awesome/__init__.py +3 -3
- clitt/core/term/__init__.py +3 -3
- clitt/core/term/cursor.py +1 -1
- clitt/core/term/screen.py +1 -1
- clitt/core/term/terminal.py +2 -2
- clitt/core/tui/__init__.py +3 -3
- clitt/core/tui/line_input/__init__.py +3 -3
- clitt/core/tui/line_input/keyboard_input.py +34 -34
- clitt/core/tui/line_input/line_input.py +5 -13
- clitt/core/tui/mchoose/__init__.py +3 -3
- clitt/core/tui/mdashboard/__init__.py +3 -3
- clitt/core/tui/menu/__init__.py +3 -3
- clitt/core/tui/minput/__init__.py +3 -3
- clitt/core/tui/mselect/__init__.py +3 -3
- clitt/core/tui/table/__init__.py +3 -3
- clitt/core/tui/tui_application.py +11 -23
- clitt/core/tui/tui_preferences.py +1 -1
- clitt/utils/__init__.py +3 -3
- {hspylib_clitt-0.9.115.dist-info → hspylib_clitt-0.9.117.dist-info}/METADATA +2 -2
- hspylib_clitt-0.9.117.dist-info/RECORD +97 -0
- {hspylib_clitt-0.9.115.dist-info → hspylib_clitt-0.9.117.dist-info}/WHEEL +1 -1
- {hspylib_clitt-0.9.115.dist-info → hspylib_clitt-0.9.117.dist-info}/top_level.txt +0 -1
- build/lib/build/lib/clitt/__classpath__.py +0 -28
- build/lib/build/lib/clitt/__init__.py +0 -13
- build/lib/build/lib/clitt/__main__.py +0 -139
- build/lib/build/lib/clitt/addons/__init__.py +0 -12
- build/lib/build/lib/clitt/addons/appman/__init__.py +0 -13
- build/lib/build/lib/clitt/addons/appman/appman.py +0 -305
- build/lib/build/lib/clitt/addons/appman/appman_enums.py +0 -39
- build/lib/build/lib/clitt/addons/appman/templates/__init__.py +0 -11
- build/lib/build/lib/clitt/addons/widman/__init__.py +0 -14
- build/lib/build/lib/clitt/addons/widman/widget.py +0 -70
- build/lib/build/lib/clitt/addons/widman/widget_entry.py +0 -54
- build/lib/build/lib/clitt/addons/widman/widgets/__init__.py +0 -14
- build/lib/build/lib/clitt/addons/widman/widgets/widget_free.py +0 -110
- build/lib/build/lib/clitt/addons/widman/widgets/widget_punch.py +0 -246
- build/lib/build/lib/clitt/addons/widman/widgets/widget_send_msg.py +0 -272
- build/lib/build/lib/clitt/addons/widman/widgets/widget_time_calc.py +0 -146
- build/lib/build/lib/clitt/addons/widman/widman.py +0 -123
- build/lib/build/lib/clitt/core/__init__.py +0 -15
- build/lib/build/lib/clitt/core/exception/__init__.py +0 -11
- build/lib/build/lib/clitt/core/exception/exceptions.py +0 -18
- build/lib/build/lib/clitt/core/icons/__init__.py +0 -12
- build/lib/build/lib/clitt/core/icons/emojis/__init__.py +0 -12
- build/lib/build/lib/clitt/core/icons/emojis/emojis.py +0 -41
- build/lib/build/lib/clitt/core/icons/emojis/face_smiling.py +0 -40
- build/lib/build/lib/clitt/core/icons/font_awesome/__init__.py +0 -18
- build/lib/build/lib/clitt/core/icons/font_awesome/app_icons.py +0 -55
- build/lib/build/lib/clitt/core/icons/font_awesome/awesome.py +0 -76
- build/lib/build/lib/clitt/core/icons/font_awesome/dashboard_icons.py +0 -93
- build/lib/build/lib/clitt/core/icons/font_awesome/form_icons.py +0 -69
- build/lib/build/lib/clitt/core/icons/font_awesome/game_icons.py +0 -59
- build/lib/build/lib/clitt/core/icons/font_awesome/nav_icons.py +0 -42
- build/lib/build/lib/clitt/core/icons/font_awesome/trickplay_icons.py +0 -39
- build/lib/build/lib/clitt/core/icons/font_awesome/widget_icons.py +0 -37
- build/lib/build/lib/clitt/core/preferences.py +0 -87
- build/lib/build/lib/clitt/core/term/__init__.py +0 -14
- build/lib/build/lib/clitt/core/term/commons.py +0 -82
- build/lib/build/lib/clitt/core/term/cursor.py +0 -159
- build/lib/build/lib/clitt/core/term/screen.py +0 -91
- build/lib/build/lib/clitt/core/term/terminal.py +0 -203
- build/lib/build/lib/clitt/core/tui/__init__.py +0 -20
- build/lib/build/lib/clitt/core/tui/line_input/__init__.py +0 -12
- build/lib/build/lib/clitt/core/tui/line_input/keyboard_input.py +0 -228
- build/lib/build/lib/clitt/core/tui/line_input/line_input.py +0 -43
- build/lib/build/lib/clitt/core/tui/mchoose/__init__.py +0 -12
- build/lib/build/lib/clitt/core/tui/mchoose/mchoose.py +0 -44
- build/lib/build/lib/clitt/core/tui/mchoose/menu_choose.py +0 -200
- build/lib/build/lib/clitt/core/tui/mdashboard/__init__.py +0 -14
- build/lib/build/lib/clitt/core/tui/mdashboard/dashboard_builder.py +0 -54
- build/lib/build/lib/clitt/core/tui/mdashboard/dashboard_item.py +0 -31
- build/lib/build/lib/clitt/core/tui/mdashboard/mdashboard.py +0 -26
- build/lib/build/lib/clitt/core/tui/mdashboard/menu_dashboard.py +0 -154
- build/lib/build/lib/clitt/core/tui/menu/__init__.py +0 -16
- build/lib/build/lib/clitt/core/tui/menu/tui_menu.py +0 -111
- build/lib/build/lib/clitt/core/tui/menu/tui_menu_action.py +0 -47
- build/lib/build/lib/clitt/core/tui/menu/tui_menu_factory.py +0 -117
- build/lib/build/lib/clitt/core/tui/menu/tui_menu_item.py +0 -196
- build/lib/build/lib/clitt/core/tui/menu/tui_menu_ui.py +0 -98
- build/lib/build/lib/clitt/core/tui/menu/tui_menu_view.py +0 -57
- build/lib/build/lib/clitt/core/tui/minput/__init__.py +0 -19
- build/lib/build/lib/clitt/core/tui/minput/access_type.py +0 -26
- build/lib/build/lib/clitt/core/tui/minput/field_builder.py +0 -117
- build/lib/build/lib/clitt/core/tui/minput/form_builder.py +0 -72
- build/lib/build/lib/clitt/core/tui/minput/form_field.py +0 -180
- build/lib/build/lib/clitt/core/tui/minput/input_type.py +0 -30
- build/lib/build/lib/clitt/core/tui/minput/input_validator.py +0 -98
- build/lib/build/lib/clitt/core/tui/minput/menu_input.py +0 -292
- build/lib/build/lib/clitt/core/tui/minput/minput.py +0 -44
- build/lib/build/lib/clitt/core/tui/minput/minput_utils.py +0 -156
- build/lib/build/lib/clitt/core/tui/mselect/__init__.py +0 -12
- build/lib/build/lib/clitt/core/tui/mselect/menu_select.py +0 -171
- build/lib/build/lib/clitt/core/tui/mselect/mselect.py +0 -36
- build/lib/build/lib/clitt/core/tui/table/__init__.py +0 -12
- build/lib/build/lib/clitt/core/tui/table/table_enums.py +0 -47
- build/lib/build/lib/clitt/core/tui/table/table_renderer.py +0 -339
- build/lib/build/lib/clitt/core/tui/tui_application.py +0 -65
- build/lib/build/lib/clitt/core/tui/tui_component.py +0 -155
- build/lib/build/lib/clitt/core/tui/tui_preferences.py +0 -103
- build/lib/build/lib/clitt/utils/__init__.py +0 -11
- build/lib/build/lib/clitt/utils/git_utils.py +0 -66
- build/lib/clitt/__classpath__.py +0 -28
- build/lib/clitt/__init__.py +0 -13
- build/lib/clitt/__main__.py +0 -139
- build/lib/clitt/addons/__init__.py +0 -12
- build/lib/clitt/addons/appman/__init__.py +0 -13
- build/lib/clitt/addons/appman/appman.py +0 -305
- build/lib/clitt/addons/appman/appman_enums.py +0 -39
- build/lib/clitt/addons/appman/templates/__init__.py +0 -11
- build/lib/clitt/addons/widman/__init__.py +0 -14
- build/lib/clitt/addons/widman/widget.py +0 -70
- build/lib/clitt/addons/widman/widget_entry.py +0 -54
- build/lib/clitt/addons/widman/widgets/__init__.py +0 -14
- build/lib/clitt/addons/widman/widgets/widget_free.py +0 -110
- build/lib/clitt/addons/widman/widgets/widget_punch.py +0 -246
- build/lib/clitt/addons/widman/widgets/widget_send_msg.py +0 -272
- build/lib/clitt/addons/widman/widgets/widget_time_calc.py +0 -146
- build/lib/clitt/addons/widman/widman.py +0 -123
- build/lib/clitt/core/__init__.py +0 -15
- build/lib/clitt/core/exception/__init__.py +0 -11
- build/lib/clitt/core/exception/exceptions.py +0 -18
- build/lib/clitt/core/icons/__init__.py +0 -12
- build/lib/clitt/core/icons/emojis/__init__.py +0 -12
- build/lib/clitt/core/icons/emojis/emojis.py +0 -41
- build/lib/clitt/core/icons/emojis/face_smiling.py +0 -40
- build/lib/clitt/core/icons/font_awesome/__init__.py +0 -18
- build/lib/clitt/core/icons/font_awesome/app_icons.py +0 -55
- build/lib/clitt/core/icons/font_awesome/awesome.py +0 -76
- build/lib/clitt/core/icons/font_awesome/dashboard_icons.py +0 -93
- build/lib/clitt/core/icons/font_awesome/form_icons.py +0 -69
- build/lib/clitt/core/icons/font_awesome/game_icons.py +0 -59
- build/lib/clitt/core/icons/font_awesome/nav_icons.py +0 -42
- build/lib/clitt/core/icons/font_awesome/trickplay_icons.py +0 -39
- build/lib/clitt/core/icons/font_awesome/widget_icons.py +0 -37
- build/lib/clitt/core/preferences.py +0 -87
- build/lib/clitt/core/term/__init__.py +0 -14
- build/lib/clitt/core/term/commons.py +0 -82
- build/lib/clitt/core/term/cursor.py +0 -159
- build/lib/clitt/core/term/screen.py +0 -91
- build/lib/clitt/core/term/terminal.py +0 -203
- build/lib/clitt/core/tui/__init__.py +0 -20
- build/lib/clitt/core/tui/line_input/__init__.py +0 -12
- build/lib/clitt/core/tui/line_input/keyboard_input.py +0 -228
- build/lib/clitt/core/tui/line_input/line_input.py +0 -43
- build/lib/clitt/core/tui/mchoose/__init__.py +0 -12
- build/lib/clitt/core/tui/mchoose/mchoose.py +0 -44
- build/lib/clitt/core/tui/mchoose/menu_choose.py +0 -200
- build/lib/clitt/core/tui/mdashboard/__init__.py +0 -14
- build/lib/clitt/core/tui/mdashboard/dashboard_builder.py +0 -54
- build/lib/clitt/core/tui/mdashboard/dashboard_item.py +0 -31
- build/lib/clitt/core/tui/mdashboard/mdashboard.py +0 -26
- build/lib/clitt/core/tui/mdashboard/menu_dashboard.py +0 -154
- build/lib/clitt/core/tui/menu/__init__.py +0 -16
- build/lib/clitt/core/tui/menu/tui_menu.py +0 -111
- build/lib/clitt/core/tui/menu/tui_menu_action.py +0 -47
- build/lib/clitt/core/tui/menu/tui_menu_factory.py +0 -117
- build/lib/clitt/core/tui/menu/tui_menu_item.py +0 -196
- build/lib/clitt/core/tui/menu/tui_menu_ui.py +0 -98
- build/lib/clitt/core/tui/menu/tui_menu_view.py +0 -57
- build/lib/clitt/core/tui/minput/__init__.py +0 -19
- build/lib/clitt/core/tui/minput/access_type.py +0 -26
- build/lib/clitt/core/tui/minput/field_builder.py +0 -117
- build/lib/clitt/core/tui/minput/form_builder.py +0 -72
- build/lib/clitt/core/tui/minput/form_field.py +0 -180
- build/lib/clitt/core/tui/minput/input_type.py +0 -30
- build/lib/clitt/core/tui/minput/input_validator.py +0 -98
- build/lib/clitt/core/tui/minput/menu_input.py +0 -292
- build/lib/clitt/core/tui/minput/minput.py +0 -44
- build/lib/clitt/core/tui/minput/minput_utils.py +0 -156
- build/lib/clitt/core/tui/mselect/__init__.py +0 -12
- build/lib/clitt/core/tui/mselect/menu_select.py +0 -171
- build/lib/clitt/core/tui/mselect/mselect.py +0 -36
- build/lib/clitt/core/tui/table/__init__.py +0 -12
- build/lib/clitt/core/tui/table/table_enums.py +0 -47
- build/lib/clitt/core/tui/table/table_renderer.py +0 -339
- build/lib/clitt/core/tui/tui_application.py +0 -65
- build/lib/clitt/core/tui/tui_component.py +0 -155
- build/lib/clitt/core/tui/tui_preferences.py +0 -103
- build/lib/clitt/utils/__init__.py +0 -11
- build/lib/clitt/utils/git_utils.py +0 -66
- hspylib_clitt-0.9.115.dist-info/RECORD +0 -255
|
@@ -12,16 +12,17 @@
|
|
|
12
12
|
|
|
13
13
|
Copyright·(c)·2024,·HSPyLib
|
|
14
14
|
"""
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
import os
|
|
16
|
+
import sys
|
|
17
|
+
|
|
18
|
+
from hspylib.core.metaclass.classpath import AnyPath
|
|
18
19
|
from hspylib.core.metaclass.singleton import AbstractSingleton
|
|
19
20
|
from hspylib.modules.application.application import Application
|
|
20
21
|
from hspylib.modules.application.exit_status import ExitStatus
|
|
21
22
|
from hspylib.modules.application.version import Version
|
|
22
23
|
|
|
23
|
-
import
|
|
24
|
-
import
|
|
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):
|
|
@@ -34,25 +35,12 @@ class TUIApplication(Application, metaclass=AbstractSingleton):
|
|
|
34
35
|
description: str = None,
|
|
35
36
|
usage: str = None,
|
|
36
37
|
epilog: str = None,
|
|
37
|
-
resource_dir:
|
|
38
|
-
log_dir:
|
|
38
|
+
resource_dir: AnyPath = None,
|
|
39
|
+
log_dir: AnyPath = None,
|
|
39
40
|
):
|
|
40
41
|
super().__init__(name, version, description, usage, epilog, resource_dir, log_dir)
|
|
41
|
-
self._terminal = Terminal.INSTANCE
|
|
42
42
|
self._app_name = os.path.basename(sys.argv[0]) if name is None else name
|
|
43
43
|
|
|
44
|
-
@property
|
|
45
|
-
def terminal(self) -> Terminal():
|
|
46
|
-
return self._terminal
|
|
47
|
-
|
|
48
|
-
@property
|
|
49
|
-
def screen(self) -> Screen():
|
|
50
|
-
return self.terminal.screen
|
|
51
|
-
|
|
52
|
-
@property
|
|
53
|
-
def cursor(self) -> Cursor:
|
|
54
|
-
return self.terminal.cursor
|
|
55
|
-
|
|
56
44
|
def _setup_arguments(self) -> None:
|
|
57
45
|
pass
|
|
58
46
|
|
|
@@ -60,6 +48,6 @@ class TUIApplication(Application, metaclass=AbstractSingleton):
|
|
|
60
48
|
pass
|
|
61
49
|
|
|
62
50
|
def _cleanup(self) -> None:
|
|
63
|
-
if
|
|
64
|
-
|
|
65
|
-
|
|
51
|
+
if screen.alternate and self._exit_code == ExitStatus.SUCCESS:
|
|
52
|
+
screen.alternate = not screen.alternate
|
|
53
|
+
terminal.restore()
|
|
@@ -100,4 +100,4 @@ class TUIPreferences(Preferences):
|
|
|
100
100
|
return self.get_preference("unchecked.icon", FormIcons.UNMARKED)
|
|
101
101
|
|
|
102
102
|
|
|
103
|
-
assert TUIPreferences().INSTANCE is not None, "Failed to create TUIPreferences instance"
|
|
103
|
+
assert (tui_preferences := TUIPreferences().INSTANCE) is not None, "Failed to create TUIPreferences instance"
|
clitt/utils/__init__.py
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# _*_ coding: utf-8 _*_
|
|
2
2
|
#
|
|
3
|
-
# hspylib-clitt v0.9.
|
|
3
|
+
# hspylib-clitt v0.9.117
|
|
4
4
|
#
|
|
5
|
-
# Package: main.
|
|
5
|
+
# Package: main.clitt.utils
|
|
6
6
|
"""Package initialization."""
|
|
7
7
|
|
|
8
8
|
__all__ = [
|
|
9
9
|
'git_utils'
|
|
10
10
|
]
|
|
11
|
-
__version__ = '0.9.
|
|
11
|
+
__version__ = '0.9.117'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: hspylib-clitt
|
|
3
|
-
Version: 0.9.
|
|
3
|
+
Version: 0.9.117
|
|
4
4
|
Summary: HsPyLib - CLI Terminal Tools
|
|
5
5
|
Home-page: https://github.com/yorevs/hspylib
|
|
6
6
|
Author: Hugo Saporetti Junior
|
|
@@ -35,7 +35,7 @@ Requires-Dist: urllib3 <2.0.0
|
|
|
35
35
|
## Create professional CLI applications
|
|
36
36
|
|
|
37
37
|
[](LICENSE.md)
|
|
38
|
-
[](CHANGELOG.md#unreleased)
|
|
39
39
|
[](https://pypi.org/project/hspylib-clitt)
|
|
40
40
|
[](https://github.com/yorevs/hspylib)
|
|
41
41
|
[](https://gitter.im/hspylib/community)
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
clitt/.version,sha256=yyGqhUStn0niEKJBoPH6vy03FXb1CY0G7QJ5rkUbs1U,8
|
|
2
|
+
clitt/__classpath__.py,sha256=_woVRfXoFlEHBbtg-we43FJOrIlvdyumxsUV2IloHhE,884
|
|
3
|
+
clitt/__init__.py,sha256=KuweBYFGjbpTiOWgZ6H58lMkhe_zpAlAOUy9n4p393I,184
|
|
4
|
+
clitt/__main__.py,sha256=43Ugh79L57yhShIvtVqQwrQvsLy2rOtYgVm6g9Nsz_o,5321
|
|
5
|
+
clitt/welcome.txt,sha256=z72ySJw-1VQHvWmd8pZ95P6t4zEkIWGbqTRT83P2hJw,169
|
|
6
|
+
clitt/addons/__init__.py,sha256=6RXACxOxobJiqf6a3Fi6noSw8yS9rYt-aJCliFNlG6Q,179
|
|
7
|
+
clitt/addons/appman/__init__.py,sha256=UI9mG8Ad5e1pPhVEsU_BpSwiNQqMJukQ33w2PTDWYcI,210
|
|
8
|
+
clitt/addons/appman/appman.py,sha256=m3cUZzeNuZtky6U26q5way7xMNcLxKeQEdfpGXzboL8,13154
|
|
9
|
+
clitt/addons/appman/appman_enums.py,sha256=DL99b1gQXdTF-u0VkyknMQDqROHomzN4J570B1NYbqs,874
|
|
10
|
+
clitt/addons/appman/templates/__init__.py,sha256=8hNNj1enl2A4WD3QqaI8xhF3No0ZNuFXsg-qIoluDVo,173
|
|
11
|
+
clitt/addons/appman/templates/build.gradle.tpl,sha256=VQKs4r41xPr7P14PtQPt3alYCmNuXaGraaXbKB_FKkM,1817
|
|
12
|
+
clitt/addons/appman/templates/classpath.py.tpl,sha256=R60uLvVxeJ7nJCXCvav_9LAnDe5VOfJqWO-T1QAlwAc,397
|
|
13
|
+
clitt/addons/appman/templates/dependencies.hspd.tpl,sha256=bbVNU6XBm5QT28lvH7Bp_4nlXvoD-LwX5kGQ-CPhOEA,764
|
|
14
|
+
clitt/addons/appman/templates/gitignore.tpl,sha256=OLb8eoac2nnG1lvZL2l7J_3mc94i6xTuIfCV-J8aFSM,903
|
|
15
|
+
clitt/addons/appman/templates/main.py.tpl,sha256=bHvc8yrqn-8Ksm0vaBxufGaWwvsEd27DX8YPYULLDro,1506
|
|
16
|
+
clitt/addons/appman/templates/main_qt.py.tpl,sha256=1nlBCVjZZmIackSpBQwgWm6ygYQGpjodI9oHuLucw58,1043
|
|
17
|
+
clitt/addons/appman/templates/main_qt_view.py.tpl,sha256=Rc42G1v0YV_0xRW4aERWnuAqsY_8zxjfFUGFqj0zu4w,620
|
|
18
|
+
clitt/addons/appman/templates/main_qt_view.ui.tpl,sha256=JbEz9xU_50_Fd8FCKC33WPCz4De0egg1eW2xvP8wzJI,2780
|
|
19
|
+
clitt/addons/appman/templates/run.sh.tpl,sha256=2xpuHjZP9-7j14dAA2CqPm4G2xtnuenf-RBe3LdC2rI,150
|
|
20
|
+
clitt/addons/appman/templates/test_main.py.tpl,sha256=y5Bo0ku6FP67WjHfYUF4Kt9tdQ67MSlN6LgoF_NUm-U,1241
|
|
21
|
+
clitt/addons/appman/templates/usage.txt.tpl,sha256=R0e48HCeD7PDbWnX6HGIjz6gr_hBdp-zK6V42U1Aexw,217
|
|
22
|
+
clitt/addons/appman/templates/widget.py.tpl,sha256=-4q8hYP1Xdx8ttexeHuFnjMH_DoBANEoN9f59jzHDR4,1670
|
|
23
|
+
clitt/addons/widman/__init__.py,sha256=zs_YjagHj4zHgHcUvI9A7bf4aoNIH-tbh-WKuuLa42Y,223
|
|
24
|
+
clitt/addons/widman/widget.py,sha256=mOTpd1O3Cf37Ulz_nKSw9sU_gkE5X6wD28mIupOfVSM,1922
|
|
25
|
+
clitt/addons/widman/widget_entry.py,sha256=jFvfV2xX_0-Qdj3dDp_UdDtWoy5YkJr0x84X629_iGY,1358
|
|
26
|
+
clitt/addons/widman/widman.py,sha256=-PGBiWHxK7YJE632DRXisrUumVKES8U_Pemb_7xsFGM,5274
|
|
27
|
+
clitt/addons/widman/widgets/__init__.py,sha256=phpuGQUVVMwmwsUwsG1a-qUz6o78AoeGjt2uCrCh8M4,254
|
|
28
|
+
clitt/addons/widman/widgets/widget_free.py,sha256=z_4-1cZG0l_LUEDvtjU5dLbCG2XzqD_Rnw49T45_awc,3995
|
|
29
|
+
clitt/addons/widman/widgets/widget_punch.py,sha256=L8nIrQGtMsEOr6o3t2-BlSBhca3rB0b_hKuYQrYyeTU,10607
|
|
30
|
+
clitt/addons/widman/widgets/widget_send_msg.py,sha256=SjK3w36uvsVoOeVs5JiKmlqO9GhQn5dYvIqmbNdkFaQ,11058
|
|
31
|
+
clitt/addons/widman/widgets/widget_time_calc.py,sha256=kfwwDzp8E-4uE2jt3v_DIZA8RSbK9vQWVOqqTpOvYYo,5037
|
|
32
|
+
clitt/core/__init__.py,sha256=gVgVy8mUijwmPVHHwlVLzL2Uh8vhnrOSolA3a25Hkxs,224
|
|
33
|
+
clitt/core/preferences.py,sha256=-A5fewJQY0rOqUIrlNKycdW5rpf60-GniHUE03jNWgY,3142
|
|
34
|
+
clitt/core/exception/__init__.py,sha256=FPrScEvoOMHBqSZ6OB9qUU76xb3wY-arreInzyuM1S8,176
|
|
35
|
+
clitt/core/exception/exceptions.py,sha256=0bxENkPeYdOfDpqUNcNyq3-TPVlgfxLQyY2ZiZ6S0c8,477
|
|
36
|
+
clitt/core/icons/__init__.py,sha256=dIw7mxv9lE226t4SI0rnSd4MM7CxKkvGfudeVx7iy0I,189
|
|
37
|
+
clitt/core/icons/emojis/__init__.py,sha256=sutD8DwTRJAImfUXHuWyjXrrKp6cSB_3DdhaX0LpN3Y,196
|
|
38
|
+
clitt/core/icons/emojis/emojis.py,sha256=pNh3lEk-dNZlDS8hReK4FMyZq0Pz9zU1BXT-C2QyNno,1111
|
|
39
|
+
clitt/core/icons/emojis/face_smiling.py,sha256=rpMozq6ahAh6sw-7xVOUL3-ViIZsquamDrdvvwUtacU,1271
|
|
40
|
+
clitt/core/icons/font_awesome/__init__.py,sha256=Pez1pBzM270sAkQe6isYIfoBdTdRI71jQWVdR7nYwVY,325
|
|
41
|
+
clitt/core/icons/font_awesome/app_icons.py,sha256=6Voo5dDbyeYN8ZLawm6jUQwq62Cfe669bQ1HOtAYB4A,1702
|
|
42
|
+
clitt/core/icons/font_awesome/awesome.py,sha256=sR7H2U2TQSDf9ZtmRsU5EOef-gYboEmsob1TG3VYRQE,2243
|
|
43
|
+
clitt/core/icons/font_awesome/dashboard_icons.py,sha256=iaAHme-DBlcvER5-R33w80x5vOOBDvebp332B6ql5zA,3122
|
|
44
|
+
clitt/core/icons/font_awesome/form_icons.py,sha256=E7xEN7B7Mj6mYZ6XM5kjSqHC8QutT_aw_Eag7fvctOQ,2400
|
|
45
|
+
clitt/core/icons/font_awesome/game_icons.py,sha256=veZuoz3Dz7ubzH3hoAoNzD9WLkuSuQtta5oPR0EinP8,1950
|
|
46
|
+
clitt/core/icons/font_awesome/nav_icons.py,sha256=D75lokoZUHAIH4WLb0Xj0DWvGLoOoXTNKpteQpL4iPk,1183
|
|
47
|
+
clitt/core/icons/font_awesome/trickplay_icons.py,sha256=NGItIGhqYBamyxNT5kJmqV1jjrD5rXPT-DRsy3jKwCE,1081
|
|
48
|
+
clitt/core/icons/font_awesome/widget_icons.py,sha256=YO3eMOjAeBszLNkH998G0rMjTuUfJ3t3t3T_KqYOeQc,1026
|
|
49
|
+
clitt/core/term/__init__.py,sha256=9l2VimVqdQAGcayVK3p1OlAqBqiCs-E1LyCyaqIl9Mg,215
|
|
50
|
+
clitt/core/term/commons.py,sha256=g2yiSn1vzZDFwrUZmuBaEpsrvq8pawUBvCxPvTvKJWg,2679
|
|
51
|
+
clitt/core/term/cursor.py,sha256=4Ayf8TPlf_ZsZxktbX8SXMFyelmvHANVSaZ3u3pRbSQ,5924
|
|
52
|
+
clitt/core/term/screen.py,sha256=d6_Ef713EVIIMyHoLTZkfB_DE0yvZqVVuuel0joTfRw,2930
|
|
53
|
+
clitt/core/term/terminal.py,sha256=JrKuEI-DT2TBvdeqSywvIzrsOvXCxphgf1JSieYG3AQ,7700
|
|
54
|
+
clitt/core/tui/__init__.py,sha256=1fsttZxLc3MgpuJIZiL2Seb0nqwdBMt9OxbX1PYxbzE,333
|
|
55
|
+
clitt/core/tui/tui_application.py,sha256=Qze3qQTyFg5l7dIDTWFh-nBGLCzam78Ev13SF5I32oQ,1654
|
|
56
|
+
clitt/core/tui/tui_component.py,sha256=fiTQoKfNitrBDL-GwHPt_UzOk6avV6kp36eN9XKXwOQ,4881
|
|
57
|
+
clitt/core/tui/tui_preferences.py,sha256=7GbnlhjbSQjzwixbMb4HHX913dpJCPnMaryLdY7TJuI,3110
|
|
58
|
+
clitt/core/tui/line_input/__init__.py,sha256=VRPkvUoL92XeJ6hkiVlBMY7UWJFv6QkpBNVT9bdvLMs,204
|
|
59
|
+
clitt/core/tui/line_input/keyboard_input.py,sha256=MJFjijGmRHXtY2kbA542rZzHoGJTjJwcf1aNz9CfUus,8347
|
|
60
|
+
clitt/core/tui/line_input/line_input.py,sha256=BBeY-VlA0bsFpsMRv_d6eRZv-nbeYSbQV9ISrjCcvBA,1157
|
|
61
|
+
clitt/core/tui/mchoose/__init__.py,sha256=MBDPtHjyhj-TVhv1s0mqwx43hGpStNAf8WKOI0nYKoc,195
|
|
62
|
+
clitt/core/tui/mchoose/mchoose.py,sha256=42y_HmboxFKH06-ia6OfYitSpoRHR3pw9GyBA6JW3C0,1284
|
|
63
|
+
clitt/core/tui/mchoose/menu_choose.py,sha256=ZahfcxWfr4q2mZg0Z-PxF2Y_RSeCWbF7vce2kUBBkNw,7206
|
|
64
|
+
clitt/core/tui/mdashboard/__init__.py,sha256=Y7RyvYp01lmX5Qrgz3T1Z83GQgmZjbpq3hOAW8GubPY,253
|
|
65
|
+
clitt/core/tui/mdashboard/dashboard_builder.py,sha256=RJm_XnrNJX8jE-G_a9dFEa3DDWLNxN2Xnc6HVvQV1FE,1660
|
|
66
|
+
clitt/core/tui/mdashboard/dashboard_item.py,sha256=AhQm1IAj4RlHhj9AH4CHEIqX4SjrOZsGEUkwqiUs3js,888
|
|
67
|
+
clitt/core/tui/mdashboard/mdashboard.py,sha256=VWzNw_bQf8sQGRXrIqvNdIxauOmYiZ_ZnX0PTr0i5-M,892
|
|
68
|
+
clitt/core/tui/mdashboard/menu_dashboard.py,sha256=6pNWuyfOm0tsQB7rAkNMBa-Lxi0l9y9D7KKgwFa9rHo,5675
|
|
69
|
+
clitt/core/tui/menu/__init__.py,sha256=A9cf4I7MrnAY3A0AQF48uj3Y8BF4G3ikWdT2YzzZ4JU,286
|
|
70
|
+
clitt/core/tui/menu/tui_menu.py,sha256=Yro2ug3MSRWA9mJiqq3Jm2FCRVZI-gc_YyxX0Fc4g4g,3574
|
|
71
|
+
clitt/core/tui/menu/tui_menu_action.py,sha256=20ZfmIkKKuf_y_hBPUQRx_QPtjNvTxV-3ui9opn74Yo,1537
|
|
72
|
+
clitt/core/tui/menu/tui_menu_factory.py,sha256=tsQiYJqQdAZjs5aNxlXgwHT3EueSs9mbV4-Ec9HqtRM,4590
|
|
73
|
+
clitt/core/tui/menu/tui_menu_item.py,sha256=5IcDZ8MSy47WHlpTnDLty2fHjOr13CDvTGWsHU_briE,7442
|
|
74
|
+
clitt/core/tui/menu/tui_menu_ui.py,sha256=BdebIp3kmycTgrcPyDk20fS1kNQwqed_hQl7TiHx9Z4,3255
|
|
75
|
+
clitt/core/tui/menu/tui_menu_view.py,sha256=eGoaw_krAR5WQhqYu7fAnmuzz4ouYdWe8wUopBiZE1I,1922
|
|
76
|
+
clitt/core/tui/minput/__init__.py,sha256=Xp6CPPf_EMCwlXk_fvU9GOuhPk9NNh12gZ3Av9DOE1I,338
|
|
77
|
+
clitt/core/tui/minput/access_type.py,sha256=xNW-Qq0T4Je9WXG69BiTY2piFKCgAd87djam6zJeQ6Q,638
|
|
78
|
+
clitt/core/tui/minput/field_builder.py,sha256=TJEoZ2X1RH3uy0zaipL_yFfAy0j7rNU-PORPZvjqAfQ,4373
|
|
79
|
+
clitt/core/tui/minput/form_builder.py,sha256=XDKnDLz7UeYn9UHYCOrAFwjyR59BWnJ7XQVNdy4gf6w,2867
|
|
80
|
+
clitt/core/tui/minput/form_field.py,sha256=Q6QaGR2NV462zCfNUauzWlR_efHfH9-c0ewo_lGzbIw,6054
|
|
81
|
+
clitt/core/tui/minput/input_type.py,sha256=10TLjtlCrZctjXSFLohaXv715uaiz4P5liXb8kfM-qk,724
|
|
82
|
+
clitt/core/tui/minput/input_validator.py,sha256=yLnuDS5at1_COGNhljpeCkiQQpVOS5wsKidlnOh4_DM,3130
|
|
83
|
+
clitt/core/tui/minput/menu_input.py,sha256=JVHVVgzwpwW237FnBgd-Pc9sUAWBIareiH1SfXQAnk4,12883
|
|
84
|
+
clitt/core/tui/minput/minput.py,sha256=qWG5ykYd5GU_50lANJ7egrCALvxh1aGVnq9JlJKsXdE,1609
|
|
85
|
+
clitt/core/tui/minput/minput_utils.py,sha256=J9iuX9lbw5RWKoEIkMMkRjfm0RcOpjZfEAQTeizwzMc,5267
|
|
86
|
+
clitt/core/tui/mselect/__init__.py,sha256=qmBS87E7_fd5cQRfEmUN1biWCVXu9oOTXeXpTeH9XUE,195
|
|
87
|
+
clitt/core/tui/mselect/menu_select.py,sha256=OY-apKV97-23p6i83J0PJIjOn8C073FC_qk_PDcJ7iw,6178
|
|
88
|
+
clitt/core/tui/mselect/mselect.py,sha256=9O9-OKSNwCnZGYzvXhoLyT-2Ssoyg4x8N6REELdt0P8,1116
|
|
89
|
+
clitt/core/tui/table/__init__.py,sha256=K3un9xAaAZorQiBOHOjrkDMRwwUMDlXw7UfgnAFjnUY,200
|
|
90
|
+
clitt/core/tui/table/table_enums.py,sha256=bTIr5h8dWBUfVJTagdd2cxie6KyPJleTgcaS-t7ioX4,1282
|
|
91
|
+
clitt/core/tui/table/table_renderer.py,sha256=gzvXQ7GtE1gqsLsGCcUAidv-DnS8uRUm-ksjqkmoMQs,12800
|
|
92
|
+
clitt/utils/__init__.py,sha256=X46q6IgKPuEF00gv_UuQpSPLpHjOwlk_7MuCZZ1YAgU,166
|
|
93
|
+
clitt/utils/git_utils.py,sha256=B-QZtRpxAXa3Cw3im5qhJTla0LrlWQouMq_-GR8SOHU,2392
|
|
94
|
+
hspylib_clitt-0.9.117.dist-info/METADATA,sha256=DQWl1w6OwMtxydYXBypSfuGpyZGc6f5mYBoLzYiLXDc,1855
|
|
95
|
+
hspylib_clitt-0.9.117.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
96
|
+
hspylib_clitt-0.9.117.dist-info/top_level.txt,sha256=4aPEfxPvYp14dwV0l6cjCd90nbDutt1Yr27ZqCunZLI,11
|
|
97
|
+
hspylib_clitt-0.9.117.dist-info/RECORD,,
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
# -*- coding: utf-8 -*-
|
|
3
|
-
|
|
4
|
-
"""
|
|
5
|
-
@project: HsPyLib-Clitt
|
|
6
|
-
@package: clitt
|
|
7
|
-
@file: __classpath__.py
|
|
8
|
-
@created: Fri, 23 Dec 2022
|
|
9
|
-
@author: "<B>H</B>ugo <B>S</B>aporetti <B>J</B>unior")"
|
|
10
|
-
@site: "https://github.com/yorevs/hspylib")
|
|
11
|
-
@license: MIT - Please refer to <https://opensource.org/licenses/MIT>
|
|
12
|
-
|
|
13
|
-
Copyright·(c)·2024,·HSPyLib
|
|
14
|
-
"""
|
|
15
|
-
|
|
16
|
-
from hspylib.core.metaclass.classpath import Classpath
|
|
17
|
-
from hspylib.core.tools.commons import get_path, run_dir
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
class _Classpath(Classpath):
|
|
21
|
-
"""TODO"""
|
|
22
|
-
|
|
23
|
-
def __init__(self):
|
|
24
|
-
super().__init__(get_path(__file__), get_path(run_dir()), (get_path(__file__) / "resources"))
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
# Instantiate the classpath singleton
|
|
28
|
-
assert _Classpath().INSTANCE is not None, "Failed to create Classpath instance"
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
# -*- coding: utf-8 -*-
|
|
3
|
-
|
|
4
|
-
"""
|
|
5
|
-
@project: hspylib
|
|
6
|
-
@package: hspylib
|
|
7
|
-
@file: __main__.py
|
|
8
|
-
@created: Tue, 4 May 2021
|
|
9
|
-
@author: <B>H</B>ugo <B>S</B>aporetti <B>J</B>unior"
|
|
10
|
-
@site: https://github.com/yorevs/hspylib
|
|
11
|
-
@license: MIT - Please refer to <https://opensource.org/licenses/MIT>
|
|
12
|
-
|
|
13
|
-
Copyright·(c)·2024,·HSPyLib
|
|
14
|
-
"""
|
|
15
|
-
from clitt.__classpath__ import _Classpath
|
|
16
|
-
from clitt.addons.appman.appman import AppManager
|
|
17
|
-
from clitt.addons.appman.appman_enums import AppExtension, AppType
|
|
18
|
-
from clitt.addons.widman.widman import WidgetManager
|
|
19
|
-
from clitt.core.tui.tui_application import TUIApplication
|
|
20
|
-
from hspylib.core.enums.charset import Charset
|
|
21
|
-
from hspylib.core.enums.enumeration import Enumeration
|
|
22
|
-
from hspylib.core.tools.commons import run_dir, syserr
|
|
23
|
-
from hspylib.core.tools.text_tools import strip_linebreaks
|
|
24
|
-
from hspylib.modules.application.exit_status import ExitStatus
|
|
25
|
-
from hspylib.modules.application.version import Version
|
|
26
|
-
|
|
27
|
-
import sys
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
class Main(TUIApplication):
|
|
31
|
-
"""HsPyLib CLI Terminal Tools - Create professional CLI applications."""
|
|
32
|
-
|
|
33
|
-
# The welcome message
|
|
34
|
-
DESCRIPTION = _Classpath.get_source_path("welcome.txt").read_text(encoding=Charset.UTF_8.val)
|
|
35
|
-
|
|
36
|
-
# Location of the .version file
|
|
37
|
-
VERSION_DIR = _Classpath.source_path()
|
|
38
|
-
|
|
39
|
-
class Addon(Enumeration):
|
|
40
|
-
"""HsPyLib addon types."""
|
|
41
|
-
|
|
42
|
-
# fmt: off
|
|
43
|
-
APPMAN = 'appman'
|
|
44
|
-
WIDGETS = 'widgets'
|
|
45
|
-
# fmt: on
|
|
46
|
-
|
|
47
|
-
@property
|
|
48
|
-
def val(self) -> str:
|
|
49
|
-
return str(self.value)
|
|
50
|
-
|
|
51
|
-
def __init__(self, app_name: str):
|
|
52
|
-
version = Version.load(load_dir=self.VERSION_DIR)
|
|
53
|
-
super().__init__(app_name, version, self.DESCRIPTION.format(version))
|
|
54
|
-
|
|
55
|
-
def _setup_arguments(self) -> None:
|
|
56
|
-
"""Initialize application parameters and options."""
|
|
57
|
-
|
|
58
|
-
# fmt: off
|
|
59
|
-
self._with_chained_args('application', 'the HsPyLib-Clitt addon to run') \
|
|
60
|
-
.argument(
|
|
61
|
-
self.Addon.APPMAN.val,
|
|
62
|
-
'app Application Manager: Create HsPyLib-Clitt based python applications') \
|
|
63
|
-
.add_option(
|
|
64
|
-
'dest-dir', 'd', 'dest-dir',
|
|
65
|
-
'the destination directory. If omitted, the current directory will be used.',
|
|
66
|
-
nargs='?', default=self._run_dir) \
|
|
67
|
-
.add_parameter(
|
|
68
|
-
'app-name', 'the application name', nargs='?') \
|
|
69
|
-
.add_parameter(
|
|
70
|
-
'app-type',
|
|
71
|
-
'the application type. Appman is going to scaffold a basic application based on the app type',
|
|
72
|
-
choices=AppType.choices(), nargs='?') \
|
|
73
|
-
.add_parameter(
|
|
74
|
-
'app-ext',
|
|
75
|
-
'"gradle" is going to initialize you project with gradle (requires gradle). '
|
|
76
|
-
'"git" is going to initialize a git repository (requires git)', nargs='*') \
|
|
77
|
-
.argument(self.Addon.WIDGETS.val, 'app Widgets Manager: Execute an HsPyLib widget') \
|
|
78
|
-
.add_parameter(
|
|
79
|
-
'widget-name',
|
|
80
|
-
'the name of the widget to be executed. If omitted, all available widgets will be '
|
|
81
|
-
'presented in a dashboard',
|
|
82
|
-
nargs='?') \
|
|
83
|
-
.add_parameter(
|
|
84
|
-
'widget-args', "the widget's arguments (if applicable)", nargs='*')
|
|
85
|
-
|
|
86
|
-
def _main(self, *params, **kwargs) -> ExitStatus:
|
|
87
|
-
"""Main entry point handler."""
|
|
88
|
-
return self._exec_application()
|
|
89
|
-
|
|
90
|
-
def _exec_application(self) -> ExitStatus:
|
|
91
|
-
"""Execute the application main flow."""
|
|
92
|
-
|
|
93
|
-
app = self.get_arg("application")
|
|
94
|
-
if app == self.Addon.APPMAN.val:
|
|
95
|
-
self.start_appman()
|
|
96
|
-
elif app == self.Addon.WIDGETS.val:
|
|
97
|
-
self.start_widman()
|
|
98
|
-
else:
|
|
99
|
-
syserr(f"### Invalid Addon application: {app}")
|
|
100
|
-
self.usage(ExitStatus.FAILED)
|
|
101
|
-
|
|
102
|
-
return ExitStatus.SUCCESS
|
|
103
|
-
|
|
104
|
-
def start_widman(self) -> None:
|
|
105
|
-
"""Start the Widman application."""
|
|
106
|
-
addon = WidgetManager(self)
|
|
107
|
-
widget_name = self.get_arg("widget-name")
|
|
108
|
-
if widget_name:
|
|
109
|
-
widget_args = list(map(strip_linebreaks, self.get_arg("widget-args")))
|
|
110
|
-
addon.execute(widget_name, *widget_args)
|
|
111
|
-
else:
|
|
112
|
-
addon.dashboard()
|
|
113
|
-
|
|
114
|
-
def start_appman(self) -> None:
|
|
115
|
-
"""Start the Appman application."""
|
|
116
|
-
addon = AppManager(self)
|
|
117
|
-
app_type = self.get_arg("app-type")
|
|
118
|
-
if app_type:
|
|
119
|
-
app_ext = self.get_arg("app-ext")
|
|
120
|
-
addon.create(
|
|
121
|
-
self.get_arg("app-name"),
|
|
122
|
-
AppType.of_value(app_type),
|
|
123
|
-
list(map(AppExtension.value_of, app_ext)) if app_ext else [],
|
|
124
|
-
self.get_arg("dest-dir") or run_dir(),
|
|
125
|
-
)
|
|
126
|
-
else:
|
|
127
|
-
args = addon.prompt()
|
|
128
|
-
if args:
|
|
129
|
-
app_ext = []
|
|
130
|
-
if args.initialize_gradle:
|
|
131
|
-
app_ext.append(AppExtension.GRADLE)
|
|
132
|
-
if args.initialize_git:
|
|
133
|
-
app_ext.append(AppExtension.GIT)
|
|
134
|
-
addon.create(args.app_name, AppType.of_value(args.app_type), list(app_ext), args.dest_dir or run_dir())
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
# Application entry point
|
|
138
|
-
if __name__ == "__main__":
|
|
139
|
-
Main("clitt").INSTANCE.run(sys.argv[1:])
|