printcolored 2.1__tar.gz → 2.2__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,6 @@
1
+ Metadata-Version: 2.4
2
+ Name: printcolored
3
+ Version: 2.2
4
+ Requires-Dist: platformdirs
5
+ Provides-Extra: windows-legacy
6
+ Requires-Dist: colorama; extra == "windows-legacy"
@@ -0,0 +1,32 @@
1
+
2
+
3
+ from random import *
4
+
5
+ fonts: dict[str, tuple[str, ...]] = {
6
+ "original": ("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","0","1","2","3","4","5","6","7","8","9","!","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","@","[","\\","]","^","_","`","{","|","}","~"),
7
+
8
+ # act like theres stuff here
9
+
10
+
11
+ }
12
+
13
+ random_decorators: dict[str, tuple[str, str]] = {
14
+ "chess": (""),
15
+ }
16
+
17
+ decorators: dict[str, tuple[str, str]] = {
18
+ "barrier": (""),
19
+
20
+ }
21
+
22
+
23
+
24
+ def Fonter(text: str, font: str, decorator: str = "") -> str:
25
+ original = fonts["original"]
26
+ fontedtext = []
27
+ for letter in text:
28
+ fontedtext.append(fonts[font][original.index(letter)] if letter in original else letter)
29
+ result = "".join(fontedtext)
30
+ if decorator == "":
31
+ return result
32
+ return f"{decorators[decorator][0]}{result}{decorators[decorator][1]}"
@@ -3,50 +3,65 @@
3
3
  """
4
4
 
5
5
 
6
+
6
7
  try:
7
8
  from colorama import just_fix_windows_console
8
9
  just_fix_windows_console()
9
10
  except ImportError:
10
- print("Colorama module not found, printColored will not work on CMD!")
11
-
11
+ # if youre on an older Windows version (7/8) and colors don't show up, run: pip install colorama
12
+ import sys
13
+ if sys.platform == "win32":
14
+ try:
15
+ import ctypes
16
+ kernel32 = ctypes.windll.kernel32
17
+ STD_OUTPUT_HANDLE = -11
18
+ ENABLE_VIRTUAL_TERMINAL_PROCESSING = 0x0004
19
+
20
+ handle = kernel32.GetStdHandle(STD_OUTPUT_HANDLE)
21
+ mode = ctypes.c_uint32()
22
+ if kernel32.GetConsoleMode(handle, ctypes.byref(mode)):
23
+ kernel32.SetConsoleMode(handle, mode.value | ENABLE_VIRTUAL_TERMINAL_PROCESSING)
24
+ except Exception:
25
+ pass
26
+
12
27
 
13
28
  from pathlib import Path
14
29
  import json
15
30
  from platformdirs import user_config_dir
16
31
 
17
- CONFIG_DIR = Path(user_config_dir("printColored"))
18
- CUSTOM_FORMATS_PATH = CONFIG_DIR / "custom.json"
32
+ CONFIG_DIR: Path = Path(user_config_dir("printColored"))
33
+ CUSTOM_FORMATS_PATH: Path = CONFIG_DIR / "custom.json"
19
34
 
20
35
 
21
- def load_custom_formats():
36
+ def load_custom_formats() -> dict[str, str]:
22
37
  if CUSTOM_FORMATS_PATH.exists():
23
38
  with open(CUSTOM_FORMATS_PATH, "r") as file:
24
39
  return json.load(file)
25
40
  return {}
26
41
 
27
42
 
28
- def save_custom_formats(formats):
43
+ def save_custom_formats(formats: dict[str, str]) -> None:
29
44
  CONFIG_DIR.mkdir(parents=True, exist_ok=True)
30
45
  with open(CUSTOM_FORMATS_PATH, "w") as file:
31
46
  json.dump(formats, file, indent=4)
32
47
 
33
48
 
34
- def add_custom_format(name, value):
35
- formats = load_custom_formats()
36
- formats[name] = value
37
- save_custom_formats(formats)
38
- return formats
49
+ def add_custom_format(name: str, value: str) -> dict[str, str]:
50
+ global custom_formats
51
+ custom_formats[name] = value
52
+ save_custom_formats(custom_formats)
53
+ return custom_formats
39
54
 
40
55
 
41
- custom_formats = load_custom_formats()
56
+ custom_formats: dict[str, str] = load_custom_formats()
42
57
 
43
58
 
44
59
  from . import Fonter
45
- from formats import ansi_formats, html_colors
60
+ from .formats import ansi_formats, html_colors
46
61
 
47
- _default_source_order = ("ansi_format","rgb_format","custom_format")
62
+ _default_source_order: tuple[str, ...] = ("ansi_format","rgb_format","custom_format")
48
63
 
49
- def _font_check(text, *inputs):
64
+ def _font_check(text: str, *inputs: str) -> str:
50
65
  changed = False
51
66
  font = ""
52
67
  decorator = ""
@@ -59,13 +74,13 @@ def _font_check(text, *inputs):
59
74
  changed = True
60
75
  return Fonter.Fonter(text, font, decorator) if changed == True else text
61
76
 
62
- def _reset(reset):
77
+ def _reset(reset: bool) -> str:
63
78
  if reset:
64
79
  return "\033[0m"
65
80
  else:
66
81
  return ""
67
82
 
68
- def _single_code(fformat, *, html_view="", source_order=()):
83
+ def _single_code(fformat: str, *, html_view: str = "", source_order: tuple[str, ...] = ()) -> str:
69
84
  if fformat.replace(";", "").isdigit():
70
85
  return fformat
71
86
  for source in source_order:
@@ -82,8 +97,8 @@ def _single_code(fformat, *, html_view="", source_order=()):
82
97
  raise ValueError(f"{source}: Unknown Format Source!")
83
98
  raise ValueError(f"{fformat}: Unknown Format!")
84
99
 
85
- def _build_code(*formats_used, html_view="", source_order=()):
86
- code_list = []
100
+ def _build_code(*formats_used: str, html_view: str = "", source_order: tuple[str, ...] = ()) -> str:
101
+ code_list: list[str] = []
87
102
  for name in formats_used:
88
103
  name = _single_code(name, html_view=html_view, source_order=source_order)
89
104
  if name != None:
@@ -91,7 +106,7 @@ def _build_code(*formats_used, html_view="", source_order=()):
91
106
 
92
107
  return ";".join(code_list)
93
108
 
94
- def _rgb_validation(r,g,b):
109
+ def _rgb_validation(r: str, g: str, b: str) -> str:
95
110
  if r == "" and g == "" and b == "":
96
111
  return ""
97
112
  elif r == "" or g == "" or b == "":
@@ -104,42 +119,42 @@ def _rgb_validation(r,g,b):
104
119
 
105
120
 
106
121
  class Theme:
107
- def __init__(self, *formats_used):
108
- self.formats_used = formats_used
122
+ def __init__(self, *formats_used: str) -> None:
123
+ self.formats_used: tuple[str, ...] = formats_used
109
124
 
110
- def print(self, text, *, reset=True, html_view="", source_order=_default_source_order):
125
+ def print(self, text: str, *, reset: bool = True, html_view: str = "", source_order: tuple[str, ...] = _default_source_order) -> None:
111
126
  text = _font_check(text, *self.formats_used)
112
- self.format_code = _build_code(*self.formats_used, html_view=html_view, source_order=source_order)
113
- reset = _reset(reset)
114
- print(f"\033[{self.format_code}m{text}{reset}")
127
+ self.format_code: str = _build_code(*self.formats_used, html_view=html_view, source_order=source_order)
128
+ reset_code = _reset(reset)
129
+ print(f"\033[{self.format_code}m{text}{reset_code}")
115
130
 
116
- def overwrite(self, *new):
131
+ def overwrite(self, *new: str) -> None:
117
132
  self.formats_used = new
118
133
 
119
- def add(self, *new):
134
+ def add(self, *new: str) -> None:
120
135
  self.formats_used = self.formats_used + new
121
136
 
122
- def remove(self, *removed):
137
+ def remove(self, *removed: str) -> None:
123
138
  self.formats_used = tuple(fformat for fformat in self.formats_used if fformat not in removed)
124
139
 
125
- def showUsed(self):
140
+ def showUsed(self) -> None:
126
141
  print(self.formats_used)
127
142
 
128
- def __str__(self):
143
+ def __str__(self) -> str:
129
144
  return str(self.formats_used)
130
145
 
131
146
 
132
147
  class ThemeRGBV(Theme):
133
- def __init__(self, r="", g="", b="", r2="", g2="", b2="", *formats_used):
148
+ def __init__(self, r: str = "", g: str = "", b: str = "", r2: str = "", g2: str = "", b2: str = "", *formats_used: str) -> None:
134
149
  super().__init__(*formats_used)
135
150
 
136
- self.fg = _rgb_validation(r,g,b)
137
- self.bg = _rgb_validation(r2,g2,b2)
151
+ self.fg: str = _rgb_validation(r,g,b)
152
+ self.bg: str = _rgb_validation(r2,g2,b2)
138
153
 
139
- def print(self, text, *, reset=True, html_view="", source_order=_default_source_order):
154
+ def print(self, text: str, *, reset: bool = True, html_view: str = "", source_order: tuple[str, ...] = _default_source_order) -> None:
140
155
  text = _font_check(text, *self.formats_used)
141
156
  self.format_code = _build_code(*self.formats_used, html_view=html_view, source_order=source_order)
142
- reset = _reset(reset)
157
+ reset_code = _reset(reset)
143
158
 
144
159
  if self.format_code:
145
160
  self.format_code += ";"
@@ -148,43 +163,43 @@ class ThemeRGBV(Theme):
148
163
  if self.bg == "":
149
164
  super().print(text, reset=reset, html_view=html_view, source_order=source_order)
150
165
  else:
151
- self.rgbcode = "48;2;" + self.bg
152
- self.finalcode = self.format_code + self.rgbcode
153
- print(f"\033[{self.finalcode}m{text}{reset}")
166
+ self.rgbcode: str = "48;2;" + self.bg
167
+ self.finalcode: str = self.format_code + self.rgbcode
168
+ print(f"\033[{self.finalcode}m{text}{reset_code}")
154
169
  else:
155
170
  if self.bg == "":
156
171
  self.rgbcode = "38;2;" + self.fg
157
172
  self.finalcode = self.format_code + self.rgbcode
158
- print(f"\033[{self.finalcode}m{text}{reset}")
173
+ print(f"\033[{self.finalcode}m{text}{reset_code}")
159
174
  else:
160
175
  self.rgbcode = "38;2;" + self.fg + ";48;2;" + self.bg
161
176
  self.finalcode = self.format_code + self.rgbcode
162
- print(f"\033[{self.finalcode}m{text}{reset}")
177
+ print(f"\033[{self.finalcode}m{text}{reset_code}")
163
178
 
164
- def overwrite(self, r,g,b, r2,g2,b2, *new):
179
+ def overwrite(self, r: str, g: str, b: str, r2: str, g2: str, b2: str, *new: str) -> None:
165
180
  super().overwrite(*new)
166
181
 
167
182
  self.fg = _rgb_validation(r,g,b)
168
183
  self.bg = _rgb_validation(r2,g2,b2)
169
184
 
170
- def showUsed(self):
185
+ def showUsed(self) -> None:
171
186
  print(f"Foreground: {self.fg}")
172
187
  print(f"Background: {self.bg}")
173
188
  print(f"Formats: {self.formats_used}")
174
189
 
175
- def __str__(self):
176
- return self.fg +";"+ self.bg +" "+ self.formats_used
190
+ def __str__(self) -> str:
191
+ return self.fg +";"+ self.bg +" "+ str(self.formats_used)
177
192
 
178
193
 
179
- def printColored(text, *formats_used, reset= True, html_view="", source_order=_default_source_order):
194
+ def printColored(text: str, *formats_used: str, reset: bool = True, html_view: str = "", source_order: tuple[str, ...] = _default_source_order) -> None:
180
195
  text = _font_check(text, *formats_used)
181
196
  code = _build_code(*formats_used, html_view=html_view, source_order=source_order)
182
- reset = _reset(reset)
197
+ reset_code = _reset(reset)
183
198
 
184
- print(f"\033[{code}m{text}{reset}")
199
+ print(f"\033[{code}m{text}{reset_code}")
185
200
 
186
201
 
187
- def colorGen(*formats_used, mode="", html_view="", source_order=_default_source_order):
202
+ def colorGen(*formats_used: str, mode: str = "", html_view: str = "", source_order: tuple[str, ...] = _default_source_order) -> str:
188
203
  code = _build_code(*formats_used, html_view=html_view, source_order=source_order)
189
204
  if mode == "b":
190
205
  return code
@@ -197,10 +212,10 @@ def colorGen(*formats_used, mode="", html_view="", source_order=_default_source_
197
212
  # now colorGen is also fixed
198
213
 
199
214
 
200
- def printl(text=(), formats_used=(), *, sepr=""):
215
+ def printl(text: tuple[str, ...] = (), formats_used: tuple[str | tuple[str, ...], ...] = (), *, sepr: str = "") -> None:
201
216
 
202
217
  for i, (line, fformat) in enumerate(zip(text, formats_used)):
203
- code = []
218
+ code: list[str] = []
204
219
  line = _font_check(line, fformat)
205
220
  if type(fformat) == str:
206
221
  fformat = _single_code(fformat)
@@ -221,10 +236,10 @@ def printl(text=(), formats_used=(), *, sepr=""):
221
236
  # Dunno if i should keep colorGen, but ill just leave it there because
222
237
  # it returns the color code itself
223
238
 
224
- def printRGB(text, r,g,b, *formats_used, view="", html_view="",reset=True, source_order=_default_source_order):
239
+ def printRGB(text: str, r: str, g: str, b: str, *formats_used: str, view: str = "", html_view: str = "", reset: bool = True, source_order: tuple[str, ...] = _default_source_order) -> None:
225
240
  text = _font_check(text, *formats_used)
226
241
  code = _build_code(*formats_used, html_view=html_view, source_order=source_order)
227
- reset = _reset(reset)
242
+ reset_code = _reset(reset)
228
243
  # if you dont want a format when using the rgb function,
229
244
  # you can just not enter it
230
245
  rgbvalue = _rgb_validation(r,g,b)
@@ -237,13 +252,13 @@ def printRGB(text, r,g,b, *formats_used, view="", html_view="",reset=True, sourc
237
252
  code = ";" + code
238
253
 
239
254
 
240
- print(f"\033[{viewvalue}2;{rgbvalue}{code}m{text}{reset}")
255
+ print(f"\033[{viewvalue}2;{rgbvalue}{code}m{text}{reset_code}")
241
256
 
242
257
 
243
- def printRGBV(text, r,g,b, r2, g2, b2, *formats_used, reset=True, html_view="", source_order=_default_source_order):
258
+ def printRGBV(text: str, r: str, g: str, b: str, r2: str, g2: str, b2: str, *formats_used: str, reset: bool = True, html_view: str = "", source_order: tuple[str, ...] = _default_source_order) -> None:
244
259
  text = _font_check(text, *formats_used)
245
260
  code = _build_code(*formats_used, html_view=html_view, source_order=source_order)
246
- reset = _reset(reset)
261
+ reset_code = _reset(reset)
247
262
 
248
263
  fg = _rgb_validation(r,g,b)
249
264
  bg = _rgb_validation(r2,g2,b2)
@@ -253,35 +268,35 @@ def printRGBV(text, r,g,b, r2, g2, b2, *formats_used, reset=True, html_view="",
253
268
 
254
269
  if fg == "":
255
270
  if bg == "":
256
- print(f"\033[{code}m{text}{reset}")
271
+ print(f"\033[{code}m{text}{reset_code}")
257
272
  else:
258
- print(f"\033[{code}48;2;{bg}m{text}{reset}")
273
+ print(f"\033[{code}48;2;{bg}m{text}{reset_code}")
259
274
  else:
260
275
  if bg == "":
261
- print(f"\033[{code}38;2;{fg}m{text}{reset}")
276
+ print(f"\033[{code}38;2;{fg}m{text}{reset_code}")
262
277
  else:
263
- print(f"\033[{code}38;2;{fg};48;2;{bg}m{text}{reset}")
278
+ print(f"\033[{code}38;2;{fg};48;2;{bg}m{text}{reset_code}")
264
279
 
265
280
 
266
- def formatfinder(min, max): # made this to find new formats, theres nothing beyond 107
281
+ def formatfinder(val1: str, val2: str) -> None: # made this to find new formats, theres nothing beyond 107
267
282
  # btw use strings ("1","108") and not integers (1,108)
268
- if min.isdigit() and max.isdigit():
269
- min = int(min)
270
- max = int(max)
271
- for code in range(min, max+1):
283
+ if val1.isdigit() and val2.isdigit():
284
+ num1 = int(val1)
285
+ num2 = int(val2)
286
+ for code in range(num1, num2+1):
272
287
  print(f"At iteration {code}: \033[{code}mHello World!\033[0m")
273
- elif min == "font" or max == "font":
288
+ elif val1 == "font" or val2 == "font":
274
289
  for key, value in Fonter.fonts.items():
275
290
  print(f"{key}: {value}")
276
- elif min == "decors" or max == "decors":
291
+ elif val1 == "decors" or val2 == "decors":
277
292
  for key, value in Fonter.decorators.items():
278
293
  print(f"{key}: {value}")
279
- elif min == "ansi_dict" or max == "ansi_dict":
294
+ elif val1 == "ansi_dict" or val2 == "ansi_dict":
280
295
  for key, value in ansi_formats.items():
281
296
  print(f"\033[{value}m{key}\033[0m")
282
- elif min == "html_dict" or max == "html_dict":
297
+ elif val1 == "html_dict" or val2 == "html_dict":
283
298
  for key, value in html_colors.items():
284
299
  print(f"\033[38;2;{value}m{key}\033[0m")
285
- elif min == "custom_dict" or max == "custom_dict":
300
+ elif val1 == "custom_dict" or val2 == "custom_dict":
286
301
  for key, value in custom_formats.items():
287
- print(f"\033[{value}m{key}\033[0m")
302
+ print(f"\033[{value}m{key}\033[0m")
@@ -1,45 +1,46 @@
1
- from .core import formatfinder
2
-
3
- def ansi_range():
4
- print("All possible formats in range of 1-107:")
5
- formatfinder("1","107")
6
-
7
- def all_ansi_dict_formats():
8
- print("All available formats:")
9
- formatfinder("ansi_dict","")
10
-
11
- def all_html_formats():
12
- print("All HTML formats:")
13
- formatfinder("html_dict","")
14
-
15
- def all_custom_formats():
16
- print("All custom formats:")
17
- formatfinder("custom_dict","")
18
-
19
- def all_fonts():
20
- print("All fonts available:")
21
- formatfinder(" ","font")
22
-
23
- def all_decors():
24
- print("All decorators available:")
25
- formatfinder(" ","decors")
26
-
27
- display = {
28
- "all_ansi_formats": ansi_range,
29
- "ansi_dict": all_ansi_dict_formats,
30
- "html_dict": all_html_formats,
31
- "custom_dict": all_custom_formats,
32
- "fonts": all_fonts,
33
- "decorators": all_decors
34
- }
35
-
36
-
37
- def display_formats(selected_source=None):
38
- if selected_source:
39
- if selected_source in display:
40
- display[selected_source]()
41
- else:
42
- raise ValueError(f"{selected_source} Not a valid format source!")
43
- else:
44
- for source in display:
45
- display[source]()
1
+ from collections.abc import Callable
2
+ from .core import formatfinder
3
+
4
+ def ansi_range() -> None:
5
+ print("All possible formats in range of 1-107:")
6
+ formatfinder("1","107")
7
+
8
+ def all_ansi_dict_formats() -> None:
9
+ print("All available formats:")
10
+ formatfinder("ansi_dict","")
11
+
12
+ def all_html_formats() -> None:
13
+ print("All HTML formats:")
14
+ formatfinder("html_dict","")
15
+
16
+ def all_custom_formats() -> None:
17
+ print("All custom formats:")
18
+ formatfinder("custom_dict","")
19
+
20
+ def all_fonts() -> None:
21
+ print("All fonts available:")
22
+ formatfinder(" ","font")
23
+
24
+ def all_decors() -> None:
25
+ print("All decorators available:")
26
+ formatfinder(" ","decors")
27
+
28
+ display: dict[str, Callable[[], None]] = {
29
+ "all_ansi_formats": ansi_range,
30
+ "ansi_dict": all_ansi_dict_formats,
31
+ "html_dict": all_html_formats,
32
+ "custom_dict": all_custom_formats,
33
+ "fonts": all_fonts,
34
+ "decorators": all_decors
35
+ }
36
+
37
+
38
+ def display_formats(selected_source: str | None = None) -> None:
39
+ if selected_source:
40
+ if selected_source in display:
41
+ display[selected_source]()
42
+ else:
43
+ raise ValueError(f"{selected_source} Not a valid format source!")
44
+ else:
45
+ for source in display:
46
+ display[source]()
@@ -1,4 +1,4 @@
1
- ansi_formats = { # i think the dictonary now contains every possible format
1
+ ansi_formats: dict[str, str] = { # i think the dictonary now contains every possible format
2
2
  # Colors
3
3
  "gray" : "30",
4
4
  "red" : "31",
@@ -55,7 +55,7 @@ ansi_formats = { # i think the dictonary now contains every possible format
55
55
  "" : "0"
56
56
  }
57
57
 
58
- html_colors = { # note that just like normal rgb, using two at same time,
58
+ html_colors: dict[str, str] = { # note that just like normal rgb, using two at same time,
59
59
  # the last overwrites all before it.
60
60
  # also note that the format keys are written in a different way
61
61
  # than i write bc it was copypasted from html website
@@ -71,8 +71,6 @@ html_colors = { # note that just like normal rgb, using two at same time,
71
71
  "Pink": "255;192;203",
72
72
  "LightPink": "255;182;193",
73
73
  "HotPink": "255;105;180",
74
- # ^ i am NOT the one in charge of writing these
75
- # ᵇᵘᵗ ⁱ ᵃᶜᵗᵘᵃˡˡʸ ᵗʰⁱⁿᵏ ᵗʰᵃᵗ ᵗʰⁱˢ ᵖⁱⁿᵏ ⁱˢ ᵃᵇⁱᵗ ʰ⁻
76
74
  "DeepPink": "255;20;147",
77
75
  "MediumVioletRed": "199;21;133",
78
76
  "PaleVioletRed": "219;112;147",
@@ -1,134 +1,134 @@
1
- from . import core as pc
2
- from .core import printColored, colorGen, printl, printRGB, printRGBV, Theme, ThemeRGBV
3
-
4
- _deco = pc.Theme("green", "bold")
5
- _deco2 = pc.Theme("bright_blue", "bold")
6
- _deco3 = pc.Theme("bright_yellow")
7
- _border = "--------------------------------"
8
-
9
-
10
- def _guide_printColored():
11
- _deco.print(_border)
12
- print("printColored()")
13
- printColored("Example use of printColored()".center(32), "green", "bold", "italic")
14
- print("Main function, enter text, then formats, and the text will come formatted based on the provided formats")
15
- print("Take a look at the dictionary and enter formats to use")
16
- _deco.print(_border)
17
-
18
-
19
- def _guide_colorGen():
20
- _deco.print(_border)
21
- print("colorGen()")
22
- print(
23
- f"{colorGen('red', 'bold')} Example use "
24
- f"{colorGen('', 'strikethrough', 'blue')}of colorGen()"
25
- f"{colorGen('')}"
26
- )
27
-
28
- genformat1 = colorGen("bright_white", "highlight_blue")
29
- genformat2 = colorGen("", "yellow", "highlight_green", "underline")
30
- print(f" {genformat1}Example 2 {genformat2}of colorGen(){colorGen('')}")
31
- print("This is used to enter many formats in the same line")
32
- _deco.print(_border)
33
-
34
-
35
- def _guide_printl():
36
- _deco.print(_border)
37
- print("printl()")
38
- printl(("Example", "use", "of", "printl()"), ("green", ("36", "italic"), "yellow", "magenta"), sepr=" ")
39
- print("Printl is used to print many text in same line each with their own formats")
40
- _deco.print(_border)
41
-
42
-
43
- def _guide_printRGB():
44
- _deco.print(_border)
45
- print("printRGB()")
46
- printRGB("Example use of printRGB()".center(32), "255", "0", "255", "bold", view="")
47
- printRGB("Example 2 of printRGB()".center(32), "0", "255", "255", view="bg")
48
- print("Notice how it can only display either")
49
- print("foreground or background at one time")
50
- print("You can also add formats to it".center(32))
51
- _deco.print(_border)
52
-
53
-
54
- def _guide_printRGBV():
55
- _deco.print(_border)
56
- print("printRGBV()")
57
- printRGBV("Example use of printRGBV()".center(32), "0", "255", "0", "0", "0", "255", "")
58
- printRGBV("Example 2 of printRGBV()".center(32), "0", "0", "0", "255", "0", "255", "italic")
59
- print("It can display both foreground and background")
60
- print("and also add formats".center(32))
61
- print("Note that sometimes the background")
62
- print("color blocks the foreground color")
63
- _deco.print(_border)
64
-
65
-
66
- def _guide_theme():
67
- _deco.print(_border)
68
- print("Theme")
69
- deadly = Theme("brightred", "double_underline", "bold")
70
- deadly.print("Example use of Theme class")
71
- print("It can be used for formats that you use many times")
72
-
73
- deadly.add("strikethrough")
74
- deadly.print("Example of add(*formats)")
75
-
76
- deadly.remove("double_underline", "strikethrough")
77
- deadly.print("Example of remove(*formats)")
78
-
79
- deadly.overwrite("highlight_brightred", "underline")
80
- deadly.print("Example of overwrite(*formats)")
81
-
82
- deadly.showUsed()
83
- print("showUsed() displays the current formats")
84
- _deco.print(_border)
85
-
86
-
87
- def _guide_theme_rgbv():
88
- _deco.print(_border)
89
- print("ThemeRGBV")
90
- classified = ThemeRGBV("255", "255", "255", "0", "0", "0", "")
91
- classified.print("Example of printRGBV(r,g,b,r2,g2,b2,*formats)")
92
- print("It can change both foreground and background")
93
- print("and you can choose to use one or both")
94
-
95
- classified.add("bold", "underline")
96
- classified.print("Example of add(*formats)")
97
-
98
- classified.remove("underline")
99
- classified.print("Example of remove(*formats)")
100
- print("Adding/removing only affects formats")
101
-
102
- classified.overwrite("0", "0", "0", "255", "255", "255", "strikethrough")
103
- classified.print("Example of overwrite(r,g,b,r2,g2,b2,*new)")
104
- print("Overwrite rewrites the whole object")
105
-
106
- classified.showUsed()
107
- print("showUsed() displays the current settings")
108
- _deco.print(_border)
109
-
110
-
111
- GUIDE = {
112
- "printColored": _guide_printColored,
113
- "colorGen": _guide_colorGen,
114
- "printl": _guide_printl,
115
- "printRGB": _guide_printRGB,
116
- "printRGBV": _guide_printRGBV,
117
- "Theme": _guide_theme,
118
- "ThemeRGBV": _guide_theme_rgbv,
119
- }
120
-
121
-
122
- def func_guide(selected_function=None):
123
- if selected_function:
124
- if selected_function in GUIDE:
125
- GUIDE[selected_function]()
126
- else:
127
- raise ValueError(f"{selected_function} Not a valid guide section!")
128
- else:
129
- for section in GUIDE:
130
- GUIDE[section]()
131
- _deco.print(_border)
132
- _deco2.print(_border)
133
- print("Thanks for reading!")
1
+ from collections.abc import Callable
2
+ from .core import *
3
+
4
+ _deco: Theme = Theme("green", "bold")
5
+ _deco2: Theme = Theme("bright_blue", "bold")
6
+ _deco3: Theme = Theme("bright_yellow")
7
+ _border: str = "--------------------------------"
8
+
9
+
10
+ def _guide_printColored() -> None:
11
+ _deco.print(_border)
12
+ print("printColored()")
13
+ printColored("Example use of printColored()".center(32), "green", "bold", "italic")
14
+ print("Main function, enter text, then formats, and the text will come formatted based on the provided formats")
15
+ print("Take a look at the dictionary and enter formats to use")
16
+ _deco.print(_border)
17
+
18
+
19
+ def _guide_colorGen() -> None:
20
+ _deco.print(_border)
21
+ print("colorGen()")
22
+ print(
23
+ f"{colorGen('red', 'bold')} Example use "
24
+ f"{colorGen('', 'strikethrough', 'blue')}of colorGen()"
25
+ f"{colorGen('')}"
26
+ )
27
+
28
+ genformat1 = colorGen("bright_white", "highlight_blue")
29
+ genformat2 = colorGen("", "yellow", "highlight_green", "underline")
30
+ print(f" {genformat1}Example 2 {genformat2}of colorGen(){colorGen('')}")
31
+ print("This is used to enter many formats in the same line")
32
+ _deco.print(_border)
33
+
34
+
35
+ def _guide_printl() -> None:
36
+ _deco.print(_border)
37
+ print("printl()")
38
+ printl(("Example", "use", "of", "printl()"), ("green", ("36", "italic"), "yellow", "magenta"), sepr=" ")
39
+ print("Printl is used to print many text in same line each with their own formats")
40
+ _deco.print(_border)
41
+
42
+
43
+ def _guide_printRGB() -> None:
44
+ _deco.print(_border)
45
+ print("printRGB()")
46
+ printRGB("Example use of printRGB()".center(32), "255", "0", "255", "bold", view="")
47
+ printRGB("Example 2 of printRGB()".center(32), "0", "255", "255", view="bg")
48
+ print("Notice how it can only display either")
49
+ print("foreground or background at one time")
50
+ print("You can also add formats to it".center(32))
51
+ _deco.print(_border)
52
+
53
+
54
+ def _guide_printRGBV() -> None:
55
+ _deco.print(_border)
56
+ print("printRGBV()")
57
+ printRGBV("Example use of printRGBV()".center(32), "0", "255", "0", "0", "0", "255", "")
58
+ printRGBV("Example 2 of printRGBV()".center(32), "0", "0", "0", "255", "0", "255", "italic")
59
+ print("It can display both foreground and background")
60
+ print("and also add formats".center(32))
61
+ print("Note that sometimes the background")
62
+ print("color blocks the foreground color")
63
+ _deco.print(_border)
64
+
65
+
66
+ def _guide_theme() -> None:
67
+ _deco.print(_border)
68
+ print("Theme")
69
+ deadly = Theme("brightred", "double_underline", "bold")
70
+ deadly.print("Example use of Theme class")
71
+ print("It can be used for formats that you use many times")
72
+
73
+ deadly.add("strikethrough")
74
+ deadly.print("Example of add(*formats)")
75
+
76
+ deadly.remove("double_underline", "strikethrough")
77
+ deadly.print("Example of remove(*formats)")
78
+
79
+ deadly.overwrite("highlight_brightred", "underline")
80
+ deadly.print("Example of overwrite(*formats)")
81
+
82
+ deadly.showUsed()
83
+ print("showUsed() displays the current formats")
84
+ _deco.print(_border)
85
+
86
+
87
+ def _guide_theme_rgbv() -> None:
88
+ _deco.print(_border)
89
+ print("ThemeRGBV")
90
+ classified = ThemeRGBV("255", "255", "255", "0", "0", "0", "")
91
+ classified.print("Example of printRGBV(r,g,b,r2,g2,b2,*formats)")
92
+ print("It can change both foreground and background")
93
+ print("and you can choose to use one or both")
94
+
95
+ classified.add("bold", "underline")
96
+ classified.print("Example of add(*formats)")
97
+
98
+ classified.remove("underline")
99
+ classified.print("Example of remove(*formats)")
100
+ print("Adding/removing only affects formats")
101
+
102
+ classified.overwrite("0", "0", "0", "255", "255", "255", "strikethrough")
103
+ classified.print("Example of overwrite(r,g,b,r2,g2,b2,*new)")
104
+ print("Overwrite rewrites the whole object")
105
+
106
+ classified.showUsed()
107
+ print("showUsed() displays the current settings")
108
+ _deco.print(_border)
109
+
110
+
111
+ GUIDE: dict[str, Callable[[], None]] = {
112
+ "printColored": _guide_printColored,
113
+ "colorGen": _guide_colorGen,
114
+ "printl": _guide_printl,
115
+ "printRGB": _guide_printRGB,
116
+ "printRGBV": _guide_printRGBV,
117
+ "Theme": _guide_theme,
118
+ "ThemeRGBV": _guide_theme_rgbv,
119
+ }
120
+
121
+
122
+ def func_guide(selected_function: str | None = None) -> None:
123
+ if selected_function:
124
+ if selected_function in GUIDE:
125
+ GUIDE[selected_function]()
126
+ else:
127
+ raise ValueError(f"{selected_function} Not a valid guide section!")
128
+ else:
129
+ for section in GUIDE:
130
+ GUIDE[section]()
131
+ _deco.print(_border)
132
+ _deco2.print(_border)
133
+ print("Thanks for reading!")
134
134
  _deco2.print(_border)
@@ -0,0 +1,6 @@
1
+ Metadata-Version: 2.4
2
+ Name: printcolored
3
+ Version: 2.2
4
+ Requires-Dist: platformdirs
5
+ Provides-Extra: windows-legacy
6
+ Requires-Dist: colorama; extra == "windows-legacy"
@@ -0,0 +1,4 @@
1
+ platformdirs
2
+
3
+ [windows-legacy]
4
+ colorama
@@ -0,0 +1,11 @@
1
+ [project]
2
+ name = "printcolored"
3
+ version = "2.2"
4
+ dependencies = ["platformdirs"]
5
+
6
+ [project.optional-dependencies]
7
+ windows-legacy = ["colorama"]
8
+
9
+ [build-system]
10
+ requires = ["setuptools"]
11
+ build-backend = "setuptools.build_meta"
printcolored-2.1/PKG-INFO DELETED
@@ -1,4 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: printcolored
3
- Version: 2.1
4
- Requires-Dist: platformdirs
@@ -1,84 +0,0 @@
1
- """
2
- credits to https://lingojam.com/FancyTextGenerator for all fonts
3
- """
4
- #also note that sometimes some characters are displayed on the same
5
- #place for example the W&O and H&E in the san_andreas font
6
-
7
-
8
- from random import *
9
-
10
- fonts = {
11
- "original": ("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","0","1","2","3","4","5","6","7","8","9","!","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","@","[","\\","]","^","_","`","{","|","}","~"),
12
-
13
- "san_andreas":("𝔞","𝔟","𝔠","𝔡","𝔢","𝔣","𝔤","𝔥","𝔦","𝔧","𝔨","𝔩","𝔪","𝔫","𝔬","𝔭","𝔮","𝔯","𝔰","𝔱","𝔲","𝔳","𝔴","𝔵","𝔶","𝔷","𝔄","𝔅","ℭ","𝔇","𝔈","𝔉","𝔊","ℌ","ℑ","𝔍","𝔎","𝔏","𝔐","𝔑","𝔒","𝔓","𝔔","ℜ","𝔖","𝔗","𝔘","𝔙","𝔚","𝔛","𝔜","ℨ"," ","0","1","2","3","4","5","6","7","8","9","!","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","@","[","\\","]","^","_","`","{","|","}","~"),
14
-
15
- "san_andreas_bold":("𝖆","𝖇","𝖈","𝖉","𝖊","𝖋","𝖌","𝖍","𝖎","𝖏","𝖐","𝖑","𝖒","𝖓","𝖔","𝖕","𝖖","𝖗","𝖘","𝖙","𝖚","𝖛","𝖜","𝖝","𝖞","𝖟","𝕬","𝕭","𝕮","𝕯","𝕰","𝕱","𝕲","𝕳","𝕴","𝕵","𝕶","𝕷","𝕸","𝕹","𝕺","𝕻","𝕼","𝕽","𝕾","𝕿","𝖀","𝖁","𝖂","𝖃","𝖄","𝖅"," ","0","1","2","3","4","5","6","7","8","9","!","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","@","[","\\","]","^","_","`","{","|","}","~"),
16
-
17
- "fancy_bold": ("𝓪","𝓫","𝓬","𝓭","𝓮","𝓯","𝓰","𝓱","𝓲","𝓳","𝓴","𝓵","𝓶","𝓷","𝓸","𝓹","𝓺","𝓻","𝓼","𝓽","𝓾","𝓿","𝔀","𝔁","𝔂","𝔃","𝓐","𝓑","𝓒","𝓓","𝓔","𝓕","𝓖","𝓗","𝓘","𝓙","𝓚","𝓛","𝓜","𝓝","𝓞","𝓟","𝓠","𝓡","𝓢","𝓣","𝓤","𝓥","𝓦","𝓧","𝓨","𝓩"," ","0","1","2","3","4","5","6","7","8","9","!","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","@","[","\\","]","^","_","`","{","|","}","~"),
18
-
19
- "fancy":("𝒶","𝒷","𝒸","𝒹","𝑒","𝒻","𝑔","𝒽","𝒾","𝒿","𝓀","𝓁","𝓂","𝓃","𝑜","𝓅","𝓆","𝓇","𝓈","𝓉","𝓊","𝓋","𝓌","𝓍","𝓎","𝓏","𝒜","𝐵","𝒞","𝒟","𝐸","𝐹","𝒢","𝐻","𝐼","𝒥","𝒦","𝐿","𝑀","𝒩","𝒪","𝒫","𝒬","𝑅","𝒮","𝒯","𝒰","𝒱","𝒲","𝒳","𝒴","𝒵"," ","𝟢","𝟣","𝟤","𝟥","𝟦","𝟧","𝟨","𝟩","𝟪","𝟫","!","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","@","[","\\","]","^","_","`","{","|","}","~"),
20
-
21
- "hollow": ("𝕒","𝕓","𝕔","𝕕","𝕖","𝕗","𝕘","𝕙","𝕚","𝕛","𝕜","𝕝","𝕞","𝕟","𝕠","𝕡","𝕢","𝕣","𝕤","𝕥","𝕦","𝕧","𝕨","𝕩","𝕪","𝕫","𝔸","𝔹","ℂ","𝔻","𝔼","𝔽","𝔾","ℍ","𝕀","𝕁","𝕂","𝕃","𝕄","ℕ","𝕆","ℙ","ℚ","ℝ","𝕊","𝕋","𝕌","𝕍","𝕎","𝕏","𝕐","ℤ"," ","𝟘","𝟙","𝟚","𝟛","𝟜","𝟝","𝟞","𝟟","𝟠","𝟡","!","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","@","[","\\","]","^","_","`","{","|","}","~"),
22
-
23
- "large": ("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","0","1","2","3","4","5","6","7","8","9","!","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","@","[","\\","]","^","_","`","{","|","}","~"),
24
-
25
- "small": ("ᴀ","ʙ","ᴄ","ᴅ","ᴇ","ꜰ","ɢ","ʜ","ɪ","ᴊ","ᴋ","ʟ","ᴍ","ɴ","ᴏ","ᴘ","Q","ʀ","ꜱ","ᴛ","ᴜ","ᴠ","ᴡ","x","ʏ","ᴢ","ᴀ","ʙ","ᴄ","ᴅ","ᴇ","ꜰ","ɢ","ʜ","ɪ","ᴊ","ᴋ","ʟ","ᴍ","ɴ","ᴏ","ᴘ","Q","ʀ","ꜱ","ᴛ","ᴜ","ᴠ","ᴡ","x","ʏ","ᴢ"," ","0","1","2","3","4","5","6","7","8","9","!","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","@","[","\\","]","^","_","`","{","|","}","~"),
26
-
27
- "chinese": ("ꍏ","ꌃ","ꉓ","ꀸ","ꍟ","ꎇ","ꁅ","ꃅ","ꀤ","ꀭ","ꀘ","꒒","ꂵ","ꈤ","ꂦ","ꉣ","ꆰ","ꋪ","ꌗ","꓄","ꀎ","ꃴ","ꅏ","ꊼ","ꌩ","ꁴ","ꍏ","ꌃ","ꉓ","ꀸ","ꍟ","ꎇ","ꁅ","ꃅ","ꀤ","ꀭ","ꀘ","꒒","ꂵ","ꈤ","ꂦ","ꉣ","ꆰ","ꋪ","ꌗ","꓄","ꀎ","ꃴ","ꅏ","ꊼ","ꌩ","ꁴ"," ","0","1","2","3","4","5","6","7","8","9","!","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","@","[","\\","]","^","_","`","{","|","}","~"),
28
-
29
- "squared": ("🅰","🅱","🅲","🅳","🅴","🅵","🅶","🅷","🅸","🅹","🅺","🅻","🅼","🅽","🅾","🅿","🆀","🆁","🆂","🆃","🆄","🆅","🆆","🆇","🆈","🆉","🅰","🅱","🅲","🅳","🅴","🅵","🅶","🅷","🅸","🅹","🅺","🅻","🅼","🅽","🅾","🅿","🆀","🆁","🆂","🆃","🆄","🆅","🆆","🆇","🆈","🆉"," ","0","1","2","3","4","5","6","7","8","9","!","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","@","[","\\","]","^","_","`","{","|","}","~"),
30
-
31
- "pointed": ("a͎","b͎","c͎","d͎","e͎","f͎","g͎","h͎","i͎","j͎","k͎","l͎","m͎","n͎","o͎","p͎","q͎","r͎","s͎","t͎","u͎","v͎","w͎","x͎","y͎","z͎","A͎","B͎","C͎","D͎","E͎","F͎","G͎","H͎","I͎","J͎","K͎","L͎","M͎","N͎","O͎","P͎","Q͎","R͎","S͎","T͎","U͎","V͎","W͎","X͎","Y͎","Z͎"," ͎","0͎","1͎","2͎","3͎","4͎","5͎","6͎","7͎","8͎","9͎","!͎","$͎","%͎","&͎",",","(͎",")͎","*͎","+͎",",","-͎",".͎","/͎",":͎",";͎","<͎","=͎",">͎","?͎","@͎","[͎","\͎","]͎","^͎","_͎","`͎","{͎","|͎","}͎","~͎"),
32
-
33
- "power": ("ᵃ","ᵇ","ᶜ","ᵈ","ᵉ","ᶠ","ᵍ","ʰ","ⁱ","ʲ","ᵏ","ˡ","ᵐ","ⁿ","ᵒ","ᵖ","q","ʳ","ˢ","ᵗ","ᵘ","ᵛ","ʷ","ˣ","ʸ","ᶻ","ᴬ","ᴮ","ᶜ","ᴰ","ᴱ","ᶠ","ᴳ","ᴴ","ᴵ","ᴶ","ᴷ","ᴸ","ᴹ","ᴺ","ᴼ","ᴾ","Q","ᴿ","ˢ","ᵀ","ᵁ","ⱽ","ᵂ","ˣ","ʸ","ᶻ"," ","⁰","¹","²","³","⁴","⁵","⁶","⁷","⁸","⁹","!","$","%","&",",","⁽","⁾","*","⁺",",","⁻",".","/",":",";","<","⁼",">","?","@","[","\\","]","^","_","`","{","|","}","~"),
34
-
35
- "weird": ("ᗩ","ᗷ","ᑕ","ᗪ","E","ᖴ","G","ᕼ","I","ᒍ","K","ᒪ","ᗰ","ᑎ","O","ᑭ","ᑫ","ᖇ","ᔕ","T","ᑌ","ᐯ","ᗯ","᙭","Y","ᘔ","ᗩ","ᗷ","ᑕ","ᗪ","E","ᖴ","G","ᕼ","I","ᒍ","K","ᒪ","ᗰ","ᑎ","O","ᑭ","ᑫ","ᖇ","ᔕ","T","ᑌ","ᐯ","ᗯ","᙭","Y","ᘔ"," ","0","1","2","3","4","5","6","7","8","9","!","$","%","&",",","(",")","*","+",",","-",".","/",":",";","<","=",">","?","@","[","\\","]","^","_","`","{","|","}","~"),
36
-
37
- "weird2": ("ᗩ","ᗷ","ᑢ","ᕲ","ᘿ","ᖴ","ᘜ","ᕼ","ᓰ","ᒚ","ᖽᐸ","ᒪ","ᘻ","ᘉ","ᓍ","ᕵ","ᕴ","ᖇ","S","ᖶ","ᑘ","ᐺ","ᘺ","᙭","ᖻ","ᗱ","ᗩ","ᗷ","ᑢ","ᕲ","ᘿ","ᖴ","ᘜ","ᕼ","ᓰ","ᒚ","ᖽᐸ","ᒪ","ᘻ","ᘉ","ᓍ","ᕵ","ᕴ","ᖇ","S","ᖶ","ᑘ","ᐺ","ᘺ","᙭","ᖻ","ᗱ"," ","0","1","2","3","4","5","6","7","8","9","!","$","%","&",",","(",")","*","+",",","-",".","/",":",";","<","=",">","?","@","[","\\","]","^","_","`","{","|","}","~"),
38
-
39
- "japanese":("卂","乃","匚","ᗪ","乇","千","Ꮆ","卄","丨","フ","Ҝ","ㄥ","爪","几","ㄖ","卩","Ɋ","尺","丂","ㄒ","ㄩ","ᐯ","山","乂","ㄚ","乙","卂","乃","匚","ᗪ","乇","千","Ꮆ","卄","丨","フ","Ҝ","ㄥ","爪","几","ㄖ","卩","Ɋ","尺","丂","ㄒ","ㄩ","ᐯ","山","乂","ㄚ","乙"," ","0","1","2","3","4","5","6","7","8","9","!","$","%","&",",","(",")","*","+",",","-",".","/",":",";","<","=",">","?","@","[","\\","]","^","_","`","{","|","}","~"),
40
-
41
- "japanese2":("ム","乃","ᄃ","り","乇","キ","ム","ん","ノ","フ","ズ","レ","ᄊ","刀","の","ア","ゐ","尺","丂","イ","ひ","√","W","メ","リ","乙","ム","乃","ᄃ","り","乇","キ","ム","ん","ノ","フ","ズ","レ","ᄊ","刀","の","ア","ゐ","尺","丂","イ","ひ","√","W","メ","リ","乙"," ","0","1","2","3","4","5","6","7","8","9","!","$","%","&",",","(",")","*","+",",","-",".","/",":",";","<","=",">","?","@","[","\\","]","^","_","`","{","|","}","~"),
42
-
43
-
44
-
45
-
46
- }
47
-
48
- random_decorators = {
49
- "chess": ("♔","♕","♖","♗","♘","♙","♚,","♛","♜","♝","♞","♟"),
50
- "cards": ("♠","♡","♢","♣","♤","♥","♦","♧","☆","★")
51
- }
52
-
53
- decorators = {
54
- "barrier": ("『","』"),
55
- "barrier2": ("【","】"),
56
- "notes": ("·.¸¸.·♩♪♫" , "♫♪♩·.¸¸.·"),
57
- "single_notes": ("♪","♫"),
58
- "transcending":("¸.-•~¹°”ˆ˜¨'" , "'¨˜ˆ”°¹~•-.¸"),
59
- "star": (".•°¤*(¯`★´¯)*¤°", "°¤*(¯´★`¯)*¤°•."),
60
- "curly": ("∙∙·▫▫ᵒᴼᵒ▫ₒₒ▫ᵒᴼᵒ▫ₒₒ▫ᵒᴼᵒ" , "ᵒᴼᵒ▫ₒₒ▫ᵒᴼᵒ▫ₒₒ▫ᵒᴼᵒ▫▫·∙∙"), # TOO DAMN LONG
61
- "short_curly": ("·▫▫ᵒᴼᵒ▫ₒₒ" , "ₒₒ▫ᵒᴼᵒ▫▫·"), # better
62
- "flower": ("◦•●◉✿", "✿◉●•◦"),
63
- "dot": ("•´¯`•." , ".•´¯`•"),
64
- "hearts": ("❥", "❣❤"),
65
- "crystal": ("⧩⟡", "❖"),
66
- "rifle": ("˜”*°•.˜”*°•","•°*”˜.•°*”˜"),
67
- "short_rifle": ("˜”*°•.",".•°*”˜"),
68
- "brackets": ("⦑", "⦒"),
69
- "chess": (choice(random_decorators["chess"]), choice(random_decorators["chess"])),
70
- "cards": (choice(random_decorators["cards"]), choice(random_decorators["cards"])),
71
-
72
- }
73
-
74
-
75
-
76
- def Fonter(text, font, decorator=""):
77
- original = fonts["original"]
78
- fontedtext = []
79
- for letter in text:
80
- fontedtext.append(fonts[font][original.index(letter)] if letter in original else letter)
81
- result = "".join(fontedtext)
82
- if decorator == "":
83
- return result
84
- return f"{decorators[decorator][0]}{result}{decorators[decorator][1]}"
@@ -1,4 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: printcolored
3
- Version: 2.1
4
- Requires-Dist: platformdirs
@@ -1 +0,0 @@
1
- platformdirs
@@ -1,8 +0,0 @@
1
- [project]
2
- name = "printcolored"
3
- version = "2.1"
4
- dependencies = ["platformdirs"]
5
-
6
- [build-system]
7
- requires = ["setuptools"]
8
- build-backend = "setuptools.build_meta"
File without changes