my-banner-cli 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.
File without changes
@@ -0,0 +1,9 @@
1
+ Metadata-Version: 2.4
2
+ Name: my_banner_cli
3
+ Version: 0.1.0
4
+ Summary: A terminal utility to print awesome stylized ASCII art banners
5
+ Requires-Python: >=3.7
6
+ Description-Content-Type: text/markdown
7
+ License-File: License
8
+ Requires-Dist: rich>=13.0.0
9
+ Dynamic: license-file
File without changes
@@ -0,0 +1,16 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "my_banner_cli"
7
+ version = "0.1.0"
8
+ description = "A terminal utility to print awesome stylized ASCII art banners"
9
+ readme = "README.md"
10
+ requires-python = ">=3.7"
11
+ dependencies = [
12
+ "rich>=13.0.0", # Tells pip to install rich automatically!
13
+ ]
14
+
15
+ [tool.setuptools.packages.find]
16
+ where = ["src"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,9 @@
1
+ Metadata-Version: 2.4
2
+ Name: my_banner_cli
3
+ Version: 0.1.0
4
+ Summary: A terminal utility to print awesome stylized ASCII art banners
5
+ Requires-Python: >=3.7
6
+ Description-Content-Type: text/markdown
7
+ License-File: License
8
+ Requires-Dist: rich>=13.0.0
9
+ Dynamic: license-file
@@ -0,0 +1,10 @@
1
+ License
2
+ README.md
3
+ pyproject.toml
4
+ src/my_banner_cli.egg-info/PKG-INFO
5
+ src/my_banner_cli.egg-info/SOURCES.txt
6
+ src/my_banner_cli.egg-info/dependency_links.txt
7
+ src/my_banner_cli.egg-info/requires.txt
8
+ src/my_banner_cli.egg-info/top_level.txt
9
+ src/my_package/__init__.py
10
+ src/my_package/module.py
@@ -0,0 +1 @@
1
+ rich>=13.0.0
@@ -0,0 +1 @@
1
+ from .module import generate_banner
@@ -0,0 +1,51 @@
1
+ from rich.console import Console
2
+ from rich.panel import Panel
3
+
4
+ console = Console()
5
+
6
+ # A miniature, custom dictionary grid for block letters (A-Z)
7
+ BLOCK_LETTERS = {
8
+ 'A': [" ■■■ ", " ■ ■ ", " ■■■■■ ", " ■ ■ ", " ■ ■ "],
9
+ 'B': [" ■■■■ ", " ■ ■ ", " ■■■■ ", " ■ ■ ", " ■■■■ "],
10
+ 'C': [" ■■■■ ", " ■ ", " ■ ", " ■ ", " ■■■■ "],
11
+ 'H': [" ■ ■ ", " ■ ■ ", " ■■■■■ ", " ■ ■ ", " ■ ■ "],
12
+ 'E': [" ■■■■■ ", " ■ ", " ■■■ ", " ■ ", " ■■■■■ "],
13
+ 'L': [" ■ ", " ■ ", " ■ ", " ■ ", " ■■■■■ "],
14
+ 'O': [" ■■■ ", " ■ ■ ", " ■ ■ ", " ■ ■ ", " ■■■ "],
15
+ 'P': [" ■■■■ ", " ■ ■ ", " ■■■■ ", " ■ ", " ■ "],
16
+ 'R': [" ■■■■ ", " ■ ■ ", " ■■■■ ", " ■ ■ ", " ■ ■ "],
17
+ 'S': [" ■■■■ ", " ■ ", " ■■■ ", " ■ ", " ■■■■ "],
18
+ 'T': [" ■■■■■ ", " ■ ", " ■ ", " ■ ", " ■ "],
19
+ 'Y': [" ■ ■ ", " ■ ■ ", " ■ ", " ■ ", " ■ "],
20
+ }
21
+
22
+
23
+ def generate_banner(text: str, color: str = "cyan", style: str = "bold"):
24
+ """Generates a large ASCII block banner wrapped inside a styled terminal panel."""
25
+ clean_text = text.upper().strip()
26
+
27
+ # Initialize 5 empty rows for the height of our block font
28
+ lines = ["", "", "", "", ""]
29
+
30
+ # Construct the characters line by line side-by-side
31
+ for char in clean_text:
32
+ if char in BLOCK_LETTERS:
33
+ for i in range(5):
34
+ lines[i] += BLOCK_LETTERS[char] + " "
35
+ else:
36
+ # Handle spaces or unsupported characters smoothly
37
+ for i in range(5):
38
+ lines[i] += " "
39
+
40
+ banner_content = "\n".join(lines)
41
+
42
+ # Wrap it inside a beautiful Rich panel
43
+ panel = Panel(
44
+ banner_content,
45
+ title="[reverse] BANNER GENERATOR [/reverse]",
46
+ subtitle=f"Style: {style} | Color: {color}",
47
+ style=f"{style} {color}",
48
+ expand=False
49
+ )
50
+
51
+ console.print(panel)