tui-utilities 1.0.7__tar.gz → 1.0.9__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tui_utilities
3
- Version: 1.0.7
3
+ Version: 1.0.9
4
4
  Summary: Personal-use console utilities library
5
5
  Author-email: Guido Iván Gross <grossguidoivan@gmail.com>
6
6
  License: MIT
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "tui_utilities"
3
- version = "1.0.7"
3
+ version = "1.0.9"
4
4
  description = "Personal-use console utilities library"
5
5
  readme = "README.md"
6
6
  license = {text = "MIT"}
@@ -1,4 +1,4 @@
1
- from .console import print, input
1
+ from .console import print, input, clear_console
2
2
  import sys
3
3
  import traceback
4
4
 
@@ -18,10 +18,57 @@ def _choose_option(
18
18
 
19
19
  def menu(
20
20
  options_list,
21
+ title,
22
+ title_color = "#ffffff",
23
+ title_bold = True,
24
+ title_italic = False,
25
+ title_underline = False,
26
+ title_strike = False,
27
+ title_reverse = False,
28
+ title_alignment = "center",
29
+ title_padding = 0,
30
+ title_top_padding = None,
31
+ title_right_padding = None,
32
+ title_bottom_padding = 1,
33
+ title_left_padding = None,
34
+ separator_length = 100,
35
+ separator_color = "#ffffff",
36
+ separator_aligment = "center",
37
+ separator_padding = 0,
38
+ separator_top_padding = None,
39
+ separator_right_padding = None,
40
+ separator_bottom_padding = 2,
41
+ separator_left_padding = None,
21
42
  message = "Seleccione una opción:",
22
43
  selection_text = "Su elección: ",
23
44
  error = "La opción ingresada no es válida, intente nuevamente"
24
45
  ):
46
+ clear_console()
47
+ print(
48
+ object = title,
49
+ color = title_color,
50
+ bold = title_bold,
51
+ italic = title_italic,
52
+ underline = title_underline,
53
+ strike = title_strike,
54
+ reverse = title_reverse,
55
+ alignment = title_alignment,
56
+ padding = title_padding,
57
+ top_padding = title_top_padding,
58
+ right_padding = title_right_padding,
59
+ bottom_padding = title_bottom_padding,
60
+ left_padding = title_left_padding
61
+ )
62
+ separator(
63
+ length = separator_length,
64
+ color = separator_color,
65
+ aligment = separator_aligment,
66
+ padding = separator_padding,
67
+ top_padding = separator_top_padding,
68
+ right_padding = separator_right_padding,
69
+ bottom_padding = separator_bottom_padding,
70
+ left_padding = separator_left_padding
71
+ )
25
72
  options = {}
26
73
  key = 1
27
74
  for option in options_list:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tui_utilities
3
- Version: 1.0.7
3
+ Version: 1.0.9
4
4
  Summary: Personal-use console utilities library
5
5
  Author-email: Guido Iván Gross <grossguidoivan@gmail.com>
6
6
  License: MIT
File without changes
File without changes