hspylib-clitt 0.9.35__tar.gz → 0.9.36__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.

Files changed (97) hide show
  1. {hspylib-clitt-0.9.35/hspylib_clitt.egg-info → hspylib-clitt-0.9.36}/PKG-INFO +2 -2
  2. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/README.md +1 -1
  3. hspylib-clitt-0.9.36/clitt/.version +1 -0
  4. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/__init__.py +2 -2
  5. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/addons/__init__.py +2 -2
  6. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/addons/appman/__init__.py +2 -2
  7. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/addons/appman/templates/__init__.py +2 -2
  8. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/addons/setman/__init__.py +2 -2
  9. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/addons/widman/__init__.py +2 -2
  10. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/addons/widman/widgets/__init__.py +2 -2
  11. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/core/__init__.py +2 -2
  12. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/core/icons/__init__.py +2 -2
  13. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/core/icons/emojis/__init__.py +2 -2
  14. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/core/icons/font_awesome/__init__.py +2 -2
  15. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/core/tui/__init__.py +2 -2
  16. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/core/tui/mchoose/__init__.py +2 -2
  17. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/core/tui/mdashboard/__init__.py +2 -2
  18. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/core/tui/menu/__init__.py +2 -2
  19. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/core/tui/minput/__init__.py +2 -2
  20. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/core/tui/minput/menu_input.py +19 -11
  21. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/core/tui/mselect/__init__.py +2 -2
  22. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/core/tui/table/__init__.py +2 -2
  23. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/core/tui/table/table_renderer.py +52 -23
  24. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/core/tui/tui_component.py +1 -1
  25. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36/hspylib_clitt.egg-info}/PKG-INFO +2 -2
  26. hspylib-clitt-0.9.35/clitt/.version +0 -1
  27. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/MANIFEST.in +0 -0
  28. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/__classpath__.py +0 -0
  29. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/__main__.py +0 -0
  30. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/addons/appman/appman.py +0 -0
  31. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/addons/appman/appman_enums.py +0 -0
  32. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/addons/appman/templates/build.gradle.tpl +0 -0
  33. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/addons/appman/templates/classpath.py.tpl +0 -0
  34. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/addons/appman/templates/dependencies.hspd.tpl +0 -0
  35. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/addons/appman/templates/gitignore.tpl +0 -0
  36. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/addons/appman/templates/main.py.tpl +0 -0
  37. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/addons/appman/templates/main_qt.py.tpl +0 -0
  38. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/addons/appman/templates/main_qt_view.py.tpl +0 -0
  39. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/addons/appman/templates/main_qt_view.ui.tpl +0 -0
  40. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/addons/appman/templates/run.sh.tpl +0 -0
  41. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/addons/appman/templates/test_main.py.tpl +0 -0
  42. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/addons/appman/templates/usage.txt.tpl +0 -0
  43. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/addons/appman/templates/widget.py.tpl +0 -0
  44. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/addons/setman/setman.py +0 -0
  45. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/addons/setman/setman_config.py +0 -0
  46. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/addons/setman/setman_entry.py +0 -0
  47. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/addons/setman/setman_enums.py +0 -0
  48. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/addons/setman/setman_repository.py +0 -0
  49. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/addons/setman/setman_service.py +0 -0
  50. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/addons/widman/widget.py +0 -0
  51. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/addons/widman/widget_entry.py +0 -0
  52. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/addons/widman/widgets/widget_free.py +0 -0
  53. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/addons/widman/widgets/widget_punch.py +0 -0
  54. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/addons/widman/widgets/widget_send_msg.py +0 -0
  55. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/addons/widman/widgets/widget_time_calc.py +0 -0
  56. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/addons/widman/widman.py +0 -0
  57. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/core/icons/emojis/emojis.py +0 -0
  58. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/core/icons/emojis/face_smiling.py +0 -0
  59. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/core/icons/font_awesome/app_icons.py +0 -0
  60. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/core/icons/font_awesome/awesome.py +0 -0
  61. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/core/icons/font_awesome/control_icons.py +0 -0
  62. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/core/icons/font_awesome/dashboard_icons.py +0 -0
  63. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/core/icons/font_awesome/form_icons.py +0 -0
  64. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/core/icons/font_awesome/nav_icons.py +0 -0
  65. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/core/icons/font_awesome/widget_icons.py +0 -0
  66. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/core/tui/mchoose/mchoose.py +0 -0
  67. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/core/tui/mchoose/menu_choose.py +0 -0
  68. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/core/tui/mdashboard/dashboard_builder.py +0 -0
  69. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/core/tui/mdashboard/dashboard_item.py +0 -0
  70. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/core/tui/mdashboard/mdashboard.py +0 -0
  71. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/core/tui/mdashboard/menu_dashboard.py +0 -0
  72. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/core/tui/menu/tui_menu.py +0 -0
  73. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/core/tui/menu/tui_menu_action.py +0 -0
  74. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/core/tui/menu/tui_menu_factory.py +0 -0
  75. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/core/tui/menu/tui_menu_item.py +0 -0
  76. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/core/tui/menu/tui_menu_ui.py +0 -0
  77. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/core/tui/menu/tui_menu_view.py +0 -0
  78. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/core/tui/minput/access_type.py +0 -0
  79. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/core/tui/minput/field_builder.py +0 -0
  80. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/core/tui/minput/form_builder.py +0 -0
  81. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/core/tui/minput/form_field.py +0 -0
  82. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/core/tui/minput/input_type.py +0 -0
  83. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/core/tui/minput/input_validator.py +0 -0
  84. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/core/tui/minput/minput.py +0 -0
  85. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/core/tui/minput/minput_utils.py +0 -0
  86. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/core/tui/mselect/menu_select.py +0 -0
  87. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/core/tui/mselect/mselect.py +0 -0
  88. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/core/tui/tui_application.py +0 -0
  89. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/core/tui/tui_preferences.py +0 -0
  90. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/core/tui/tui_screen.py +0 -0
  91. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/clitt/welcome.txt +0 -0
  92. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/hspylib_clitt.egg-info/SOURCES.txt +0 -0
  93. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/hspylib_clitt.egg-info/dependency_links.txt +0 -0
  94. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/hspylib_clitt.egg-info/requires.txt +0 -0
  95. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/hspylib_clitt.egg-info/top_level.txt +0 -0
  96. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/setup.cfg +0 -0
  97. {hspylib-clitt-0.9.35 → hspylib-clitt-0.9.36}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hspylib-clitt
