hspylib-clitt 0.9.33__tar.gz → 0.9.34__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 hspylib-clitt might be problematic. Click here for more details.
- {hspylib-clitt-0.9.33/hspylib_clitt.egg-info → hspylib-clitt-0.9.34}/PKG-INFO +2 -2
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/README.md +1 -1
- hspylib-clitt-0.9.34/clitt/.version +1 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/__init__.py +2 -2
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/addons/__init__.py +2 -2
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/addons/appman/__init__.py +2 -2
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/addons/appman/templates/__init__.py +2 -2
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/addons/setman/__init__.py +2 -2
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/addons/widman/__init__.py +2 -2
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/addons/widman/widgets/__init__.py +2 -2
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/core/__init__.py +2 -2
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/core/icons/__init__.py +2 -2
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/core/icons/emojis/__init__.py +2 -2
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/core/icons/font_awesome/__init__.py +2 -2
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/core/tui/__init__.py +2 -2
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/core/tui/mchoose/__init__.py +2 -2
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/core/tui/mdashboard/__init__.py +2 -2
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/core/tui/menu/__init__.py +2 -2
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/core/tui/minput/__init__.py +2 -2
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/core/tui/minput/field_builder.py +14 -4
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/core/tui/minput/form_builder.py +13 -9
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/core/tui/minput/form_field.py +10 -7
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/core/tui/minput/input_validator.py +7 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/core/tui/minput/menu_input.py +19 -13
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/core/tui/minput/minput_utils.py +17 -14
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/core/tui/mselect/__init__.py +2 -2
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/core/tui/table/__init__.py +2 -2
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34/hspylib_clitt.egg-info}/PKG-INFO +2 -2
- hspylib-clitt-0.9.33/clitt/.version +0 -1
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/MANIFEST.in +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/__classpath__.py +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/__main__.py +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/addons/appman/appman.py +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/addons/appman/appman_enums.py +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/addons/appman/templates/build.gradle.tpl +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/addons/appman/templates/classpath.py.tpl +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/addons/appman/templates/dependencies.hspd.tpl +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/addons/appman/templates/gitignore.tpl +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/addons/appman/templates/main.py.tpl +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/addons/appman/templates/main_qt.py.tpl +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/addons/appman/templates/main_qt_view.py.tpl +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/addons/appman/templates/main_qt_view.ui.tpl +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/addons/appman/templates/run.sh.tpl +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/addons/appman/templates/test_main.py.tpl +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/addons/appman/templates/usage.txt.tpl +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/addons/appman/templates/widget.py.tpl +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/addons/setman/setman.py +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/addons/setman/setman_config.py +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/addons/setman/setman_entry.py +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/addons/setman/setman_enums.py +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/addons/setman/setman_repository.py +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/addons/setman/setman_service.py +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/addons/widman/widget.py +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/addons/widman/widget_entry.py +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/addons/widman/widgets/widget_free.py +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/addons/widman/widgets/widget_punch.py +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/addons/widman/widgets/widget_send_msg.py +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/addons/widman/widgets/widget_time_calc.py +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/addons/widman/widman.py +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/core/icons/emojis/emojis.py +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/core/icons/emojis/face_smiling.py +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/core/icons/font_awesome/app_icons.py +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/core/icons/font_awesome/awesome.py +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/core/icons/font_awesome/control_icons.py +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/core/icons/font_awesome/dashboard_icons.py +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/core/icons/font_awesome/form_icons.py +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/core/icons/font_awesome/nav_icons.py +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/core/icons/font_awesome/widget_icons.py +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/core/tui/mchoose/mchoose.py +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/core/tui/mchoose/menu_choose.py +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/core/tui/mdashboard/dashboard_builder.py +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/core/tui/mdashboard/dashboard_item.py +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/core/tui/mdashboard/mdashboard.py +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/core/tui/mdashboard/menu_dashboard.py +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/core/tui/menu/tui_menu.py +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/core/tui/menu/tui_menu_action.py +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/core/tui/menu/tui_menu_factory.py +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/core/tui/menu/tui_menu_item.py +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/core/tui/menu/tui_menu_ui.py +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/core/tui/menu/tui_menu_view.py +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/core/tui/minput/access_type.py +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/core/tui/minput/input_type.py +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/core/tui/minput/minput.py +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/core/tui/mselect/menu_select.py +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/core/tui/mselect/mselect.py +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/core/tui/table/table_renderer.py +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/core/tui/tui_application.py +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/core/tui/tui_component.py +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/core/tui/tui_preferences.py +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/core/tui/tui_screen.py +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/welcome.txt +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/hspylib_clitt.egg-info/SOURCES.txt +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/hspylib_clitt.egg-info/dependency_links.txt +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/hspylib_clitt.egg-info/requires.txt +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/hspylib_clitt.egg-info/top_level.txt +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/setup.cfg +0 -0
- {hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: hspylib-clitt
|
|
3
|
-
Version: 0.9.
|
|
3
|
+
Version: 0.9.34
|
|
4
4
|
Summary: HsPyLib - CLI Terminal Tools
|
|
5
5
|
Home-page: https://github.com/yorevs/hspylib
|
|
6
6
|
Author: Hugo Saporetti Junior
|
|
@@ -30,7 +30,7 @@ Description-Content-Type: text/markdown
|
|
|
30
30
|
## Create professional CLI applications
|
|
31
31
|
|
|
32
32
|
[](LICENSE.md)
|
|
33
|
-
[](CHANGELOG.md#unreleased)
|
|
34
34
|
[](https://pypi.org/project/hspylib-cfman)
|
|
35
35
|
[](https://github.com/yorevs/hspylib)
|
|
36
36
|
[](https://gitter.im/hspylib/community)
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
## Create professional CLI applications
|
|
4
4
|
|
|
5
5
|
[](LICENSE.md)
|
|
6
|
-
[](CHANGELOG.md#unreleased)
|
|
7
7
|
[](https://pypi.org/project/hspylib-cfman)
|
|
8
8
|
[](https://github.com/yorevs/hspylib)
|
|
9
9
|
[](https://gitter.im/hspylib/community)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.9.34
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# _*_ coding: utf-8 _*_
|
|
2
2
|
#
|
|
3
|
-
# hspylib-clitt v0.9.
|
|
3
|
+
# hspylib-clitt v0.9.34
|
|
4
4
|
#
|
|
5
5
|
# Package: main.clitt.addons
|
|
6
6
|
"""Package initialization."""
|
|
@@ -10,4 +10,4 @@ __all__ = [
|
|
|
10
10
|
'setman',
|
|
11
11
|
'widman'
|
|
12
12
|
]
|
|
13
|
-
__version__ = '0.9.
|
|
13
|
+
__version__ = '0.9.34'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# _*_ coding: utf-8 _*_
|
|
2
2
|
#
|
|
3
|
-
# hspylib-clitt v0.9.
|
|
3
|
+
# hspylib-clitt v0.9.34
|
|
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.34'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# _*_ coding: utf-8 _*_
|
|
2
2
|
#
|
|
3
|
-
# hspylib-clitt v0.9.
|
|
3
|
+
# hspylib-clitt v0.9.34
|
|
4
4
|
#
|
|
5
5
|
# Package: main.clitt.addons.setman
|
|
6
6
|
"""Package initialization."""
|
|
@@ -13,4 +13,4 @@ __all__ = [
|
|
|
13
13
|
'setman_repository',
|
|
14
14
|
'setman_service'
|
|
15
15
|
]
|
|
16
|
-
__version__ = '0.9.
|
|
16
|
+
__version__ = '0.9.34'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# _*_ coding: utf-8 _*_
|
|
2
2
|
#
|
|
3
|
-
# hspylib-clitt v0.9.
|
|
3
|
+
# hspylib-clitt v0.9.34
|
|
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.34'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# _*_ coding: utf-8 _*_
|
|
2
2
|
#
|
|
3
|
-
# hspylib-clitt v0.9.
|
|
3
|
+
# hspylib-clitt v0.9.34
|
|
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.34'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# _*_ coding: utf-8 _*_
|
|
2
2
|
#
|
|
3
|
-
# hspylib-clitt v0.9.
|
|
3
|
+
# hspylib-clitt v0.9.34
|
|
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.34'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# _*_ coding: utf-8 _*_
|
|
2
2
|
#
|
|
3
|
-
# hspylib-clitt v0.9.
|
|
3
|
+
# hspylib-clitt v0.9.34
|
|
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.34'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# _*_ coding: utf-8 _*_
|
|
2
2
|
#
|
|
3
|
-
# hspylib-clitt v0.9.
|
|
3
|
+
# hspylib-clitt v0.9.34
|
|
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.34'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# _*_ coding: utf-8 _*_
|
|
2
2
|
#
|
|
3
|
-
# hspylib-clitt v0.9.
|
|
3
|
+
# hspylib-clitt v0.9.34
|
|
4
4
|
#
|
|
5
5
|
# Package: main.clitt.core.tui
|
|
6
6
|
"""Package initialization."""
|
|
@@ -17,4 +17,4 @@ __all__ = [
|
|
|
17
17
|
'tui_preferences',
|
|
18
18
|
'tui_screen'
|
|
19
19
|
]
|
|
20
|
-
__version__ = '0.9.
|
|
20
|
+
__version__ = '0.9.34'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# _*_ coding: utf-8 _*_
|
|
2
2
|
#
|
|
3
|
-
# hspylib-clitt v0.9.
|
|
3
|
+
# hspylib-clitt v0.9.34
|
|
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.34'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# _*_ coding: utf-8 _*_
|
|
2
2
|
#
|
|
3
|
-
# hspylib-clitt v0.9.
|
|
3
|
+
# hspylib-clitt v0.9.34
|
|
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.34'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# _*_ coding: utf-8 _*_
|
|
2
2
|
#
|
|
3
|
-
# hspylib-clitt v0.9.
|
|
3
|
+
# hspylib-clitt v0.9.34
|
|
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.34'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# _*_ coding: utf-8 _*_
|
|
2
2
|
#
|
|
3
|
-
# hspylib-clitt v0.9.
|
|
3
|
+
# hspylib-clitt v0.9.34
|
|
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.34'
|
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
|
|
13
13
|
Copyright 2023, HsPyLib team
|
|
14
14
|
"""
|
|
15
|
+
import re
|
|
16
|
+
from functools import reduce
|
|
15
17
|
from typing import Any
|
|
16
18
|
|
|
17
19
|
from hspylib.core.preconditions import check_argument
|
|
@@ -22,7 +24,7 @@ from clitt.core.tui.minput.access_type import AccessType
|
|
|
22
24
|
from clitt.core.tui.minput.form_field import FIELD_VALIDATOR_FNC, FormField
|
|
23
25
|
from clitt.core.tui.minput.input_type import InputType
|
|
24
26
|
from clitt.core.tui.minput.input_validator import InputValidator
|
|
25
|
-
from clitt.core.tui.minput.minput_utils import unpack_masked
|
|
27
|
+
from clitt.core.tui.minput.minput_utils import get_selected, MASK_SYMBOLS, unpack_masked, VALUE_SEPARATORS
|
|
26
28
|
|
|
27
29
|
|
|
28
30
|
class FieldBuilder:
|
|
@@ -30,14 +32,18 @@ class FieldBuilder:
|
|
|
30
32
|
|
|
31
33
|
@staticmethod
|
|
32
34
|
def _validate_field(field: FormField) -> bool:
|
|
33
|
-
length, valid = len(str(field.value or '')), True
|
|
34
35
|
match field.itype:
|
|
35
36
|
case InputType.MASKED:
|
|
36
37
|
value, mask = unpack_masked(field.value)
|
|
37
|
-
valid = len(value) ==
|
|
38
|
+
valid = reduce(lambda n, m: n + m, list(map(lambda s: mask[len(value):].count(s), MASK_SYMBOLS))) == 0
|
|
38
39
|
case InputType.CHECKBOX:
|
|
39
40
|
valid = isinstance(field.value, bool)
|
|
41
|
+
case InputType.SELECT:
|
|
42
|
+
_, value = get_selected(field.value)
|
|
43
|
+
length = len(str(value or ''))
|
|
44
|
+
valid = field.min_length <= length <= field.max_length
|
|
40
45
|
case _:
|
|
46
|
+
length = len(str(field.value or ''))
|
|
41
47
|
valid = field.min_length <= length <= field.max_length
|
|
42
48
|
return valid
|
|
43
49
|
|
|
@@ -89,9 +95,13 @@ class FieldBuilder:
|
|
|
89
95
|
def build(self) -> Any:
|
|
90
96
|
if self._itype == InputType.CHECKBOX:
|
|
91
97
|
self._value = str_to_bool(str(self._value))
|
|
98
|
+
elif self._itype == InputType.SELECT:
|
|
99
|
+
parts = re.split(VALUE_SEPARATORS, re.sub('[<>]', '', str(self._value or '')))
|
|
100
|
+
self._min_max_length = len(min(parts, key=len)), len(max(parts, key=len))
|
|
92
101
|
elif self._itype == InputType.MASKED:
|
|
93
102
|
_, mask = unpack_masked(str(self._value))
|
|
94
|
-
|
|
103
|
+
min_max = reduce(lambda n, m: n + m, list(map(lambda s: mask.count(s), MASK_SYMBOLS)))
|
|
104
|
+
self._min_max_length = min_max, min_max
|
|
95
105
|
self._dest = self._dest or snakecase(self._label)
|
|
96
106
|
self._parent.fields.append(FormField(
|
|
97
107
|
self._label, self._dest, self._itype,
|
|
@@ -29,7 +29,11 @@ class FormBuilder:
|
|
|
29
29
|
self.fields = []
|
|
30
30
|
self._fn_validate = None
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
@staticmethod
|
|
33
|
+
def get_attr(parts: List[str], index: int, default_value: Any = None) -> str:
|
|
34
|
+
return get_or_default(parts, index, default_value) or default_value
|
|
35
|
+
|
|
36
|
+
def from_tokenized(self, minput_tokens: List[str], separator: str = '|') -> 'FormBuilder':
|
|
33
37
|
"""Construct the forms based on string tokens.
|
|
34
38
|
|
|
35
39
|
Field tokens (in-order):
|
|
@@ -40,23 +44,23 @@ class FormBuilder:
|
|
|
40
44
|
[Perm] : The field permissions. One of {r|[rw]}. Where \"r\" for Read Only ; \"rw\" for Read & Write.
|
|
41
45
|
[Value] : The initial value of the field. This field may not be blank if the field is read only.
|
|
42
46
|
"""
|
|
43
|
-
for tk_field in
|
|
44
|
-
parts = list(map(str.strip, tk_field.split(
|
|
45
|
-
validator_fn = getattr(InputValidator,
|
|
46
|
-
min_max = list(map(int, map(str.strip,
|
|
47
|
-
access = re.sub('^rw$', 'read-write',
|
|
47
|
+
for tk_field in minput_tokens:
|
|
48
|
+
parts = list(map(str.strip, tk_field.split(separator)))
|
|
49
|
+
validator_fn = getattr(InputValidator, self.get_attr(parts, 2, 'anything'))
|
|
50
|
+
min_max = list(map(int, map(str.strip, self.get_attr(parts, 3, '5/30').split('/'))))
|
|
51
|
+
access = re.sub('^rw$', 'read-write', self.get_attr(parts, 4, 'rw'))
|
|
48
52
|
access = re.sub('^r$', 'read-only', access)
|
|
49
53
|
# fmt: off
|
|
50
54
|
self.field() \
|
|
51
|
-
.label(
|
|
52
|
-
.itype(
|
|
55
|
+
.label(self.get_attr(parts, 0, 'Label')) \
|
|
56
|
+
.itype(self.get_attr(parts, 1, 'text')) \
|
|
53
57
|
.min_max_length(
|
|
54
58
|
get_or_default(min_max, 0, 5),
|
|
55
59
|
get_or_default(min_max, 1, 30)
|
|
56
60
|
) \
|
|
57
61
|
.access_type(access) \
|
|
58
62
|
.validator(validator_fn()) \
|
|
59
|
-
.value(
|
|
63
|
+
.value(self.get_attr(parts, 5, None)) \
|
|
60
64
|
.build()
|
|
61
65
|
# fmt: on
|
|
62
66
|
|
|
@@ -51,7 +51,10 @@ class FormField:
|
|
|
51
51
|
self._value = self.assign(value)
|
|
52
52
|
|
|
53
53
|
def __str__(self) -> str:
|
|
54
|
-
return
|
|
54
|
+
return (
|
|
55
|
+
f"[{self.label}, {self.itype.name}({self.min_length}/{self.max_length})"
|
|
56
|
+
f"<{self.access_type}> = '{self.value or ''}']"
|
|
57
|
+
)
|
|
55
58
|
|
|
56
59
|
def __repr__(self):
|
|
57
60
|
return str(self)
|
|
@@ -91,20 +94,20 @@ class FormField:
|
|
|
91
94
|
@property
|
|
92
95
|
def length(self) -> int:
|
|
93
96
|
"""Get the field real length, depending on the field type."""
|
|
94
|
-
|
|
97
|
+
real_value = str(self.value or '')
|
|
95
98
|
match self.itype:
|
|
96
99
|
case InputType.CHECKBOX:
|
|
97
|
-
|
|
100
|
+
real_value = '1'
|
|
98
101
|
case InputType.SELECT:
|
|
99
|
-
_,
|
|
102
|
+
_, real_value = get_selected(str(self.value))
|
|
100
103
|
case InputType.MASKED:
|
|
101
|
-
|
|
102
|
-
idx = len(
|
|
104
|
+
real_value, mask = unpack_masked(str(self.value))
|
|
105
|
+
idx = len(real_value)
|
|
103
106
|
while idx < len(mask) and mask[idx] not in MASK_SYMBOLS:
|
|
104
107
|
idx += 1
|
|
105
108
|
return idx
|
|
106
109
|
|
|
107
|
-
return len(
|
|
110
|
+
return len(real_value)
|
|
108
111
|
|
|
109
112
|
@property
|
|
110
113
|
def icon(self) -> FormIcons:
|
|
@@ -30,6 +30,7 @@ class InputValidator(Validator):
|
|
|
30
30
|
WORDS = r'[a-zA-Z0-9 _]'
|
|
31
31
|
NUMBERS = r'[0-9\.\,]'
|
|
32
32
|
BINARY = r'[01]'
|
|
33
|
+
MASKED = r'.'
|
|
33
34
|
# fmt: on
|
|
34
35
|
|
|
35
36
|
@classmethod
|
|
@@ -72,6 +73,12 @@ class InputValidator(Validator):
|
|
|
72
73
|
"""
|
|
73
74
|
return InputValidator(cls.PatternType.BINARY)
|
|
74
75
|
|
|
76
|
+
@classmethod
|
|
77
|
+
def masked(cls) -> "InputValidator":
|
|
78
|
+
"""Return a validator that allows masked inputs.
|
|
79
|
+
"""
|
|
80
|
+
return InputValidator(cls.PatternType.MASKED)
|
|
81
|
+
|
|
75
82
|
def __init__(self, pattern_type: PatternType = PatternType.ANYTHING):
|
|
76
83
|
self._pattern_type = pattern_type
|
|
77
84
|
self._pattern = pattern_type.value
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
Copyright 2023, HsPyLib team
|
|
14
14
|
"""
|
|
15
15
|
import time
|
|
16
|
+
from functools import reduce
|
|
16
17
|
from typing import List
|
|
17
18
|
|
|
18
19
|
import pyperclip
|
|
@@ -159,18 +160,19 @@ class MenuInput(TUIComponent):
|
|
|
159
160
|
case InputType.SELECT:
|
|
160
161
|
if keypress == Keyboard.VK_SPACE:
|
|
161
162
|
if self.cur_field.value:
|
|
162
|
-
self.cur_field.value = toggle_selected(str(self.cur_field.value))
|
|
163
|
+
self.cur_field.value = toggle_selected(str(self.cur_field.value or ''))
|
|
163
164
|
case InputType.MASKED:
|
|
164
|
-
value, mask = unpack_masked(str(self.cur_field.value))
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
self._display_error(str(err))
|
|
165
|
+
value, mask = unpack_masked(str(self.cur_field.value or ''))
|
|
166
|
+
try:
|
|
167
|
+
self.cur_field.value = append_masked(value, mask, keypress.value)
|
|
168
|
+
except InvalidInputError as err:
|
|
169
|
+
self._display_error(str(err))
|
|
170
170
|
case _:
|
|
171
|
-
if len(str(self.cur_field.value)) < self.cur_field.max_length:
|
|
171
|
+
if len(str(self.cur_field.value or '')) < self.cur_field.max_length:
|
|
172
172
|
if self.cur_field.validate_input(keypress.value):
|
|
173
|
-
self.cur_field.value =
|
|
173
|
+
self.cur_field.value = (
|
|
174
|
+
str(self.cur_field.value) if self.cur_field.value else ''
|
|
175
|
+
) + str(keypress.value)
|
|
174
176
|
else:
|
|
175
177
|
self._display_error(
|
|
176
178
|
f"Input '{keypress.value}' is invalid. "
|
|
@@ -209,7 +211,7 @@ class MenuInput(TUIComponent):
|
|
|
209
211
|
"""
|
|
210
212
|
match field.itype:
|
|
211
213
|
case InputType.TEXT:
|
|
212
|
-
mi_print(self.screen, str(field.value), field_len=self.max_value_length)
|
|
214
|
+
mi_print(self.screen, str(field.value or ''), field_len=self.max_value_length)
|
|
213
215
|
case InputType.PASSWORD:
|
|
214
216
|
mi_print(self.screen, "*" * field.length, field_len=self.max_value_length)
|
|
215
217
|
case InputType.CHECKBOX:
|
|
@@ -219,7 +221,7 @@ class MenuInput(TUIComponent):
|
|
|
219
221
|
field_len=self.max_value_length - 1
|
|
220
222
|
)
|
|
221
223
|
case InputType.SELECT:
|
|
222
|
-
if
|
|
224
|
+
if field.value:
|
|
223
225
|
mat = re.search(rf".*({VALUE_SEPARATORS})?<(.+)>({VALUE_SEPARATORS})?.*", str(field.value))
|
|
224
226
|
sel_value = mat.group(2) if mat else re.split(VALUE_SEPARATORS, str(field.value))[0]
|
|
225
227
|
mi_print(self.screen, f"{sel_value}", field_len=self.max_value_length)
|
|
@@ -241,8 +243,12 @@ class MenuInput(TUIComponent):
|
|
|
241
243
|
count = len(re.split(VALUE_SEPARATORS, field.value))
|
|
242
244
|
self.writeln(fmt.format(field.icon, idx + 1 if idx >= 0 else 1, count))
|
|
243
245
|
elif field.itype == InputType.MASKED:
|
|
244
|
-
value,
|
|
245
|
-
self.writeln(fmt.format(
|
|
246
|
+
value, mask = unpack_masked(str(field.value or ''))
|
|
247
|
+
self.writeln(fmt.format(
|
|
248
|
+
field.icon,
|
|
249
|
+
reduce(lambda n, m: n + m, list(map(lambda s: mask[:len(value)].count(s), MASK_SYMBOLS))),
|
|
250
|
+
reduce(lambda n, m: n + m, list(map(lambda s: mask.count(s), MASK_SYMBOLS)))
|
|
251
|
+
))
|
|
246
252
|
else:
|
|
247
253
|
self.writeln(fmt.format(field.icon, field_details, field.max_length))
|
|
248
254
|
|
|
@@ -21,7 +21,9 @@ from clitt.core.tui.tui_screen import TUIScreen
|
|
|
21
21
|
|
|
22
22
|
MASK_SYMBOLS = ["#", "@", "%", "*"]
|
|
23
23
|
|
|
24
|
-
VALUE_SEPARATORS = "[|,;]"
|
|
24
|
+
VALUE_SEPARATORS = r"[|,;]"
|
|
25
|
+
|
|
26
|
+
VALUE_SELECTORS = r"[<>]"
|
|
25
27
|
|
|
26
28
|
|
|
27
29
|
def detail_len(field: Any) -> int:
|
|
@@ -72,7 +74,7 @@ def toggle_selected(tokenized_values: str) -> str:
|
|
|
72
74
|
else:
|
|
73
75
|
values[0] = f"<{values[0]}>"
|
|
74
76
|
return "|".join(values)
|
|
75
|
-
unselected = list(map(lambda x:
|
|
77
|
+
unselected = list(map(lambda x: re.sub(VALUE_SELECTORS, '', x), values))
|
|
76
78
|
# fmt: off
|
|
77
79
|
return '|'.join([
|
|
78
80
|
f'<{val}>'
|
|
@@ -89,7 +91,7 @@ def get_selected(tokenized_values: str) -> Optional[Tuple[int, str]]:
|
|
|
89
91
|
values = re.split(VALUE_SEPARATORS, tokenized_values)
|
|
90
92
|
# fmt: off
|
|
91
93
|
sel_item = next((
|
|
92
|
-
|
|
94
|
+
re.sub(VALUE_SELECTORS, '', val)
|
|
93
95
|
for val in values if val.startswith('<') and val.endswith('>')
|
|
94
96
|
), values[0])
|
|
95
97
|
# fmt: on
|
|
@@ -123,18 +125,19 @@ def append_masked(
|
|
|
123
125
|
:param keypress_value: the value to append (it can be a part of the mask itself).
|
|
124
126
|
"""
|
|
125
127
|
idx = len(value)
|
|
126
|
-
if keypress_value == mask[idx]:
|
|
127
|
-
return f"{value}{keypress_value}|{mask}"
|
|
128
128
|
masked_value = value
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
129
|
+
if idx < len(mask):
|
|
130
|
+
if keypress_value == mask[idx]:
|
|
131
|
+
return f"{value}{keypress_value}|{mask}"
|
|
132
|
+
while idx < len(mask) and mask[idx] not in MASK_SYMBOLS:
|
|
133
|
+
masked_value += mask[idx]
|
|
134
|
+
idx += 1
|
|
135
|
+
if mask and idx < len(mask):
|
|
136
|
+
mask_re = mask_regex(mask, idx)
|
|
137
|
+
if re.search(mask_re, keypress_value):
|
|
138
|
+
masked_value += keypress_value
|
|
139
|
+
else:
|
|
140
|
+
raise InvalidInputError(f"Value '{keypress_value}' is invalid. Expecting: {mask_re}")
|
|
138
141
|
|
|
139
142
|
return f"{masked_value}|{mask}"
|
|
140
143
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# _*_ coding: utf-8 _*_
|
|
2
2
|
#
|
|
3
|
-
# hspylib-clitt v0.9.
|
|
3
|
+
# hspylib-clitt v0.9.34
|
|
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.34'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# _*_ coding: utf-8 _*_
|
|
2
2
|
#
|
|
3
|
-
# hspylib-clitt v0.9.
|
|
3
|
+
# hspylib-clitt v0.9.34
|
|
4
4
|
#
|
|
5
5
|
# Package: main.clitt.core.tui.table
|
|
6
6
|
"""Package initialization."""
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
__all__ = [
|
|
9
9
|
'table_renderer'
|
|
10
10
|
]
|
|
11
|
-
__version__ = '0.9.
|
|
11
|
+
__version__ = '0.9.34'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: hspylib-clitt
|
|
3
|
-
Version: 0.9.
|
|
3
|
+
Version: 0.9.34
|
|
4
4
|
Summary: HsPyLib - CLI Terminal Tools
|
|
5
5
|
Home-page: https://github.com/yorevs/hspylib
|
|
6
6
|
Author: Hugo Saporetti Junior
|
|
@@ -30,7 +30,7 @@ Description-Content-Type: text/markdown
|
|
|
30
30
|
## Create professional CLI applications
|
|
31
31
|
|
|
32
32
|
[](LICENSE.md)
|
|
33
|
-
[](CHANGELOG.md#unreleased)
|
|
34
34
|
[](https://pypi.org/project/hspylib-cfman)
|
|
35
35
|
[](https://github.com/yorevs/hspylib)
|
|
36
36
|
[](https://gitter.im/hspylib/community)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0.9.33
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/addons/appman/templates/build.gradle.tpl
RENAMED
|
File without changes
|
{hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/addons/appman/templates/classpath.py.tpl
RENAMED
|
File without changes
|
{hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/addons/appman/templates/dependencies.hspd.tpl
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/addons/appman/templates/main_qt_view.py.tpl
RENAMED
|
File without changes
|
{hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/addons/appman/templates/main_qt_view.ui.tpl
RENAMED
|
File without changes
|
|
File without changes
|
{hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/addons/appman/templates/test_main.py.tpl
RENAMED
|
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
|
{hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/addons/widman/widgets/widget_send_msg.py
RENAMED
|
File without changes
|
{hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/addons/widman/widgets/widget_time_calc.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/core/icons/font_awesome/control_icons.py
RENAMED
|
File without changes
|
{hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/core/icons/font_awesome/dashboard_icons.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hspylib-clitt-0.9.33 → hspylib-clitt-0.9.34}/clitt/core/tui/mdashboard/dashboard_builder.py
RENAMED
|
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
|