color-ascii-magic-genai 0.0.1__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.
@@ -0,0 +1,31 @@
1
+ Metadata-Version: 2.4
2
+ Name: color_ascii_magic_genai
3
+ Version: 0.0.1
4
+ Summary: A small example package for generating colored ASCII art
5
+ Project-URL: Homepage, https://github.com/example/color_ascii_magic_genai
6
+ Author-email: Prasoon Kumar <prasoonkumar@example.com>
7
+ Classifier: License :: OSI Approved :: MIT License
8
+ Classifier: Operating System :: OS Independent
9
+ Classifier: Programming Language :: Python :: 3
10
+ Requires-Python: >=3.7
11
+ Requires-Dist: art
12
+ Requires-Dist: termcolor
13
+ Description-Content-Type: text/markdown
14
+
15
+ # Color ASCII Magic GenAI
16
+
17
+ This is a simple package to generate ASCII art with colors.
18
+
19
+ ## Installation
20
+
21
+ ```bash
22
+ pip install color_ascii_magic_genai
23
+ ```
24
+
25
+ ## Usage
26
+
27
+ ```python
28
+ from color_ascii_magic_genai import colorize_text
29
+
30
+ print(colorize_text("Hello World", color="red"))
31
+ ```
@@ -0,0 +1,17 @@
1
+ # Color ASCII Magic GenAI
2
+
3
+ This is a simple package to generate ASCII art with colors.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pip install color_ascii_magic_genai
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```python
14
+ from color_ascii_magic_genai import colorize_text
15
+
16
+ print(colorize_text("Hello World", color="red"))
17
+ ```
@@ -0,0 +1,25 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "color_ascii_magic_genai"
7
+ version = "0.0.1"
8
+ authors = [
9
+ { name="Prasoon Kumar", email="prasoonkumar@example.com" },
10
+ ]
11
+ description = "A small example package for generating colored ASCII art"
12
+ readme = "README.md"
13
+ requires-python = ">=3.7"
14
+ classifiers = [
15
+ "Programming Language :: Python :: 3",
16
+ "License :: OSI Approved :: MIT License",
17
+ "Operating System :: OS Independent",
18
+ ]
19
+ dependencies = [
20
+ "art",
21
+ "termcolor",
22
+ ]
23
+
24
+ [project.urls]
25
+ "Homepage" = "https://github.com/example/color_ascii_magic_genai"
@@ -0,0 +1,21 @@
1
+ from art import text2art
2
+ from termcolor import colored
3
+
4
+ def colorize_text(text: str, color: str = 'white', font: str = 'block') -> str:
5
+ """
6
+ Generates ASCII art from text and colorizes it.
7
+
8
+ Args:
9
+ text (str): The text to convert to ASCII art.
10
+ color (str): The color to apply. Supported colors: red, green, yellow, blue, magenta, cyan, white.
11
+ font (str): The font style for ASCII art.
12
+
13
+ Returns:
14
+ str: Colored ASCII art string.
15
+ """
16
+ ascii_art = text2art(text, font=font)
17
+ return colored(ascii_art, color)
18
+
19
+ def available_colors():
20
+ """Returns a list of available colors."""
21
+ return ['red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white']
@@ -0,0 +1,13 @@
1
+ import pytest
2
+ from color_ascii_magic_genai import colorize_text, available_colors
3
+
4
+ def test_available_colors():
5
+ colors = available_colors()
6
+ assert 'red' in colors
7
+ assert 'blue' in colors
8
+
9
+ def test_colorize_text_basic():
10
+ # Just checking it doesn't crash and returns a string
11
+ res = colorize_text("test", color="red")
12
+ assert isinstance(res, str)
13
+ assert len(res) > 0