3
- Version: 0.9.35
3
+ Version: 0.9.36
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](https://badgen.net/badge/license/MIT/gray)](LICENSE.md)
33
- [![Release](https://badgen.net/badge/release/v0.9.35/gray)](CHANGELOG.md#unreleased)
33
+ [![Release](https://badgen.net/badge/release/v0.9.36/gray)](CHANGELOG.md#unreleased)
34
34
  [![PyPi](https://badgen.net/badge/icon/python?icon=pypi&label)](https://pypi.org/project/hspylib-cfman)
35
35
  [![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com/yorevs/hspylib)
36
36
  [![Gitter](https://badgen.net/badge/icon/gitter?icon=gitter&label)](https://gitter.im/hspylib/community)
@@ -3,7 +3,7 @@
3
3
  ## Create professional CLI applications
4
4
 
5
5
  [![License](https://badgen.net/badge/license/MIT/gray)](LICENSE.md)
6
- [![Release](https://badgen.net/badge/release/v0.9.35/gray)](CHANGELOG.md#unreleased)
6
+ [![Release](https://badgen.net/badge/release/v0.9.36/gray)](CHANGELOG.md#unreleased)
7
7
  [![PyPi](https://badgen.net/badge/icon/python?icon=pypi&label)](https://pypi.org/project/hspylib-cfman)
8
8
  [![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com/yorevs/hspylib)
9
9
  [![Gitter](https://badgen.net/badge/icon/gitter?icon=gitter&label)](https://gitter.im/hspylib/community)
@@ -0,0 +1 @@
1
+ 0.9.36
@@ -1,6 +1,6 @@
1
1
  # _*_ coding: utf-8 _*_
2
2
  #
3
- # hspylib-clitt v0.9.35
3
+ # hspylib-clitt v0.9.36
4
4
  #
5
5
  # Package: main.clitt
6
6
  """Package initialization."""
@@ -9,4 +9,4 @@ __all__ = [
9
9
  'addons',
10
10
  'core'
11
11
  ]
12
- __version__ = '0.9.35'
12
+ __version__ = '0.9.36'
@@ -1,6 +1,6 @@
1
1
  # _*_ coding: utf-8 _*_
2
2
  #
3
- # hspylib-clitt v0.9.35
3
+ # hspylib-clitt v0.9.36
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.35'
13
+ __version__ = '0.9.36'
@@ -1,6 +1,6 @@
1
1
  # _*_ coding: utf-8 _*_
2
2
  #
3
- # hspylib-clitt v0.9.35
3
+ # hspylib-clitt v0.9.36
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.35'
13
+ __version__ = '0.9.36'
@@ -1,6 +1,6 @@
1
1
  # _*_ coding: utf-8 _*_
2
2
  #
3
- # hspylib-clitt v0.9.35
3
+ # hspylib-clitt v0.9.36
4
4
  #
5
5
  # Package: main.clitt.addons.appman.templates
6
6
  """Package initialization."""
@@ -8,4 +8,4 @@
8
8
  __all__ = [
9
9
 
10
10
  ]
11
- __version__ = '0.9.35'
11
+ __version__ = '0.9.36'
@@ -1,6 +1,6 @@
1
1
  # _*_ coding: utf-8 _*_
2
2
  #
3
- # hspylib-clitt v0.9.35
3
+ # hspylib-clitt v0.9.36
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.35'
16
+ __version__ = '0.9.36'
@@ -1,6 +1,6 @@
1
1
  # _*_ coding: utf-8 _*_
2
2
  #
3
- # hspylib-clitt v0.9.35
3
+ # hspylib-clitt v0.9.36
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.35'
14
+ __version__ = '0.9.36'
@@ -1,6 +1,6 @@
1
1
  # _*_ coding: utf-8 _*_
2
2
  #
3
- # hspylib-clitt v0.9.35
3
+ # hspylib-clitt v0.9.36
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.35'
14
+ __version__ = '0.9.36'
@@ -1,6 +1,6 @@
1
1
  # _*_ coding: utf-8 _*_
2
2
  #
3
- # hspylib-clitt v0.9.35
3
+ # hspylib-clitt v0.9.36
4
4
  #
5
5
  # Package: main.clitt.core
6
6
  """Package initialization."""
@@ -9,4 +9,4 @@ __all__ = [
9
9
  'icons',
10
10
  'tui'
11
11
  ]
12
- __version__ = '0.9.35'
12
+ __version__ = '0.9.36'
@@ -1,6 +1,6 @@
1
1
  # _*_ coding: utf-8 _*_
2
2
  #
3
- # hspylib-clitt v0.9.35
3
+ # hspylib-clitt v0.9.36
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.35'
12
+ __version__ = '0.9.36'
@@ -1,6 +1,6 @@
1
1
  # _*_ coding: utf-8 _*_
2
2
  #
3
- # hspylib-clitt v0.9.35
3
+ # hspylib-clitt v0.9.36
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.35'
12
+ __version__ = '0.9.36'
@@ -1,6 +1,6 @@
1
1
  # _*_ coding: utf-8 _*_
2
2
  #
3
- # hspylib-clitt v0.9.35
3
+ # hspylib-clitt v0.9.36
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.35'
17
+ __version__ = '0.9.36'
@@ -1,6 +1,6 @@
1
1
  # _*_ coding: utf-8 _*_
2
2
  #
3
- # hspylib-clitt v0.9.35
3
+ # hspylib-clitt v0.9.36
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.35'
20
+ __version__ = '0.9.36'
@@ -1,6 +1,6 @@
1
1
  # _*_ coding: utf-8 _*_
2
2
  #
3
- # hspylib-clitt v0.9.35
3
+ # hspylib-clitt v0.9.36
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.35'
12
+ __version__ = '0.9.36'
@@ -1,6 +1,6 @@
1
1
  # _*_ coding: utf-8 _*_
2
2
  #
3
- # hspylib-clitt v0.9.35
3
+ # hspylib-clitt v0.9.36
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.35'
14
+ __version__ = '0.9.36'
@@ -1,6 +1,6 @@
1
1
  # _*_ coding: utf-8 _*_
2
2
  #
3
- # hspylib-clitt v0.9.35
3
+ # hspylib-clitt v0.9.36
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.35'
16
+ __version__ = '0.9.36'
@@ -1,6 +1,6 @@
1
1
  # _*_ coding: utf-8 _*_
2
2
  #
3
- # hspylib-clitt v0.9.35
3
+ # hspylib-clitt v0.9.36
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.35'
19
+ __version__ = '0.9.36'
@@ -12,8 +12,8 @@
12
12
 
13
13
  Copyright 2023, HsPyLib team
14
14
  """
15
- import time
16
15
  from functools import reduce
16
+ from time import sleep
17
17
  from typing import List
18
18
 
19
19
  import pyperclip
@@ -41,6 +41,13 @@ class MenuInput(TUIComponent):
41
41
  def builder(cls) -> FormBuilder:
42
42
  return FormBuilder()
43
43
 
44
+ @staticmethod
45
+ def str_val(field: FormField) -> str:
46
+ """TODO"""
47
+ if field.value is None:
48
+ return ''
49
+ return str(field.value)
50
+
44
51
  def __init__(self, title: str, fields: List[FormField]):
45
52
  super().__init__(title)
46
53
  self.fields = fields
@@ -68,6 +75,7 @@ class MenuInput(TUIComponent):
68
75
  return None
69
76
 
70
77
  def render(self) -> None:
78
+
71
79
  set_show_cursor(False)
72
80
  self.cursor.restore()
73
81
  self.writeln(f"{self.prefs.title_color.placeholder}{self.title}%EOL%%NC%")
@@ -160,15 +168,15 @@ class MenuInput(TUIComponent):
160
168
  case InputType.SELECT:
161
169
  if keypress == Keyboard.VK_SPACE:
162
170
  if self.cur_field.value:
163
- self.cur_field.value = toggle_selected(str(self.cur_field.value or ''))
171
+ self.cur_field.value = toggle_selected(self.str_val(self.cur_field))
164
172
  case InputType.MASKED:
165
- value, mask = unpack_masked(str(self.cur_field.value or ''))
173
+ value, mask = unpack_masked(self.str_val(self.cur_field))
166
174
  try:
167
175
  self.cur_field.value = append_masked(value, mask, keypress.value)
168
176
  except InvalidInputError as err:
169
177
  self._display_error(str(err))
170
178
  case _:
171
- if len(str(self.cur_field.value or '')) < self.cur_field.max_length:
179
+ if len(self.str_val(self.cur_field)) < self.cur_field.max_length:
172
180
  if self.cur_field.validate_input(keypress.value):
173
181
  self.cur_field.value = (
174
182
  str(self.cur_field.value) if self.cur_field.value else ''
@@ -211,7 +219,7 @@ class MenuInput(TUIComponent):
211
219
  """
212
220
  match field.itype:
213
221
  case InputType.TEXT:
214
- mi_print(self.screen, str(field.value or ''), field_len=self.max_value_length)
222
+ mi_print(self.screen, self.str_val(field), field_len=self.max_value_length)
215
223
  case InputType.PASSWORD:
216
224
  mi_print(self.screen, "*" * field.length, field_len=self.max_value_length)
217
225
  case InputType.CHECKBOX:
@@ -243,7 +251,7 @@ class MenuInput(TUIComponent):
243
251
  count = len(re.split(VALUE_SEPARATORS, field.value))
244
252
  self.writeln(fmt.format(field.icon, idx + 1 if idx >= 0 else 1, count))
245
253
  elif field.itype == InputType.MASKED:
246
- value, mask = unpack_masked(str(field.value or ''))
254
+ value, mask = unpack_masked(self.str_val(field))
247
255
  self.writeln(fmt.format(
248
256
  field.icon,
249
257
  reduce(lambda n, m: n + m, list(map(lambda s: mask[:len(value)].count(s), MASK_SYMBOLS))),
@@ -263,18 +271,18 @@ class MenuInput(TUIComponent):
263
271
  if self.tab_index == field_index:
264
272
  self.cur_row, self.cur_col = f_pos[0], f_pos[1] + field_size
265
273
 
266
- def _display_error(self, err_msg) -> None:
274
+ def _display_error(self, err_msg: str) -> None:
267
275
  """Display a form filling or submitting error.
268
276
  :param err_msg: the error message.
269
277
  """
270
278
  set_enable_echo(False)
271
279
  set_show_cursor(False)
272
- offset = 16 # Magic number :D . That is the value to best fit the message along with the form.
273
- err_pos = self.max_label_length + self.max_value_length + self.max_detail_length + offset
280
+ offset = 15 # Sum of minput used characters that are not related to the field.
281
+ err_pos = offset + self.max_label_length + self.max_value_length + self.max_detail_length
274
282
  self.cursor.move_to(self.cur_row, err_pos)
275
- mi_print_err(self.screen, f"{FormIcons.ERROR_CIRCLE} {err_msg}")
283
+ mi_print_err(self.screen, f"{FormIcons.ARROW_LEFT} {err_msg}")
276
284
  # This calculation gives a good delay amount based on the size of the message.
277
- time.sleep(max(1.8, int(len(err_msg) / 24)))
285
+ sleep(max(2.0, int(len(err_msg) / 21)))
278
286
  set_enable_echo()
279
287
  # Erase the message after the timeout
280
288
  self.cursor.move_to(self.cur_row, err_pos)
@@ -1,6 +1,6 @@
1
1
  # _*_ coding: utf-8 _*_
2
2
  #
3
- # hspylib-clitt v0.9.35
3
+ # hspylib-clitt v0.9.36
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.35'
12
+ __version__ = '0.9.36'
@@ -1,6 +1,6 @@
1
1
  # _*_ coding: utf-8 _*_
2
2
  #
3
- # hspylib-clitt v0.9.35
3
+ # hspylib-clitt v0.9.36
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.35'
11
+ __version__ = '0.9.36'
@@ -12,13 +12,16 @@
12
12
 
13
13
  Copyright 2023, HsPyLib team
14
14
  """
15
+ import csv
16
+ import os
17
+ from typing import Iterable, List
18
+
15
19
  from hspylib.core.enums.enumeration import Enumeration
16
20
  from hspylib.core.preconditions import check_argument
17
21
  from hspylib.core.tools.commons import file_is_not_empty, sysout
18
22
  from hspylib.core.tools.text_tools import elide_text, justified_center, justified_left, justified_right, titlecase
19
- from typing import Iterable, List
20
23
 
21
- import csv
24
+ from clitt.core.tui.tui_screen import TUIScreen
22
25
 
23
26
 
24
27
  class TableRenderer:
@@ -27,20 +30,26 @@ class TableRenderer:
27
30
  DEFAULT_MINIMUM_CELL_SIZE = 6
28
31
 
29
32
  @staticmethod
30
- def from_csv(filepath: str, caption: str | None = None, delimiter: chr = ",") -> "TableRenderer":
31
- """TODO"""
32
-
33
+ def import_csv(
34
+ filepath: str,
35
+ caption: str | None = None,
36
+ has_headers: bool = True,
37
+ delimiter: chr = ",") -> "TableRenderer":
38
+ """Render the table based on a CSV file."""
33
39
  check_argument(file_is_not_empty(filepath), f"File not found: {filepath}")
34
40
  headers, data = None, []
35
41
  with open(filepath, encoding="UTF8") as csv_file:
36
42
  csv_reader = csv.reader(csv_file, delimiter=delimiter)
37
43
  line_count = 0
38
44
  for row in csv_reader:
39
- if line_count == 0:
40
- headers = row
41
- else:
42
- data.append(row)
43
45
  line_count += 1
46
+ if line_count == 1:
47
+ if has_headers:
48
+ headers = row
49
+ continue
50
+ else:
51
+ headers = [f"C{idx}" for idx, _ in enumerate(row)]
52
+ data.append(row)
44
53
  return TableRenderer(headers, data, caption)
45
54
 
46
55
  class TextAlignment(Enumeration):
@@ -66,15 +75,28 @@ class TableRenderer:
66
75
  self._header_alignment = TableRenderer.TextAlignment.CENTER
67
76
  self._cell_alignment = TableRenderer.TextAlignment.LEFT
68
77
  self._min_cell_size = self.DEFAULT_MINIMUM_CELL_SIZE
78
+ self._screen = TUIScreen.INSTANCE
79
+
69
80
  if data:
70
81
  check_argument(
71
82
  len(min(data, key=len)) == len(self._headers),
72
83
  "Headers and Columns must have the same size: {} vs {}",
73
- len(min(data, key=len)),
74
- len(self._headers),
84
+ len(min(data, key=len)), len(self._headers),
75
85
  )
86
+
76
87
  self._column_sizes = [self._min_cell_size for _ in self._headers]
77
88
 
89
+ @property
90
+ def cursor(self) -> TUIScreen.Cursor:
91
+ return self._screen.cursor
92
+
93
+ def write(self, data: str) -> None:
94
+ """TODO"""
95
+ if TUIScreen.INSTANCE:
96
+ self.write(data)
97
+ else:
98
+ sysout(data)
99
+
78
100
  def set_header_alignment(self, alignment: TextAlignment) -> None:
79
101
  """Set table headers alignment.
80
102
  :param alignment: table header text alignment function.
@@ -147,14 +169,20 @@ class TableRenderer:
147
169
  """Render the table.
148
170
  :return: None
149
171
  """
150
- header_row, data_rows = self._format_header_row(), self._format_data_rows()
172
+ header_line, data_lines = self._format_header_row(), self._format_data_rows()
151
173
  table_line = "+" + "+".join(f"{'-' * (self._column_sizes[idx] + 2)}" for idx in self._columns) + "+"
152
- self._render_table(table_line, header_row, data_rows)
174
+ self._render_table(table_line, header_line, data_lines)
153
175
 
154
- def to_csv(self, filepath: str) -> None:
176
+ def export_csv(
177
+ self,
178
+ filepath: str,
179
+ delimiter: chr = ',',
180
+ has_headers: bool = True) -> None:
181
+ """TODO"""
155
182
  with open(filepath, "w", encoding="UTF8") as csv_file:
156
- writer = csv.writer(csv_file)
157
- writer.writerow(self._headers)
183
+ writer = csv.writer(csv_file, delimiter=delimiter)
184
+ if has_headers:
185
+ writer.writerow(self._headers)
158
186
  writer.writerows(self._data)
159
187
 
160
188
  def _format_header_row(self) -> str:
@@ -199,11 +227,12 @@ class TableRenderer:
199
227
  """
200
228
  line_length, render_line = len(table_line) - 4, f"+{table_line[1:-1]}+"
201
229
  empty_line = f"| {'<empty>': ^{line_length}} |"
202
- sysout(render_line.replace("+", "-"))
203
230
  if self._caption:
204
- sysout(f"| {elide_text(self._caption, line_length): ^{line_length}} |")
205
- sysout(render_line)
206
- sysout(header_row)
207
- sysout(render_line)
208
- sysout(f"{'%EOL%'.join(data_rows) if data_rows else empty_line}")
209
- sysout(render_line.replace("+", "-"))
231
+ border_line = render_line.replace("+", "-")
232
+ self.write(border_line)
233
+ self.write(f"| {elide_text(self._caption, line_length): ^{line_length}} |")
234
+ self.write(render_line)
235
+ self.write(header_row)
236
+ self.write(render_line)
237
+ self.write(f"{os.linesep.join(data_rows) if data_rows else empty_line}")
238
+ self.write(render_line)
@@ -68,7 +68,7 @@ class TUIComponent(ABC):
68
68
  self._screen.add_watcher(self.invalidate)
69
69
  set_auto_wrap(auto_wrap)
70
70
  set_show_cursor(show_cursor)
71
- self._screen.clear()
71
+ self.screen.clear()
72
72
  self.cursor.save()
73
73
 
74
74
  def _loop(self, break_keys: List[Keyboard] = None) -> Keyboard:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hspylib-clitt
3
- Version: 0.9.35
3
+ Version: 0.9.36
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](https://badgen.net/badge/license/MIT/gray)](LICENSE.md)
33
- [![Release](https://badgen.net/badge/release/v0.9.35/gray)](CHANGELOG.md#unreleased)
33
+ [![Release](https://badgen.net/badge/release/v0.9.36/gray)](CHANGELOG.md#unreleased)
34
34
  [![PyPi](https://badgen.net/badge/icon/python?icon=pypi&label)](https://pypi.org/project/hspylib-cfman)
35
35
  [![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com/yorevs/hspylib)
36
36
  [![Gitter](https://badgen.net/badge/icon/gitter?icon=gitter&label)](https://gitter.im/hspylib/community)
@@ -1 +0,0 @@
1
- 0.9.35
File without changes
File without changes