loopstring 0.0.4__tar.gz → 0.1.0__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: loopstring
3
- Version: 0.0.4
3
+ Version: 0.1.0
4
4
  Summary: Terminal utilities
5
5
  Requires-Python: >=3.7
6
6
  Description-Content-Type: text/markdown
@@ -30,8 +30,8 @@ pip install loopstring
30
30
  ```python
31
31
  from loopstring import BOXES
32
32
 
33
- # Draw a clean rounded box around your text
34
- print(BOXES.rounded("System Online"))
33
+ # Draw a clean rounded box using the style parameter
34
+ print(BOXES.draw_box("System Online", style="rounded"))
35
35
  ```
36
36
 
37
37
  ### 2. Styling Terminal Text
@@ -23,8 +23,8 @@ pip install loopstring
23
23
  ```python
24
24
  from loopstring import BOXES
25
25
 
26
- # Draw a clean rounded box around your text
27
- print(BOXES.rounded("System Online"))
26
+ # Draw a clean rounded box using the style parameter
27
+ print(BOXES.draw_box("System Online", style="rounded"))
28
28
  ```
29
29
 
30
30
  ### 2. Styling Terminal Text
@@ -0,0 +1,3 @@
1
+ from .loopstring import FG, BG, FORMAT, BOXES, SYMBOLS
2
+
3
+ __all__ = ['FG', 'BG', 'FORMAT', 'BOXES', 'SYMBOLS']
@@ -38,40 +38,53 @@ class BOXES:
38
38
 
39
39
  Supported styles: 'light', 'heavy', 'double', 'rounded', 'dashed'
