xulbux 1.6.1__tar.gz → 1.6.3__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/src/xulbux.egg-info → xulbux-1.6.3}/PKG-INFO +15 -15
- {xulbux-1.6.1 → xulbux-1.6.3}/README.md +13 -13
- {xulbux-1.6.1 → xulbux-1.6.3}/pyproject.toml +3 -2
- {xulbux-1.6.1 → xulbux-1.6.3}/src/xulbux/__init__.py +1 -1
- {xulbux-1.6.1 → xulbux-1.6.3}/src/xulbux/_consts_.py +18 -18
- {xulbux-1.6.1 → xulbux-1.6.3}/src/xulbux/xx_color.py +102 -92
- {xulbux-1.6.1 → xulbux-1.6.3}/src/xulbux/xx_console.py +0 -12
- {xulbux-1.6.1 → xulbux-1.6.3}/src/xulbux/xx_env_path.py +1 -1
- xulbux-1.6.3/src/xulbux/xx_format_codes.py +429 -0
- {xulbux-1.6.1 → xulbux-1.6.3}/src/xulbux/xx_regex.py +41 -30
- {xulbux-1.6.1 → xulbux-1.6.3}/src/xulbux/xx_system.py +53 -1
- {xulbux-1.6.1 → xulbux-1.6.3/src/xulbux.egg-info}/PKG-INFO +15 -15
- {xulbux-1.6.1 → xulbux-1.6.3}/src/xulbux.egg-info/SOURCES.txt +1 -1
- xulbux-1.6.3/tests/test_color.py +18 -0
- {xulbux-1.6.1 → xulbux-1.6.3}/tests/test_color_types.py +5 -2
- xulbux-1.6.1/tests/test_cmd_info.py → xulbux-1.6.3/tests/test_console_info.py +2 -4
- xulbux-1.6.3/tests/test_env_vars.py +25 -0
- xulbux-1.6.1/src/xulbux/xx_format_codes.py +0 -305
- xulbux-1.6.1/tests/test_color.py +0 -18
- xulbux-1.6.1/tests/test_env_vars.py +0 -25
- {xulbux-1.6.1 → xulbux-1.6.3}/LICENSE +0 -0
- {xulbux-1.6.1 → xulbux-1.6.3}/setup.cfg +0 -0
- {xulbux-1.6.1 → xulbux-1.6.3}/src/xulbux/_cli_.py +0 -0
- {xulbux-1.6.1 → xulbux-1.6.3}/src/xulbux/xx_code.py +0 -0
- {xulbux-1.6.1 → xulbux-1.6.3}/src/xulbux/xx_data.py +0 -0
- {xulbux-1.6.1 → xulbux-1.6.3}/src/xulbux/xx_file.py +0 -0
- {xulbux-1.6.1 → xulbux-1.6.3}/src/xulbux/xx_json.py +0 -0
- {xulbux-1.6.1 → xulbux-1.6.3}/src/xulbux/xx_path.py +0 -0
- {xulbux-1.6.1 → xulbux-1.6.3}/src/xulbux/xx_string.py +0 -0
- {xulbux-1.6.1 → xulbux-1.6.3}/src/xulbux.egg-info/dependency_links.txt +0 -0
- {xulbux-1.6.1 → xulbux-1.6.3}/src/xulbux.egg-info/entry_points.txt +0 -0
- {xulbux-1.6.1 → xulbux-1.6.3}/src/xulbux.egg-info/requires.txt +0 -0
- {xulbux-1.6.1 → xulbux-1.6.3}/src/xulbux.egg-info/top_level.txt +0 -0
- {xulbux-1.6.1 → xulbux-1.6.3}/tests/test_data.py +0 -0
- {xulbux-1.6.1 → xulbux-1.6.3}/tests/test_format_codes.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: xulbux
|
|
3
|
-
Version: 1.6.
|
|
3
|
+
Version: 1.6.3
|
|
4
4
|
Summary: A library which includes a lot of really helpful functions.
|
|
5
5
|
Author-email: XulbuX <xulbux.real@gmail.com>
|
|
6
6
|
License: MIT License
|
|
@@ -31,7 +31,7 @@ Project-URL: Documentation, https://github.com/XulbuX-dev/PythonLibraryXulbuX/wi
|
|
|
31
31
|
Project-URL: Homepage, https://github.com/XulbuX-dev/PythonLibraryXulbuX
|
|
32
32
|
Project-URL: License, https://github.com/XulbuX-dev/PythonLibraryXulbuX/blob/main/LICENSE
|
|
33
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
|
|
34
|
+
Keywords: xulbux,python,library,utility,helper,functions,tools,classes,types,methods,cmd,console,code,color,data,structures,env,environment,file,format,json,path,regex,string,system,operations,presets
|
|
35
35
|
Classifier: Intended Audience :: Developers
|
|
36
36
|
Classifier: Programming Language :: Python :: 3
|
|
37
37
|
Classifier: Programming Language :: Python :: 3.10
|
|
@@ -89,19 +89,19 @@ from xulbux import rgba, hsla, hexa
|
|
|
89
89
|
# Modules
|
|
90
90
|
|
|
91
91
|
| | |
|
|
92
|
-
|
|
|
93
|
-
| <h3>[`xx_code`](https://github.com/XulbuX-dev/PythonLibraryXulbuX/wiki/xx_code)</h3>
|
|
94
|
-
| <h3>[`xx_color`](https://github.com/XulbuX-dev/PythonLibraryXulbuX/wiki/xx_color)</h3>
|
|
95
|
-
| <h3>[`xx_console`](https://github.com/XulbuX-dev/PythonLibraryXulbuX/wiki/xx_console)</h3>
|
|
96
|
-
| <h3>[`xx_data`](https://github.com/XulbuX-dev/PythonLibraryXulbuX/wiki/xx_data)</h3>
|
|
97
|
-
| <h3>[`xx_env_path`](https://github.com/XulbuX-dev/PythonLibraryXulbuX/wiki/xx_env_path)</h3>
|
|
98
|
-
| <h3
|
|
99
|
-
| <h3
|
|
100
|
-
| <h3>`xx_json`</h3>
|
|
101
|
-
| <h3>`xx_path`</h3>
|
|
102
|
-
| <h3>`xx_regex`</h3>
|
|
103
|
-
| <h3>[`xx_string`](https://github.com/XulbuX-dev/PythonLibraryXulbuX/wiki/xx_string)</h3>
|
|
104
|
-
| <h3>`xx_system`</h3>
|
|
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`](https://github.com/XulbuX-dev/PythonLibraryXulbuX/wiki/xx_file)</h3> | advanced working with files (*create files, rename file-extensions, ...*) |
|
|
99
|
+
| <h3>[`xx_format_codes`](https://github.com/XulbuX-dev/PythonLibraryXulbuX/wiki/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
105
|
|
|
106
106
|
|
|
107
107
|
<br>
|
|
@@ -34,19 +34,19 @@ from xulbux import rgba, hsla, hexa
|
|
|
34
34
|
# Modules
|
|
35
35
|
|
|
36
36
|
| | |
|
|
37
|
-
|
|
|
38
|
-
| <h3>[`xx_code`](https://github.com/XulbuX-dev/PythonLibraryXulbuX/wiki/xx_code)</h3>
|
|
39
|
-
| <h3>[`xx_color`](https://github.com/XulbuX-dev/PythonLibraryXulbuX/wiki/xx_color)</h3>
|
|
40
|
-
| <h3>[`xx_console`](https://github.com/XulbuX-dev/PythonLibraryXulbuX/wiki/xx_console)</h3>
|
|
41
|
-
| <h3>[`xx_data`](https://github.com/XulbuX-dev/PythonLibraryXulbuX/wiki/xx_data)</h3>
|
|
42
|
-
| <h3>[`xx_env_path`](https://github.com/XulbuX-dev/PythonLibraryXulbuX/wiki/xx_env_path)</h3>
|
|
43
|
-
| <h3
|
|
44
|
-
| <h3
|
|
45
|
-
| <h3>`xx_json`</h3>
|
|
46
|
-
| <h3>`xx_path`</h3>
|
|
47
|
-
| <h3>`xx_regex`</h3>
|
|
48
|
-
| <h3>[`xx_string`](https://github.com/XulbuX-dev/PythonLibraryXulbuX/wiki/xx_string)</h3>
|
|
49
|
-
| <h3>`xx_system`</h3>
|
|
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`](https://github.com/XulbuX-dev/PythonLibraryXulbuX/wiki/xx_file)</h3> | advanced working with files (*create files, rename file-extensions, ...*) |
|
|
44
|
+
| <h3>[`xx_format_codes`](https://github.com/XulbuX-dev/PythonLibraryXulbuX/wiki/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
50
|
|
|
51
51
|
|
|
52
52
|
<br>
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "xulbux"
|
|
7
|
-
version = "1.6.
|
|
7
|
+
version = "1.6.3"
|
|
8
8
|
authors = [{ name = "XulbuX", email = "xulbux.real@gmail.com" }]
|
|
9
9
|
description = "A library which includes a lot of really helpful functions."
|
|
10
10
|
readme = "README.md"
|
|
@@ -44,6 +44,7 @@ keywords = [
|
|
|
44
44
|
"types",
|
|
45
45
|
"methods",
|
|
46
46
|
"cmd",
|
|
47
|
+
"console",
|
|
47
48
|
"code",
|
|
48
49
|
"color",
|
|
49
50
|
"data",
|
|
@@ -117,7 +118,7 @@ minversion = "7.0"
|
|
|
117
118
|
addopts = "-ra -q"
|
|
118
119
|
pythonpath = ["src"]
|
|
119
120
|
testpaths = [
|
|
120
|
-
"tests/
|
|
121
|
+
"tests/test_console_info.py",
|
|
121
122
|
"tests/test_color_types.py",
|
|
122
123
|
"tests/test_color.py",
|
|
123
124
|
"tests/test_data.py",
|
|
@@ -58,12 +58,12 @@ class ANSI:
|
|
|
58
58
|
|
|
59
59
|
global CHAR, START, SEP, END
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
escaped_char = "\\x1b"
|
|
62
62
|
CHAR = char = "\x1b"
|
|
63
63
|
START = start = "["
|
|
64
64
|
SEP = sep = ";"
|
|
65
65
|
END = end = "m"
|
|
66
|
-
|
|
66
|
+
default_color_modifiers = {"lighten": "+l", "darken": "-d"}
|
|
67
67
|
|
|
68
68
|
def seq(parts: int = 1) -> str:
|
|
69
69
|
"""Generate an ANSI sequence with `parts` amount of placeholders."""
|
|
@@ -116,14 +116,14 @@ class ANSI:
|
|
|
116
116
|
"cyan": 36,
|
|
117
117
|
"white": 37,
|
|
118
118
|
########## BRIGHT DEFAULT CONSOLE COLORS ###########
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
119
|
+
"br:black": 90,
|
|
120
|
+
"br:red": 91,
|
|
121
|
+
"br:green": 92,
|
|
122
|
+
"br:yellow": 93,
|
|
123
|
+
"br:blue": 94,
|
|
124
|
+
"br:magenta": 95,
|
|
125
|
+
"br:cyan": 96,
|
|
126
|
+
"br:white": 97,
|
|
127
127
|
######## DEFAULT CONSOLE BACKGROUND COLORS #########
|
|
128
128
|
"bg:black": 40,
|
|
129
129
|
"bg:red": 41,
|
|
@@ -134,12 +134,12 @@ class ANSI:
|
|
|
134
134
|
"bg:cyan": 46,
|
|
135
135
|
"bg:white": 47,
|
|
136
136
|
##### BRIGHT DEFAULT CONSOLE BACKGROUND COLORS #####
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
137
|
+
"bg:br:black": 100,
|
|
138
|
+
"bg:br:red": 101,
|
|
139
|
+
"bg:br:green": 102,
|
|
140
|
+
"bg:br:yellow": 103,
|
|
141
|
+
"bg:br:blue": 104,
|
|
142
|
+
"bg:br:magenta": 105,
|
|
143
|
+
"bg:br:cyan": 106,
|
|
144
|
+
"bg:br:white": 107,
|
|
145
145
|
}
|