xulbux 1.6.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.

Potentially problematic release.


This version of xulbux might be problematic. Click here for more details.

xulbux-1.6.1/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 XulbuX
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.
xulbux-1.6.1/PKG-INFO ADDED
@@ -0,0 +1,110 @@
1
+ Metadata-Version: 2.2
2
+ Name: xulbux
3
+ Version: 1.6.1
4
+ Summary: A library which includes a lot of really helpful functions.
5
+ Author-email: XulbuX <xulbux.real@gmail.com>
6
+ License: MIT License
7
+
8
+ Copyright (c) 2024 XulbuX
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+
28
+ Project-URL: Bug Reports, https://github.com/XulbuX-dev/PythonLibraryXulbuX/issues
29
+ Project-URL: Changelog, https://github.com/XulbuX-dev/PythonLibraryXulbuX/blob/main/CHANGELOG.md
30
+ Project-URL: Documentation, https://github.com/XulbuX-dev/PythonLibraryXulbuX/wiki
31
+ Project-URL: Homepage, https://github.com/XulbuX-dev/PythonLibraryXulbuX
32
+ Project-URL: License, https://github.com/XulbuX-dev/PythonLibraryXulbuX/blob/main/LICENSE
33
+ Project-URL: Source Code, https://github.com/XulbuX-dev/PythonLibraryXulbuX/tree/main/src
34
+ Keywords: xulbux,python,library,utility,helper,functions,tools,classes,types,methods,cmd,code,color,data,structures,env,environment,file,format,json,path,regex,string,system,operations,presets
35
+ Classifier: Intended Audience :: Developers
36
+ Classifier: Programming Language :: Python :: 3
37
+ Classifier: Programming Language :: Python :: 3.10
38
+ Classifier: Programming Language :: Python :: 3.11
39
+ Classifier: Programming Language :: Python :: 3.12
40
+ Classifier: License :: OSI Approved :: MIT License
41
+ Classifier: Operating System :: OS Independent
42
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
43
+ Requires-Python: >=3.10.0
44
+ Description-Content-Type: text/markdown
45
+ License-File: LICENSE
46
+ Requires-Dist: keyboard>=0.13.5
47
+ Requires-Dist: mouse>=0.7.1
48
+ Requires-Dist: pyperclip>=1.9.0
49
+ Requires-Dist: regex>=2023.10.3
50
+ Provides-Extra: dev
51
+ Requires-Dist: pytest>=7.4.2; extra == "dev"
52
+ Requires-Dist: black>=23.7.0; extra == "dev"
53
+ Requires-Dist: isort>=5.12.0; extra == "dev"
54
+ Requires-Dist: flake8>=6.1.0; extra == "dev"
55
+
56
+ # **$\color{#8085FF}\Huge\textsf{XulbuX}$**
57
+
58
+ **$\color{#8085FF}\textsf{XulbuX}$** is a library which includes a lot of really helpful classes, types and functions.
59
+
60
+ For precise information about the library, see the library's [Wiki page](https://github.com/XulbuX-dev/PythonLibraryXulbuX/wiki).<br>
61
+ For the libraries latest changes, see the [change log](https://github.com/XulbuX-dev/PythonLibraryXulbuX/blob/main/CHANGELOG.md).
62
+
63
+
64
+ ## Installation
65
+
66
+ To install the library and all its dependencies, open a console and run the command:
67
+ ```prolog
68
+ pip install xulbux
69
+ ```
70
+
71
+ To upgrade the library to the latest available version, run the following command in your console:
72
+ ```prolog
73
+ pip install --upgrade xulbux
74
+ ```
75
+
76
+
77
+ ## Usage
78
+
79
+ Import the full library under the alias `xx`, so it's classes, types and functions are accessible with `xx.Class.method()`, `xx.type()` and `xx.function()`:
80
+ ```python
81
+ import xulbux as xx
82
+ ```
83
+ So you don't have to write `xx` in front of the library's types, you can import them directly:
84
+ ```python
85
+ from xulbux import rgba, hsla, hexa
86
+ ```
87
+
88
+
89
+ # Modules
90
+
91
+ | | |
92
+ | :------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------- |
93
+ | <h3>[`xx_code`](https://github.com/XulbuX-dev/PythonLibraryXulbuX/wiki/xx_code)</h3> | advanced code-string operations (*changing the indent, finding function calls, ...*) |
94
+ | <h3>[`xx_color`](https://github.com/XulbuX-dev/PythonLibraryXulbuX/wiki/xx_color)</h3> | everything around colors (*converting, blending, searching colors in strings, ...*) |
95
+ | <h3>[`xx_console`](https://github.com/XulbuX-dev/PythonLibraryXulbuX/wiki/xx_console)</h3> | advanced actions related to the console (*pretty logging, advanced inputs, ...*) |
96
+ | <h3>[`xx_data`](https://github.com/XulbuX-dev/PythonLibraryXulbuX/wiki/xx_data)</h3> | advanced operations with data structures (*compare, generate path ID's, pretty print/format, ...*) |
97
+ | <h3>[`xx_env_path`](https://github.com/XulbuX-dev/PythonLibraryXulbuX/wiki/xx_env_path)</h3> | getting and editing the PATH variable (*get paths, check for paths, add paths, ...*) |
98
+ | <h3>`xx_file`</h3> | advanced working with files (*create files, rename file-extensions, ...*) |
99
+ | <h3>`xx_format_codes`</h3> | easy pretty printing with custom format codes (*print, inputs, custom format codes to ANSI, ...*) |
100
+ | <h3>`xx_json`</h3> | advanced working with json files (*read, create, update, ...*) |
101
+ | <h3>`xx_path`</h3> | advanced path operations (*get paths, smart-extend relative paths, delete paths, ...*) |
102
+ | <h3>`xx_regex`</h3> | generated regex pattern-templates (*match bracket- and quote pairs, match colors, ...*) |
103
+ | <h3>[`xx_string`](https://github.com/XulbuX-dev/PythonLibraryXulbuX/wiki/xx_string)</h3> | helpful actions when working with strings. (*normalize, escape, decompose, ...*) |
104
+ | <h3>`xx_system`</h3> | advanced system actions (*restart with message, check installed Python libs, ...*) |
105
+
106
+
107
+ <br>
108
+
109
+ --------------------------------------------------------------
110
+ [View this library on PyPI](https://pypi.org/project/XulbuX/)
xulbux-1.6.1/README.md ADDED
@@ -0,0 +1,55 @@
1
+ # **$\color{#8085FF}\Huge\textsf{XulbuX}$**
2
+
3
+ **$\color{#8085FF}\textsf{XulbuX}$** is a library which includes a lot of really helpful classes, types and functions.
4
+
5
+ For precise information about the library, see the library's [Wiki page](https://github.com/XulbuX-dev/PythonLibraryXulbuX/wiki).<br>
6
+ For the libraries latest changes, see the [change log](https://github.com/XulbuX-dev/PythonLibraryXulbuX/blob/main/CHANGELOG.md).
7
+
8
+
9
+ ## Installation
10
+
11
+ To install the library and all its dependencies, open a console and run the command:
12
+ ```prolog
13
+ pip install xulbux
14
+ ```
15
+
16
+ To upgrade the library to the latest available version, run the following command in your console:
17
+ ```prolog
18
+ pip install --upgrade xulbux
19
+ ```
20
+
21
+
22
+ ## Usage
23
+
24
+ Import the full library under the alias `xx`, so it's classes, types and functions are accessible with `xx.Class.method()`, `xx.type()` and `xx.function()`:
25
+ ```python
26
+ import xulbux as xx
27
+ ```
28
+ So you don't have to write `xx` in front of the library's types, you can import them directly:
29
+ ```python
30
+ from xulbux import rgba, hsla, hexa
31
+ ```
32
+
33
+
34
+ # Modules
35
+
36
+ | | |
37
+ | :------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------- |
38
+ | <h3>[`xx_code`](https://github.com/XulbuX-dev/PythonLibraryXulbuX/wiki/xx_code)</h3> | advanced code-string operations (*changing the indent, finding function calls, ...*) |
39
+ | <h3>[`xx_color`](https://github.com/XulbuX-dev/PythonLibraryXulbuX/wiki/xx_color)</h3> | everything around colors (*converting, blending, searching colors in strings, ...*) |
40
+ | <h3>[`xx_console`](https://github.com/XulbuX-dev/PythonLibraryXulbuX/wiki/xx_console)</h3> | advanced actions related to the console (*pretty logging, advanced inputs, ...*) |
41
+ | <h3>[`xx_data`](https://github.com/XulbuX-dev/PythonLibraryXulbuX/wiki/xx_data)</h3> | advanced operations with data structures (*compare, generate path ID's, pretty print/format, ...*) |
42
+ | <h3>[`xx_env_path`](https://github.com/XulbuX-dev/PythonLibraryXulbuX/wiki/xx_env_path)</h3> | getting and editing the PATH variable (*get paths, check for paths, add paths, ...*) |
43
+ | <h3>`xx_file`</h3> | advanced working with files (*create files, rename file-extensions, ...*) |
44
+ | <h3>`xx_format_codes`</h3> | easy pretty printing with custom format codes (*print, inputs, custom format codes to ANSI, ...*) |
45
+ | <h3>`xx_json`</h3> | advanced working with json files (*read, create, update, ...*) |
46
+ | <h3>`xx_path`</h3> | advanced path operations (*get paths, smart-extend relative paths, delete paths, ...*) |
47
+ | <h3>`xx_regex`</h3> | generated regex pattern-templates (*match bracket- and quote pairs, match colors, ...*) |
48
+ | <h3>[`xx_string`](https://github.com/XulbuX-dev/PythonLibraryXulbuX/wiki/xx_string)</h3> | helpful actions when working with strings. (*normalize, escape, decompose, ...*) |
49
+ | <h3>`xx_system`</h3> | advanced system actions (*restart with message, check installed Python libs, ...*) |
50
+
51
+
52
+ <br>
53
+
54
+ --------------------------------------------------------------
55
+ [View this library on PyPI](https://pypi.org/project/XulbuX/)
@@ -0,0 +1,126 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "xulbux"
7
+ version = "1.6.1"
8
+ authors = [{ name = "XulbuX", email = "xulbux.real@gmail.com" }]
9
+ description = "A library which includes a lot of really helpful functions."
10
+ readme = "README.md"
11
+ license = { file = "LICENSE" }
12
+ requires-python = ">=3.10.0"
13
+ dependencies = [
14
+ "keyboard>=0.13.5",
15
+ "mouse>=0.7.1",
16
+ "pyperclip>=1.9.0",
17
+ "regex>=2023.10.3",
18
+ ]
19
+ optional-dependencies = { dev = [
20
+ "pytest>=7.4.2",
21
+ "black>=23.7.0",
22
+ "isort>=5.12.0",
23
+ "flake8>=6.1.0",
24
+ ] }
25
+ classifiers = [
26
+ "Intended Audience :: Developers",
27
+ "Programming Language :: Python :: 3",
28
+ "Programming Language :: Python :: 3.10",
29
+ "Programming Language :: Python :: 3.11",
30
+ "Programming Language :: Python :: 3.12",
31
+ "License :: OSI Approved :: MIT License",
32
+ "Operating System :: OS Independent",
33
+ "Topic :: Software Development :: Libraries :: Python Modules",
34
+ ]
35
+ keywords = [
36
+ "xulbux",
37
+ "python",
38
+ "library",
39
+ "utility",
40
+ "helper",
41
+ "functions",
42
+ "tools",
43
+ "classes",
44
+ "types",
45
+ "methods",
46
+ "cmd",
47
+ "code",
48
+ "color",
49
+ "data",
50
+ "structures",
51
+ "env",
52
+ "environment",
53
+ "file",
54
+ "format",
55
+ "json",
56
+ "path",
57
+ "regex",
58
+ "string",
59
+ "system",
60
+ "operations",
61
+ "presets",
62
+ ]
63
+
64
+ [project.urls]
65
+ "Bug Reports" = "https://github.com/XulbuX-dev/PythonLibraryXulbuX/issues"
66
+ "Changelog" = "https://github.com/XulbuX-dev/PythonLibraryXulbuX/blob/main/CHANGELOG.md"
67
+ "Documentation" = "https://github.com/XulbuX-dev/PythonLibraryXulbuX/wiki"
68
+ "Homepage" = "https://github.com/XulbuX-dev/PythonLibraryXulbuX"
69
+ "License" = "https://github.com/XulbuX-dev/PythonLibraryXulbuX/blob/main/LICENSE"
70
+ "Source Code" = "https://github.com/XulbuX-dev/PythonLibraryXulbuX/tree/main/src"
71
+
72
+
73
+ [project.scripts]
74
+ xx-help = "xulbux._cli_:help_command"
75
+ xulbux-help = "xulbux._cli_:help_command"
76
+
77
+ [tool.black]
78
+ line-length = 127
79
+ target-version = ['py310', 'py311', 'py312', 'py313']
80
+ include = '\.pyi?$'
81
+ extend-exclude = '''
82
+ /(
83
+ # directories
84
+ \.eggs
85
+ | \.git
86
+ | \.hg
87
+ | \.mypy_cache
88
+ | \.tox
89
+ | \.venv
90
+ | build
91
+ | dist
92
+ )/
93
+ '''
94
+
95
+ [tool.isort]
96
+ profile = "black"
97
+ line_length = 127
98
+ multi_line_output = 3
99
+ include_trailing_comma = true
100
+ force_grid_wrap = 0
101
+ use_parentheses = true
102
+ ensure_newline_before_comments = true
103
+
104
+ [tool.flake8]
105
+ max-line-length = 127
106
+ extend-ignore = ["E203", "E266", "E501", "W503", "E303"]
107
+ max-complexity = 18
108
+ select = ["B", "C", "E", "F", "W", "T4", "B9"]
109
+ per-file-ignores = ["__init__.py:F401,F403"]
110
+
111
+ [tool.setuptools]
112
+ packages = ["xulbux"]
113
+ package-dir = { "" = "src" }
114
+
115
+ [tool.pytest.ini_options]
116
+ minversion = "7.0"
117
+ addopts = "-ra -q"
118
+ pythonpath = ["src"]
119
+ testpaths = [
120
+ "tests/test_cmd_info.py",
121
+ "tests/test_color_types.py",
122
+ "tests/test_color.py",
123
+ "tests/test_data.py",
124
+ "tests/test_env_vars.py",
125
+ "tests/test_format_codes.py",
126
+ ]
xulbux-1.6.1/setup.cfg ADDED
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,57 @@
1
+ """
2
+ >>> import xulbux as xx
3
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
4
+ • CUSTOM TYPES:
5
+ • rgba(int,int,int,float)
6
+ • hsla(int,int,int,float)
7
+ • hexa(str)
8
+ • PATH OPERATIONS xx.Path
9
+ • FILE OPERATIONS xx.File
10
+ • JSON FILE OPERATIONS xx.Json
11
+ • SYSTEM ACTIONS xx.System
12
+ • MANAGE THE ENV PATH VAR xx.EnvPath
13
+ • CONSOLE LOG AND ACTIONS xx.Console
14
+ • EASY PRETTY PRINTING xx.FormatCodes
15
+ • WORKING WITH COLORS xx.Color
16
+ • DATA OPERATIONS xx.Data
17
+ • STRING OPERATIONS xx.String
18
+ • CODE STRING OPERATIONS xx.Code
19
+ • REGEX PATTERN TEMPLATES xx.Regex
20
+ """
21
+
22
+ __version__ = "1.6.1"
23
+ __author__ = "XulbuX"
24
+ __email__ = "xulbux.real@gmail.com"
25
+ __license__ = "MIT"
26
+ __copyright__ = "Copyright (c) 2024 XulbuX"
27
+ __url__ = "https://github.com/XulbuX-dev/PythonLibraryXulbuX"
28
+ __description__ = "A library which includes a lot of really helpful functions."
29
+ __all__ = [
30
+ "_consts_",
31
+ "xx_console",
32
+ "xx_code",
33
+ "xx_color",
34
+ "xx_data",
35
+ "xx_env_path",
36
+ "xx_file",
37
+ "xx_format_codes",
38
+ "xx_json",
39
+ "xx_path",
40
+ "xx_regex",
41
+ "xx_string",
42
+ "xx_system",
43
+ ]
44
+
45
+ from ._consts_ import *
46
+ from .xx_code import *
47
+ from .xx_color import *
48
+ from .xx_console import *
49
+ from .xx_data import *
50
+ from .xx_env_path import *
51
+ from .xx_file import *
52
+ from .xx_format_codes import *
53
+ from .xx_json import *
54
+ from .xx_path import *
55
+ from .xx_regex import *
56
+ from .xx_string import *
57
+ from .xx_system import *
@@ -0,0 +1,53 @@
1
+ from . import __version__
2
+ from ._consts_ import DEFAULT
3
+ from .xx_format_codes import FormatCodes
4
+ from .xx_console import Console
5
+
6
+
7
+ def help_command():
8
+ """Show some info about the library, with a brief explanation of how to use it."""
9
+ color = {
10
+ "lib": DEFAULT.color["ice"],
11
+ "import": DEFAULT.color["red"],
12
+ "class": DEFAULT.color["lavender"],
13
+ "types": DEFAULT.color["lightblue"],
14
+ "punctuators": DEFAULT.color["darkgray"],
15
+ }
16
+ FormatCodes.print(
17
+ rf""" [_|b|#7075FF] __ __
18
+ [b|#7075FF] _ __ __ __/ / / /_ __ ___ __
19
+ [b|#7075FF] | |/ // / / / / / __ \/ / / | |/ /
20
+ [b|#7075FF] > , </ /_/ / /_/ /_/ / /_/ /> , <
21
+ [b|#7075FF]/_/|_|\____/\__/\____/\____//_/|_| [*|BG:{DEFAULT.color['gray']}|#000] v[b]{__version__} [*]
22
+
23
+ [i|{DEFAULT.color['coral']}]A TON OF COOL FUNCTIONS, YOU NEED![*]
24
+
25
+ [b|#75A2FF]Usage:[*]
26
+ [{color['punctuators']}]# GENERAL LIBRARY[*]
27
+ [{color['import']}]import [{color['lib']}]xulbux [{color['import']}]as [{color['lib']}]xx[*]
28
+ [{color['punctuators']}]# CUSTOM TYPES[*]
29
+ [{color['import']}]from [{color['lib']}]xulbux [{color['import']}]import [{color['lib']}]rgba[{color['punctuators']}], [{color['lib']}]hsla[{color['punctuators']}], [{color['lib']}]hexa[*]
30
+
31
+ [b|#75A2FF]Includes:[*]
32
+ [dim](•) CUSTOM TYPES:
33
+ [dim](•) [{color['class']}]rgba[{color['punctuators']}]/([i|{color['types']}]int[_|{color['punctuators']}],[i|{color['types']}]int[_|{color['punctuators']}],[i|{color['types']}]int[_|{color['punctuators']}],[i|{color['types']}]float[_|{color['punctuators']}])[*]
34
+ [dim](•) [{color['class']}]hsla[{color['punctuators']}]/([i|{color['types']}]int[_|{color['punctuators']}],[i|{color['types']}]int[_|{color['punctuators']}],[i|{color['types']}]int[_|{color['punctuators']}],[i|{color['types']}]float[_|{color['punctuators']}])[*]
35
+ [dim](•) [{color['class']}]hexa[{color['punctuators']}]/([i|{color['types']}]str[_|{color['punctuators']}]|[i|{color['types']}]int[_|{color['punctuators']}])[*]
36
+ [dim](•) PATH OPERATIONS [{color['lib']}]xx[{color['punctuators']}].[{color['class']}]Path[*]
37
+ [dim](•) FILE OPERATIONS [{color['lib']}]xx[{color['punctuators']}].[{color['class']}]File[*]
38
+ [dim](•) JSON FILE OPERATIONS [{color['lib']}]xx[{color['punctuators']}].[{color['class']}]Json[*]
39
+ [dim](•) SYSTEM ACTIONS [{color['lib']}]xx[{color['punctuators']}].[{color['class']}]System[*]
40
+ [dim](•) MANAGE THE ENV PATH VAR [{color['lib']}]xx[{color['punctuators']}].[{color['class']}]EnvPath[*]
41
+ [dim](•) CONSOLE LOG AND ACTIONS [{color['lib']}]xx[{color['punctuators']}].[{color['class']}]Console[*]
42
+ [dim](•) EASY PRETTY PRINTING [{color['lib']}]xx[{color['punctuators']}].[{color['class']}]FormatCodes[*]
43
+ [dim](•) WORKING WITH COLORS [{color['lib']}]xx[{color['punctuators']}].[{color['class']}]Color[*]
44
+ [dim](•) DATA OPERATIONS [{color['lib']}]xx[{color['punctuators']}].[{color['class']}]Data[*]
45
+ [dim](•) STRING OPERATIONS [{color['lib']}]xx[{color['punctuators']}].[{color['class']}]String[*]
46
+ [dim](•) CODE STRING OPERATIONS [{color['lib']}]xx[{color['punctuators']}].[{color['class']}]Code[*]
47
+ [dim](•) REGEX PATTERN TEMPLATES [{color['lib']}]xx[{color['punctuators']}].[{color['class']}]Regex[*]
48
+ [_]
49
+ [dim](Press any key to exit...)
50
+ """,
51
+ default_color=DEFAULT.text_color,
52
+ )
53
+ Console.pause_exit(pause=True)
@@ -0,0 +1,145 @@
1
+ class DEFAULT:
2
+
3
+ text_color: str = "#95B5FF"
4
+ color: dict[str, str] = {
5
+ "white": "#F1F2FF",
6
+ "lightgray": "#B6B7C0",
7
+ "gray": "#7B7C8D",
8
+ "darkgray": "#67686C",
9
+ "black": "#202125",
10
+ "red": "#FF606A",
11
+ "coral": "#FF7069",
12
+ "orange": "#FF876A",
13
+ "tangerine": "#FF9962",
14
+ "gold": "#FFAF60",
15
+ "yellow": "#FFD260",
16
+ "green": "#7EE787",
17
+ "teal": "#50EAAF",
18
+ "cyan": "#3EE6DE",
19
+ "ice": "#77EFEF",
20
+ "lightblue": "#60AAFF",
21
+ "blue": "#8085FF",
22
+ "lavender": "#9B7DFF",
23
+ "purple": "#AD68FF",
24
+ "magenta": "#C860FF",
25
+ "pink": "#EE60BB",
26
+ "rose": "#FF6090",
27
+ }
28
+
29
+
30
+ class CHARS:
31
+
32
+ # CODE TO SIGNAL, ALL CHARACTERS ARE ALLOWED
33
+ all = "<*allowed>"
34
+
35
+ # DIGIT SETS
36
+ digits = "0123456789"
37
+ float_digits = digits + "."
38
+ hex_digits = digits + "#abcdefABCDEF"
39
+
40
+ # LETTER CATEGORIES
41
+ lowercase = "abcdefghijklmnopqrstuvwxyz"
42
+ lowercase_extended = lowercase + "äëïöüÿàèìòùáéíóúýâêîôûãñõåæç"
43
+ uppercase = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
44
+ uppercase_extended = uppercase + "ÄËÏÖÜÀÈÌÒÙÁÉÍÓÚÝÂÊÎÔÛÃÑÕÅÆÇß"
45
+
46
+ # COMBINED LETTER SETS
47
+ letters = lowercase + uppercase
48
+ letters_extended = lowercase_extended + uppercase_extended
49
+
50
+ # ASCII sets
51
+ special_ascii = " !\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"
52
+ special_ascii_extended = special_ascii + "ø£Ø×ƒªº¿®¬½¼¡«»░▒▓│┤©╣║╗╝¢¥┐└┴┬├─┼╚╔╩╦╠═╬¤ðÐı┘┌█▄¦▀µþÞ¯´≡­±‗¾¶§÷¸°¨·¹³²■ "
53
+ standard_ascii = special_ascii + digits + letters
54
+ full_ascii = special_ascii_extended + digits + letters_extended
55
+
56
+
57
+ class ANSI:
58
+
59
+ global CHAR, START, SEP, END
60
+
61
+ char_esc = r"\x1b"
62
+ CHAR = char = "\x1b"
63
+ START = start = "["
64
+ SEP = sep = ";"
65
+ END = end = "m"
66
+ modifier = {"lighten": "+l", "darken": "-d"}
67
+
68
+ def seq(parts: int = 1) -> str:
69
+ """Generate an ANSI sequence with `parts` amount of placeholders."""
70
+ return CHAR + START + SEP.join(["{}" for _ in range(parts)]) + END
71
+
72
+ seq_color: str = CHAR + START + "38" + SEP + "2" + SEP + "{}" + SEP + "{}" + SEP + "{}" + END
73
+ seq_bg_color: str = CHAR + START + "48" + SEP + "2" + SEP + "{}" + SEP + "{}" + SEP + "{}" + END
74
+
75
+ color_map: list[str] = [
76
+ ########### DEFAULT CONSOLE COLOR NAMES ############
77
+ "black",
78
+ "red",
79
+ "green",
80
+ "yellow",
81
+ "blue",
82
+ "magenta",
83
+ "cyan",
84
+ "white",
85
+ ]
86
+
87
+ codes_map: dict[str | tuple[str], int] = {
88
+ ###################### RESETS ######################
89
+ "_": 0,
90
+ ("_bold", "_b"): 22,
91
+ ("_dim", "_d"): 22,
92
+ ("_italic", "_i"): 23,
93
+ ("_underline", "_u"): 24,
94
+ ("_double-underline", "_du"): 24,
95
+ ("_inverse", "_invert", "_in"): 27,
96
+ ("_hidden", "_hide", "_h"): 28,
97
+ ("_strikethrough", "_s"): 29,
98
+ ("_color", "_c"): 39,
99
+ ("_background", "_bg"): 49,
100
+ ################### TEXT FORMATS ###################
101
+ ("bold", "b"): 1,
102
+ ("dim", "d"): 2,
103
+ ("italic", "i"): 3,
104
+ ("underline", "u"): 4,
105
+ ("inverse", "invert", "in"): 7,
106
+ ("hidden", "hide", "h"): 8,
107
+ ("strikethrough", "s"): 9,
108
+ ("double-underline", "du"): 21,
109
+ ############## DEFAULT CONSOLE COLORS ##############
110
+ "black": 30,
111
+ "red": 31,
112
+ "green": 32,
113
+ "yellow": 33,
114
+ "blue": 34,
115
+ "magenta": 35,
116
+ "cyan": 36,
117
+ "white": 37,
118
+ ########## BRIGHT DEFAULT CONSOLE COLORS ###########
119
+ ("bright:black", "br:black"): 90,
120
+ ("bright:red", "br:red"): 91,
121
+ ("bright:green", "br:green"): 92,
122
+ ("bright:yellow", "br:yellow"): 93,
123
+ ("bright:blue", "br:blue"): 94,
124
+ ("bright:magenta", "br:magenta"): 95,
125
+ ("bright:cyan", "br:cyan"): 96,
126
+ ("bright:white", "br:white"): 97,
127
+ ######## DEFAULT CONSOLE BACKGROUND COLORS #########
128
+ "bg:black": 40,
129
+ "bg:red": 41,
130
+ "bg:green": 42,
131
+ "bg:yellow": 43,
132
+ "bg:blue": 44,
133
+ "bg:magenta": 45,
134
+ "bg:cyan": 46,
135
+ "bg:white": 47,
136
+ ##### BRIGHT DEFAULT CONSOLE BACKGROUND COLORS #####
137
+ ("bg:bright:black", "bg:br:black"): 100,
138
+ ("bg:bright:red", "bg:br:red"): 101,
139
+ ("bg:bright:green", "bg:br:green"): 102,
140
+ ("bg:bright:yellow", "bg:br:yellow"): 103,
141
+ ("bg:bright:blue", "bg:br:blue"): 104,
142
+ ("bg:bright:magenta", "bg:br:magenta"): 105,
143
+ ("bg:bright:cyan", "bg:br:cyan"): 106,
144
+ ("bg:bright:white", "bg:br:white"): 107,
145
+ }