40
40
  """
41
- # Define unicode box-drawing character maps
41
+ # ... keep all your existing draw_box code exactly the same ...
42
42
  glyphs = {
43
43
  'light': {'h': '─', 'v': '│', 'tl': '┌', 'tr': '┐', 'bl': '└', 'br': '┘'},
44
44
  'heavy': {'h': '━', 'v': '┃', 'tl': '┏', 'tr': '┓', 'bl': '┗', 'br': '┛'},
45
45
  'double': {'h': '═', 'v': '║', 'tl': '╔', 'tr': '╗', 'bl': '╚', 'br': '╝'},
46
46
  'rounded': {'h': '─', 'v': '│', 'tl': '╭', 'tr': '╮', 'bl': '╰', 'br': '╯'},
47
- # Using a triple-dash pattern for the dashed style
48
47
  'dashed': {'h': '┄', 'v': '┆', 'tl': '┌', 'tr': '┐', 'bl': '└', 'br': '┘'}
49
48
  }
50
-
51
- # Fallback to light style if an invalid style is passed
52
49
  g = glyphs.get(style.lower(), glyphs['light'])
53
-
54
- # Split text into lines and find the longest line to set box width
55
50
  lines = text.split('\n')
56
51
  max_width = max(len(line) for line in lines) if lines else 0
57
-
58
- # Construct the box layers
59
52
  box = []
60
53
  box.append(f"{g['tl']}{g['h'] * (max_width + 2)}{g['tr']}")
61
-
62
54
  for line in lines:
63
55
  box.append(f"{g['v']} {line.ljust(max_width)} {g['v']}")
64
-
65
56
  box.append(f"{g['bl']}{g['h'] * (max_width + 2)}{g['br']}")
66
-
67
57
  return '\n'.join(box)
58
+
59
+ # 🚀 NEW SHORTCUTS FOR VERSION 0.0.5 🚀
60
+ @staticmethod
61
+ def rounded(text: str) -> str:
62
+ """Shortcut to draw a rounded box."""
63
+ return BOXES.draw_box(text, style='rounded')
64
+
65
+ @staticmethod
66
+ def heavy(text: str) -> str:
67
+ """Shortcut to draw a heavy box."""
68
+ return BOXES.draw_box(text, style='heavy')
69
+
70
+ @staticmethod
71
+ def double(text: str) -> str:
72
+ """Shortcut to draw a double box."""
73
+ return BOXES.draw_box(text, style='double')
74
+
75
+ @staticmethod
76
+ def dashed(text: str) -> str:
77
+ """Shortcut to draw a dashed box."""
78
+ return BOXES.draw_box(text, style='dashed')
79
+
68
80
 
69
81
  class SYMBOLS:
70
- """Cool symbols!"""
71
- HEXAGON = '⬢'
72
- PENTAGON = ''
73
- STAR = ''
74
- DOWNLOAD = ''
82
+ """Cool symbols for layouts, dashboards, and loading bars!"""
83
+ # Original Symbols
84
+ HEXAGON = ''
85
+ PENTAGON = ''
86
+ STAR = ''
87
+ DOWNLOAD = '⤓'
75
88
  LIGHTSHADE = '░'
76
89
  MEDIUMSHADE = '▒'
77
90
  DARKSHADE = '▓'
@@ -87,5 +100,22 @@ class SYMBOLS:
87
100
  RIGHTTRIANGLE = '▷'
88
101
  ASTROIDSTAR = '✦'
89
102
 
90
- print(BOXES.draw_box("lol", "heavy"))
91
- print(FORMAT.BOLD + "text")
103
+ MONITOR = '🖵' # U+1F5B5 - Physical monitor screen layout
104
+ CLEAR_SCREEN = '⎚' # U+239A - Classic wipe/clear screen icon
105
+ PROMPT = '❯' # U+276F - Modern CLI input hook
106
+ NETWORK = '🛜︎' # U+1F6DC - Wi-Fi/Network status indicator
107
+
108
+ FILL_1_8 = '▏' # U+258F - Left 1/8 block fill
109
+ FILL_1_4 = '▎' # U+258E - Left 1/4 block fill
110
+ FILL_HALF = '▌' # U+258C - Left half block fill
111
+ FILL_3_4 = '▊' # U+258A - Left 3/4 block fill
112
+
113
+ FOLDER_CLOSED = '🗀' # U+1F5C0 - Closed directory item
114
+ FOLDER_OPEN = '🗁' # U+1F5C1 - Expanded directory folder
115
+ DOCUMENT = '🖹' # U+1F5B9 - Log/Text file symbol
116
+ TRASH = '🗑︎' # U+1F5D1 - Delete/Erase storage indicator
117
+
118
+ LOOP_INFINITY = '∞' # U+221E - Infinity track loop
119
+ LOOP_SINGLE = '➰︎' # U+27B0 - Light curly loop curl
120
+ LOOP_DOUBLE = '➿︎' # U+27BF - Double curly loop hook
121
+ LOOP_REFRESH = '⥁' # U+2941 - Circular reload sequence
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: loopstring
3
- Version: 0.0.4
3
+ Version: 0.1.0
4
4
  Summary: Terminal utilities
5
5
  Requires-Python: >=3.7
6
6
  Description-Content-Type: text/markdown
@@ -30,8 +30,8 @@ pip install loopstring
30
30
  ```python
31
31
  from loopstring import BOXES
32
32
 
33
- # Draw a clean rounded box around your text
34
- print(BOXES.rounded("System Online"))
33
+ # Draw a clean rounded box using the style parameter
34
+ print(BOXES.draw_box("System Online", style="rounded"))
35
35
  ```
36
36
 
37
37
  ### 2. Styling Terminal Text
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "loopstring"
7
- version = "0.0.4"
7
+ version = "0.1.0"
8
8
  description = "Terminal utilities"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.7"
@@ -1,7 +0,0 @@
1
- # loopstring/__init__.py
2
-
3
- # Explicitly pull the classes from your main code file into the package front door
4
- from .loopstring import FG, BG, FORMAT, BOXES
5
-
6
- # Expose them for when people use "from loopstring import *"
7
- __all__ = ['FG', 'BG', 'FORMAT', 'BOXES']
File without changes
File without changes