textfmt 0.1.0__tar.gz → 0.1.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.
textfmt-0.1.1/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Rihaan Meher
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,16 +1,18 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: textfmt
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: A Python module for ANSI text formatting, word art, and table styling
5
5
  Author-email: Rihaan Meher <meherrihaan@gmail.com>
6
6
  License: MIT
7
7
  Project-URL: Homepage, https://github.com/sharktide/textformat
8
8
  Requires-Python: >=3.6
9
9
  Description-Content-Type: text/markdown
10
+ License-File: LICENSE
11
+ Dynamic: license-file
10
12
 
11
- # textfmt
13
+ # TextFormat
12
14
 
13
- A lightweight Python module for ANSI text formatting, customizable word art, and table rendering in CLI applications.
15
+ TextFormat is a lightweight Python module for ANSI text formatting, customizable word art, and table rendering in CLI applications.
14
16
 
15
17
  ## Features
16
18
  - **ANSI Colors & Styles** – Easily format text using intuitive color mappings.
@@ -20,38 +22,39 @@ A lightweight Python module for ANSI text formatting, customizable word art, and
20
22
  ## Installation
21
23
  Install via PyPI:
22
24
  ```sh
23
- pip install textformat
25
+ pip install textfmt
24
26
  ```
25
27
 
26
28
  ## Usage
27
-
28
29
  Basic Text Formatting
29
-
30
30
  ```python
31
- import textfmt
31
+ from textformat import TextFormat
32
32
 
33
- print(textfmt.TextFmt.style("Hello, World!", textfmt.TextFmt.BOLD, textfmt.TextFmt.COLORS["blue"]))
33
+ print(TextFormat.style("Hello, World!", TextFormat.BOLD, TextFormat.COLORS["blue"]))
34
34
  ```
35
35
 
36
36
  Custom Word Art Banner
37
+
37
38
  ```python
38
- import textfmt.word_art
39
+ from textformat.word_art import WordArt
39
40
 
40
- print(textfmt.word_art.WordArt.banner("TEXTFMT", char="*", width=40))
41
+ print(WordArt.banner("TEXTFORMAT", char="*", width=40))
41
42
  ```
42
43
 
43
44
  Table Rendering
44
45
  ```python
45
- import textfmt.table
46
+ from textformat.table import TableFormatter
46
47
 
47
- headers = ["Name", "Color", "Effect"]
48
+ headers = ["Feature", "Color", "Effect"]
48
49
  data = [
49
50
  ["Bold", "White", "Strong emphasis"],
50
51
  ["Underline", "Blue", "Text decoration"],
51
52
  ["Warning", "Yellow", "Cautionary message"],
52
53
  ]
53
54
 
54
- print(textfmt.table.TableFormatter.generate(headers, data))
55
+ print(TableFormatter.generate(headers, data))
55
56
  ```
57
+
56
58
  ## License
59
+
57
60
  MIT License – Free to use and modify.
@@ -0,0 +1,48 @@
1
+ # TextFormat
2
+
3
+ TextFormat is a lightweight Python module for ANSI text formatting, customizable word art, and table rendering in CLI applications.
4
+
5
+ ## Features
6
+ - **ANSI Colors & Styles** – Easily format text using intuitive color mappings.
7
+ - **Customizable Word Art** – Generate banners with adjustable characters and widths.
8
+ - **Table Formatting** – Display structured data in a clean, readable format.
9
+
10
+ ## Installation
11
+ Install via PyPI:
12
+ ```sh
13
+ pip install textfmt
14
+ ```
15
+
16
+ ## Usage
17
+ Basic Text Formatting
18
+ ```python
19
+ from textformat import TextFormat
20
+
21
+ print(TextFormat.style("Hello, World!", TextFormat.BOLD, TextFormat.COLORS["blue"]))
22
+ ```
23
+
24
+ Custom Word Art Banner
25
+
26
+ ```python
27
+ from textformat.word_art import WordArt
28
+
29
+ print(WordArt.banner("TEXTFORMAT", char="*", width=40))
30
+ ```
31
+
32
+ Table Rendering
33
+ ```python
34
+ from textformat.table import TableFormatter
35
+
36
+ headers = ["Feature", "Color", "Effect"]
37
+ data = [
38
+ ["Bold", "White", "Strong emphasis"],
39
+ ["Underline", "Blue", "Text decoration"],
40
+ ["Warning", "Yellow", "Cautionary message"],
41
+ ]
42
+
43
+ print(TableFormatter.generate(headers, data))
44
+ ```
45
+
46
+ ## License
47
+
48
+ MIT License – Free to use and modify.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "textfmt"
7
- version = "0.1.0"
7
+ version = "0.1.1"
8
8
  description = "A Python module for ANSI text formatting, word art, and table styling"
9
9
  authors = [{name = "Rihaan Meher", email = "meherrihaan@gmail.com"}]
10
10
  license = {text = "MIT"}
@@ -1,16 +1,18 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: textfmt
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: A Python module for ANSI text formatting, word art, and table styling
5
5
  Author-email: Rihaan Meher <meherrihaan@gmail.com>
6
6
  License: MIT
7
7
  Project-URL: Homepage, https://github.com/sharktide/textformat
8
8
  Requires-Python: >=3.6
9
9
  Description-Content-Type: text/markdown
10
+ License-File: LICENSE
11
+ Dynamic: license-file
10
12
 
11
- # textfmt
13
+ # TextFormat
12
14
 
13
- A lightweight Python module for ANSI text formatting, customizable word art, and table rendering in CLI applications.
15
+ TextFormat is a lightweight Python module for ANSI text formatting, customizable word art, and table rendering in CLI applications.
14
16
 
15
17
  ## Features
16
18
  - **ANSI Colors & Styles** – Easily format text using intuitive color mappings.
@@ -20,38 +22,39 @@ A lightweight Python module for ANSI text formatting, customizable word art, and
20
22
  ## Installation
21
23
  Install via PyPI:
22
24
  ```sh
23
- pip install textformat
25
+ pip install textfmt
24
26
  ```
25
27
 
26
28
  ## Usage
27
-
28
29
  Basic Text Formatting
29
-
30
30
  ```python
31
- import textfmt
31
+ from textformat import TextFormat
32
32
 
33
- print(textfmt.TextFmt.style("Hello, World!", textfmt.TextFmt.BOLD, textfmt.TextFmt.COLORS["blue"]))
33
+ print(TextFormat.style("Hello, World!", TextFormat.BOLD, TextFormat.COLORS["blue"]))
34
34
  ```
35
35
 
36
36
  Custom Word Art Banner
37
+
37
38
  ```python
38
- import textfmt.word_art
39
+ from textformat.word_art import WordArt
39
40
 
40
- print(textfmt.word_art.WordArt.banner("TEXTFMT", char="*", width=40))
41
+ print(WordArt.banner("TEXTFORMAT", char="*", width=40))
41
42
  ```
42
43
 
43
44
  Table Rendering
44
45
  ```python
45
- import textfmt.table
46
+ from textformat.table import TableFormatter
46
47
 
47
- headers = ["Name", "Color", "Effect"]
48
+ headers = ["Feature", "Color", "Effect"]
48
49
  data = [
49
50
  ["Bold", "White", "Strong emphasis"],
50
51
  ["Underline", "Blue", "Text decoration"],
51
52
  ["Warning", "Yellow", "Cautionary message"],
52
53
  ]
53
54
 
54
- print(textfmt.table.TableFormatter.generate(headers, data))
55
+ print(TableFormatter.generate(headers, data))
55
56
  ```
57
+
56
58
  ## License
59
+
57
60
  MIT License – Free to use and modify.
@@ -1,3 +1,4 @@
1
+ LICENSE
1
2
  README.md
2
3
  pyproject.toml
3
4
  textfmt.egg-info/PKG-INFO
@@ -0,0 +1,5 @@
1
+ # textfmt/__init__.py
2
+ from .textformat import TextFormat, bcolors
3
+ from .word_art import WordArt
4
+ from .table import TableFormatter
5
+ __all__ = ["TextFormat", "bcolors", "WordArt", "TableFormatter"]
@@ -1,3 +1,15 @@
1
+ class bcolors:
2
+ HEADER = '\033[95m'
3
+ OKBLUE = '\033[94m'
4
+ OKCYAN = '\033[96m'
5
+ OKGREEN = '\033[92m'
6
+ NOTE = '\x1b[35m'
7
+ WARNING = '\033[93m'
8
+ FAIL = '\033[91m'
9
+ ENDC = '\033[0m'
10
+ BOLD = '\033[1m'
11
+ UNDERLINE = '\033[4m'
12
+
1
13
  class TextFormat:
2
14
  """ ANSI Escape Code Formatting for Python CLI Output """
3
15
  RESET = "\x1b[0m"
textfmt-0.1.0/README.md DELETED
@@ -1,47 +0,0 @@
1
- # textfmt
2
-
3
- A lightweight Python module for ANSI text formatting, customizable word art, and table rendering in CLI applications.
4
-
5
- ## Features
6
- - **ANSI Colors & Styles** – Easily format text using intuitive color mappings.
7
- - **Customizable Word Art** – Generate banners with adjustable characters and widths.
8
- - **Table Formatting** – Display structured data in a clean, readable format.
9
-
10
- ## Installation
11
- Install via PyPI:
12
- ```sh
13
- pip install textformat
14
- ```
15
-
16
- ## Usage
17
-
18
- Basic Text Formatting
19
-
20
- ```python
21
- import textfmt
22
-
23
- print(textfmt.TextFmt.style("Hello, World!", textfmt.TextFmt.BOLD, textfmt.TextFmt.COLORS["blue"]))
24
- ```
25
-
26
- Custom Word Art Banner
27
- ```python
28
- import textfmt.word_art
29
-
30
- print(textfmt.word_art.WordArt.banner("TEXTFMT", char="*", width=40))
31
- ```
32
-
33
- Table Rendering
34
- ```python
35
- import textfmt.table
36
-
37
- headers = ["Name", "Color", "Effect"]
38
- data = [
39
- ["Bold", "White", "Strong emphasis"],
40
- ["Underline", "Blue", "Text decoration"],
41
- ["Warning", "Yellow", "Cautionary message"],
42
- ]
43
-
44
- print(textfmt.table.TableFormatter.generate(headers, data))
45
- ```
46
- ## License
47
- MIT License – Free to use and modify.
@@ -1,6 +0,0 @@
1
- # textfmt/__init__.py
2
- from .textformat import TextFormat
3
- from .word_art import WordArt
4
- from .table import TableFormatter
5
-
6
- __all__ = ["TextFormat", "WordArt", "TableFormatter"]
File without changes
File without changes
File without changes