xulbux 1.5.5__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.

@@ -0,0 +1,61 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ *.egg-info/
24
+ .installed.cfg
25
+ *.egg
26
+
27
+ # PyInstaller
28
+ *.manifest
29
+ *.spec
30
+
31
+ # Installer logs
32
+ pip-log.txt
33
+ pip-delete-this-directory.txt
34
+
35
+ # Unit test / coverage reports
36
+ htmlcov/
37
+ .tox/
38
+ .coverage
39
+ .coverage.*
40
+ .cache
41
+ nosetests.xml
42
+ coverage.xml
43
+ *.cover
44
+ .hypothesis/
45
+
46
+ # Jupyter Notebook
47
+ .ipynb_checkpoints
48
+
49
+ # pyenv
50
+ .python-version
51
+
52
+ # Environment
53
+ .env
54
+ .venv
55
+ env/
56
+ venv/
57
+ ENV/
58
+
59
+ # IDEs
60
+ .vscode/
61
+ .idea/
@@ -0,0 +1,287 @@
1
+ <div id="top" style="width:45px; height:45px; right:10px; top:10px; position:absolute">
2
+ <a href="#release"><abbr title="go to bottom" style="text-decoration:none">
3
+ <div style="
4
+ font-size: 2em;
5
+ font-weight: bold;
6
+ background: #88889845;
7
+ border-radius: 0.2em;
8
+ text-align: center;
9
+ justify-content: center;
10
+ ">🠫</div>
11
+ </abbr></a>
12
+ </div>
13
+
14
+
15
+ # <br><b>Changelog</b><br>
16
+
17
+
18
+ ## ... `v1.5.5`
19
+ * Added functions to get the width and height of the console (*in characters and lines*):<br>
20
+ <code>Cmd.w() -> *int*</code> how many text characters the console is wide<br>
21
+ <code>Cmd.h() -> *int*</code> how many lines the console is high<br>
22
+ <code>Cmd.wh() -> *tuple[int,int]*</code> a tuple with width and height
23
+ * Added the function <code>split_every_chars(*string*, *split_every*) -> *list*[*str*]</code> to `xx_string`
24
+ * Added doc-strings to every function in `xx_string`
25
+ * Updated the `Cmd.restricted_input()` function:
26
+ - paste text from the clipboard
27
+ - select all text to delete everything at once
28
+ - write and backspace over multiple lines
29
+ * Added required non-standard libraries to the project file
30
+ * Added more metadata to the project file
31
+
32
+ ## 06.11.2024 `v1.5.4`
33
+ * Made the `blend()` method from all the color types modify the *`self`* object as well as returning the result
34
+ * Added a new function <code>normalize_spaces(*code*) -> *str*</code> to `Code`
35
+ * Added new doc-strings to `xx_code` and `xx_cmd`
36
+ * Added a custom `input()` function to `Cmd`, which lets you specify the allowed text characters the user can type, as well as the minimum and maximum length of the input
37
+ * Added the function `pwd_input()` to `Cmd`, which works just like the `Cmd.restricted_input()` but masks the input characters with `*`
38
+ * Restructured the whole library's imports, so you the custom types won't get displayed as `Any` when hovering over a function
39
+ * Fixed bug when trying to get the base directory from a compiled script (*EXE*):<br>
40
+ Would get the path to the temporary extracted directory, which is created when running the EXE file<br>
41
+ Now it gets the actual base directory of the currently running file
42
+
43
+ ## 30.10.2024 `v1.5.3`
44
+ * Restructured the values in `_consts_.py`
45
+ * Added the default text color to the `_consts_.py` so it's easier to change it (*and used it in the library*)
46
+ * Added a bunch of other default colors to the `_consts_.py` (*and used them in the library*)
47
+ * Refactored the whole library's code after the [`PEPs`](https://peps.python.org/) and [`The Zen of Python`](https://peps.python.org/pep-0020/#the-zen-of-python) 🫡:
48
+ - changed the indent to 4 spaces
49
+ - no more inline control statements (*except its only a really small statement and body*)
50
+ * Added new methods to `Color`:<br>
51
+ <code>rgba_to_hex(*r*, *g*, *b*, *a*) -> *int*</code><br>
52
+ <code>hex_to_rgba(*hex_int*) -> *tuple*</code><br>
53
+ <code>luminance(*r*, *g*, *b*, *precision*, *round_to*) -> *float*|*int*</code>
54
+ * Fixed the `grayscale()` method of `rgba()`, `hsla()` and `hexa()`:<br>
55
+ The method would previously just return the color, fully desaturated (*not grayscale*)<br>
56
+ Now this is fixed, and the method uses the luminance formula, to get the actual grayscale value
57
+ * All the methods in the `xx_color` module now support HEXA integers (*e.g.* `0x8085FF` *instead of only strings:* `"#8085FF"` `"0x8085FF"`)
58
+
59
+ ## 28.10.2024 `v1.5.2`
60
+ * New parameter <code>correct_path:*bool*</code> in `Path.extend()`:
61
+ This makes sure, that typos in the path will only be corrected if this parameter is set to `True`
62
+ * Fixed bug in `Path.extend()`, where an empty string was taken as a valid path for the current directory `./`
63
+ * Fixed color validation bug:
64
+ `Color.is_valid_rgba()`and `Color.is_valid_hsla()` would not accept an alpha channel of `None`
65
+ `Color.is_valid_rgba()` was still checking for an alpha channel from `0` to `255` instead of `0` to `1`
66
+ * Fixed bug for `Color.has_alpha()`:
67
+ Previously, it would return `True` if the alpha channel was `None`. Now in such cases it will return `False`.
68
+
69
+ ## 28.10.2024 `v1.5.1`
70
+ * Renamed all library files for a better naming convention
71
+ * Now all functions in `xx_color` support both HEX prefixes (`#` *and* `0x`)
72
+ * Added the default HEX prefix to `_consts_.py`
73
+ * Fixed bug when initializing a `hexa()` object:<br>
74
+ Would throw an error, even if the color was valid
75
+
76
+ ## 27.10.2024 `v1.5.0`
77
+ * Split all classes into separate files, so users can download only parts of the library more easily
78
+ * Added a `__help__.py` file, which will show some information about the library and how to use it, when it's run as a script or when the `help()` function is called
79
+ * Added a lot more metadata to the library:<br>
80
+ `__version__` (*was already added in update [v1.4.2](#update-1-4-2)*)<br>
81
+ `__author__`<br>
82
+ `__email__`<br>
83
+ `__license__`<br>
84
+ `__copyright__`<br>
85
+ `__url__`<br>
86
+ `__description__`<br>
87
+ `__all__`
88
+
89
+ ## <span id="update-1-4-2">27.10.2024 `v1.4.2` `v1.4.3`</span>
90
+ * <code>Path.extend(*rel_path*) -> *abs_path*</code> now also extends system variables like `%USERPROFILE%` and `%APPDATA%`
91
+ * Removed unnecessary parts when checking for missing required libraries
92
+ * You can now get the libraries current version by accessing the attribute `XulbuX.__version__`
93
+
94
+ ## 26.10.2024 `v1.4.1`
95
+ * Added methods to each color type:<br>
96
+ <code>is_grayscale() -> *self*</code><br>
97
+ <code>is_opaque() -> *self*</code>
98
+ * Added additional error checking to the color types
99
+ * Made error messages for the color types clearer
100
+ * Updated the <code>blend(*other*, *ratio*)</code> method of all color types to use additive blending except for the alpha-channel
101
+ * Fixed problem with method-chaining for all color types
102
+
103
+ ## 25.10.2024 `v1.4.0`
104
+ * Huge update to the custom color types:
105
+ - Now all type-methods support chaining
106
+ - Added new methods to each type:<br>
107
+ <code>lighten(*amount*) -> *self*</code><br>
108
+ <code>darken(*amount*) -> *self*</code><br>
109
+ <code>saturate(*amount*) -> *self*</code><br>
110
+ <code>desaturate(*amount*) -> *self*</code><br>
111
+ <code>rotate(*hue*) -> *self*</code><br>
112
+ <code>invert() -> *self*</code><br>
113
+ <code>grayscale() -> *self*</code><br>
114
+ <code>blend(*other*, *ratio*) -> *self*</code><br>
115
+ <code>is_dark() -> *bool*</code><br>
116
+ <code>is_light() -> *bool*</code><br>
117
+ <code>with_alpha(*alpha*) -> *self*</code><br>
118
+ <code>complementary() -> *self*</code>
119
+
120
+ ## 23.10.2024 `v1.3.1`
121
+ * Now rounds the alpha channel to maximal 2 decimals, if converting from `hexa()` to `rgba()` or `hsla()`
122
+
123
+ ## 21.10.2024 `v1.3.0`
124
+ * fixed the custom types `rgba()`, `hsla()` and `hexa()`:<br>
125
+ - `rgba()`:<br>
126
+ the method `to_hsla()` works correctly now<br>
127
+ the method `to_hexa()` works correctly now
128
+ - `hsla()`:<br>
129
+ the method `to_rgba()` works correctly now<br>
130
+ the method `to_hexa()` works correctly now
131
+ - `hexa()`:<br>
132
+ the method `to_rgba()` works correctly now<br>
133
+ the method `to_hsla()` works correctly now
134
+ * fixed functions from the `Color` class:<br>
135
+ `Color.has_alpha()` works correctly now<br>
136
+ `Color.to_rgba()` works correctly now<br>
137
+ `Color.to_hsla()` works correctly now<br>
138
+ `Color.to_hexa()` works correctly now
139
+ * set default value for param `allow_alpha:bool` to `True` for functions:<br>
140
+ `Color.is_valid_rgba()`, `Color.is_valid_hsla()`, `Color.is_valid_hexa()`, `Color.is_valid()`
141
+
142
+ ## 18.10.2024 `v1.2.4` `v1.2.5`
143
+ * renamed the class `rgb()` to `rgba()` to communicate, more clearly, that it supports an alpha channel
144
+ * renamed the class `hsl()` to `hsla()` to communicate, more clearly, that it supports an alpha channel
145
+ * added more info to the `README.md` as well as additional links
146
+ * adjusted the structure inside `CHANGELOG.md` for a better overview and readability
147
+
148
+ ## 18.10.2024 `v1.2.3`
149
+ * added project links to the Python-project-file
150
+ * `CHANGELOG.md` improvements
151
+ * `README.md` improvements
152
+
153
+ ## 18.10.2024 `v1.2.1` `v1.2.2`
154
+ * fixed bug in function <code>Path.get(*base_dir*=True)</code>:<br>
155
+ Previously, setting `base_dir` to `True` would not return the actual base directory or even cause an error.<br>
156
+ This was now fixed, and setting `base_dir` to `True` will return the actual base directory of the current program (*except if not running from a file*).
157
+
158
+ ## 17.10.2024 `v1.2.0`
159
+ * new function in the `Path` class: `Path.remove()`
160
+
161
+ ## 17.10.2024 `v1.1.9`
162
+ * corrected the naming of classes to comply with Python naming standards
163
+
164
+ ## 17.10.2024 `v1.1.8`
165
+ * added support for all OSes to the OS-dependent functions
166
+
167
+ ## 17.10.2024 `v1.1.6` `v1.1.7`
168
+ * fixed the `Cmd.cls()` function:<br>
169
+ There was a bug where, on Windows 10, the ANSI formats weren't cleared.
170
+
171
+ ## 17.10.2024 `v1.1.4` `v1.1.5`
172
+ * added link to `CHANGELOG.md` to the `README.md` file
173
+
174
+ ## 17.10.2024 `v1.1.3`
175
+ * changed the default value of the param `compactness:int` in the function `Data.print()` to `1` instead of `0`
176
+
177
+ ## 17.10.2024 `v1.1.1` `v1.1.2`
178
+ * adjusted the library's description
179
+
180
+ ## 16.10.2024 `v1.1.0`
181
+ * made it possible to also auto-reset the color and not only the predefined formats, using the [auto-reset-format](#auto-reset-format) (`[format](Automatically resetting)`)
182
+
183
+ ## 16.10.2024 `v1.0.9`
184
+ * added a library description, which gets shown if it's ran directly
185
+ * made it possible to escape an <span id="auto-reset-format">auto-reset-format</span> (`[format](Automatically resetting)`) with a slash, so you can still have `()` brackets behind a `[format]`:
186
+ ```python
187
+ FormatCodes.print('[u](Automatically resetting) following text')
188
+ ```
189
+ prints:  <code><u>Automatically resetting</u> following text</code>
190
+
191
+ ```python
192
+ FormatCodes.print('[u]/(Automatically resetting) following text')
193
+ ```
194
+ prints:  <code><u>(Automatically resetting) following text</u></code>
195
+
196
+ ## 16.10.2024 `v1.0.7` `v1.0.8`
197
+ * added `input()` function to the `FormatCodes` class, so you can make pretty looking input prompts
198
+ * added warning for no network connection when trying to [install missing libraries](#improved-lib-importing)
199
+
200
+ ## 15.10.2024 `v1.0.6`
201
+ * <span id="improved-lib-importing">improved **$\color{#8085FF}\textsf{XulbuX}$** library importing:</span><br>
202
+ checks for missing required libraries and gives you the option to directly install them, if there are any
203
+ * moved constant variables into a separate file
204
+ * fixed issue where configuration file wasn't created and loaded correctly
205
+
206
+ ## 15.10.2024 `v1.0.1` `v1.0.2` `v1.0.3` `v1.0.4` `v1.0.5`
207
+ * fixed `f-string` issues for Python 3.10:<br>
208
+ **1:** no use of same quotes inside f-strings<br>
209
+ **2:** no backslash escaping in f-strings
210
+
211
+ ## <span id="release">14.10.2024 `v1.0.0`</span>
212
+ $\color{#F90}\Huge\textsf{RELEASE!\ 🤩🎉}$<br>
213
+ **at release**, the library **$\color{#8085FF}\textsf{XulbuX}$** looks like this:
214
+ ```python
215
+ # GENERAL LIBRARY
216
+ import XulbuX as xx
217
+ # CUSTOM TYPES
218
+ from XulbuX import rgb, hsl, hexa
219
+ ```
220
+ <table>
221
+ <thead>
222
+ <tr>
223
+ <th>Features</th>
224
+ <th>class, type, function, ...</th>
225
+ </tr>
226
+ </thead>
227
+ <tbody>
228
+ <tr>
229
+ <td>Custom Types:</td>
230
+ <td>
231
+ <code>rgb(<i>int</i>, <i>int</i>, <i>int</i>, <i>float</i>)</code><br>
232
+ <code>hsl(<i>int</i>, <i>int</i>, <i>int</i>, <i>float</i>)</code><br>
233
+ <code>hexa(<i>str</i>)</code>
234
+ </td>
235
+ </tr><tr>
236
+ <td>Directory Operations</td>
237
+ <td><code>xx.Dir</code></td>
238
+ </tr><tr>
239
+ <td>File Operations</td>
240
+ <td><code>xx.File</code></td>
241
+ </tr><tr>
242
+ <td>JSON File Operations</td>
243
+ <td><code>xx.Json</code></td>
244
+ </tr><tr>
245
+ <td>System Actions</td>
246
+ <td><code>xx.System</code></td>
247
+ </tr><tr>
248
+ <td>Manage Environment Vars</td>
249
+ <td><code>xx.EnvVars</code></td>
250
+ </tr><tr>
251
+ <td>CMD Log And Actions</td>
252
+ <td><code>xx.Cmd</code></td>
253
+ </tr><tr>
254
+ <td>Pretty Printing</td>
255
+ <td><code>xx.FormatCodes</code></td>
256
+ </tr><tr>
257
+ <td>Color Operations</td>
258
+ <td><code>xx.Color</code></td>
259
+ </tr><tr>
260
+ <td>Data Operations</td>
261
+ <td><code>xx.Data</code></td>
262
+ </tr><tr>
263
+ <td>String Operations</td>
264
+ <td><code>xx.String</code></td>
265
+ </tr><tr>
266
+ <td>Code String Operations</td>
267
+ <td><code>xx.Code</code></td>
268
+ </tr><tr>
269
+ <td>Regex Pattern Templates</td>
270
+ <td><code>xx.Regex</code></td>
271
+ </tr>
272
+ </tbody>
273
+ </table>
274
+
275
+
276
+ <div id="bottom" style="width:45px; height:45px; right:10px; position:absolute">
277
+ <a href="#top"><abbr title="go to top" style="text-decoration:none">
278
+ <div style="
279
+ font-size: 2em;
280
+ font-weight: bold;
281
+ background: #88889845;
282
+ border-radius: 0.2em;
283
+ text-align: center;
284
+ justify-content: center;
285
+ ">🠩</div>
286
+ </abbr></a>
287
+ </div>
xulbux-1.5.5/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.5.5/PKG-INFO ADDED
@@ -0,0 +1,97 @@
1
+ Metadata-Version: 2.3
2
+ Name: XulbuX
3
+ Version: 1.5.5
4
+ Summary: A library which includes a lot of really helpful functions.
5
+ Project-URL: Homepage, https://github.com/XulbuX-dev/Python/tree/main/Libraries/XulbuX
6
+ Project-URL: Bug Reports, https://github.com/XulbuX-dev/Python/issues
7
+ Project-URL: Documentation, https://github.com/XulbuX-dev/Python/wiki
8
+ Project-URL: Source Code, https://github.com/XulbuX-dev/Python/tree/main/Libraries/XulbuX/src
9
+ Project-URL: Changelog, https://github.com/XulbuX-dev/Python/blob/main/Libraries/XulbuX/CHANGELOG.md
10
+ Author-email: XulbuX <xulbux.real@gmail.com>
11
+ License: MIT License
12
+
13
+ Copyright (c) 2024 XulbuX
14
+
15
+ Permission is hereby granted, free of charge, to any person obtaining a copy
16
+ of this software and associated documentation files (the "Software"), to deal
17
+ in the Software without restriction, including without limitation the rights
18
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
19
+ copies of the Software, and to permit persons to whom the Software is
20
+ furnished to do so, subject to the following conditions:
21
+
22
+ The above copyright notice and this permission notice shall be included in all
23
+ copies or substantial portions of the Software.
24
+
25
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
28
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
30
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
31
+ SOFTWARE.
32
+ Keywords: classes,cmd,code,color,data,env,environment,file,format,functions,helper,helpful,json,library,methods,operations,path,presets,python,regex,string,structures,system,tools,types,utility,xulbux
33
+ Classifier: Intended Audience :: Developers
34
+ Classifier: License :: OSI Approved :: MIT License
35
+ Classifier: Operating System :: OS Independent
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: Topic :: Software Development :: Libraries :: Python Modules
41
+ Requires-Python: >=3.10.0
42
+ Requires-Dist: keyboard>=0.13.5
43
+ Requires-Dist: mouse>=0.7.1
44
+ Requires-Dist: regex>=2023.10.3
45
+ Provides-Extra: dev
46
+ Requires-Dist: pytest>=7.0; extra == 'dev'
47
+ Description-Content-Type: text/markdown
48
+
49
+ # **$\color{#8085FF}\Huge\textsf{XulbuX}$**
50
+
51
+ **$\color{#8085FF}\textsf{XulbuX}$** is a library which includes a lot of really helpful classes, types and functions.
52
+
53
+ For the libraries latest changes, see the [change log](https://github.com/XulbuX-dev/Python/blob/main/Libraries/XulbuX/CHANGELOG.md).<br>
54
+ For precise information about the library, see the library's [Wiki page](https://github.com/XulbuX-dev/Python/wiki).
55
+
56
+
57
+ ## Installation
58
+
59
+ On all operating systems, run the following command:
60
+ ```bash
61
+ pip install XulbuX
62
+ ```
63
+
64
+
65
+ ## Usage
66
+
67
+ ```python
68
+ # GENERAL LIBRARY
69
+ import XulbuX as xx
70
+ # CUSTOM TYPES
71
+ from XulbuX import rgba, hsla, hexa
72
+ ```
73
+ The library **$\color{#8085FF}\textsf{XulbuX}$** (*below used as* `xx` *with above imported types*) contains the following modules:
74
+ ```python
75
+ • CUSTOM TYPES:
76
+ • rgba(int,int,int,float)
77
+ • hsla(int,int,int,float)
78
+ • hexa(str)
79
+ • PATH OPERATIONS xx.Path
80
+ • FILE OPERATIONS xx.File
81
+ • JSON FILE OPERATIONS xx.Json
82
+ • SYSTEM ACTIONS xx.System
83
+ • MANAGE ENVIRONMENT VARS xx.EnvVars
84
+ • CMD LOG AND ACTIONS xx.Cmd
85
+ • PRETTY PRINTING xx.FormatCodes
86
+ • COLOR OPERATIONS xx.Color
87
+ • DATA OPERATIONS xx.Data
88
+ • STR OPERATIONS xx.String
89
+ • CODE STRING OPERATIONS xx.Code
90
+ • REGEX PATTERN TEMPLATES xx.Regex
91
+ ```
92
+
93
+
94
+ <br>
95
+
96
+ --------------------------------------------------------------
97
+ [View this library on PyPI](https://pypi.org/project/XulbuX/)
xulbux-1.5.5/README.md ADDED
@@ -0,0 +1,49 @@
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 the libraries latest changes, see the [change log](https://github.com/XulbuX-dev/Python/blob/main/Libraries/XulbuX/CHANGELOG.md).<br>
6
+ For precise information about the library, see the library's [Wiki page](https://github.com/XulbuX-dev/Python/wiki).
7
+
8
+
9
+ ## Installation
10
+
11
+ On all operating systems, run the following command:
12
+ ```bash
13
+ pip install XulbuX
14
+ ```
15
+
16
+
17
+ ## Usage
18
+
19
+ ```python
20
+ # GENERAL LIBRARY
21
+ import XulbuX as xx
22
+ # CUSTOM TYPES
23
+ from XulbuX import rgba, hsla, hexa
24
+ ```
25
+ The library **$\color{#8085FF}\textsf{XulbuX}$** (*below used as* `xx` *with above imported types*) contains the following modules:
26
+ ```python
27
+ • CUSTOM TYPES:
28
+ • rgba(int,int,int,float)
29
+ • hsla(int,int,int,float)
30
+ • hexa(str)
31
+ • PATH OPERATIONS xx.Path
32
+ • FILE OPERATIONS xx.File
33
+ • JSON FILE OPERATIONS xx.Json
34
+ • SYSTEM ACTIONS xx.System
35
+ • MANAGE ENVIRONMENT VARS xx.EnvVars
36
+ • CMD LOG AND ACTIONS xx.Cmd
37
+ • PRETTY PRINTING xx.FormatCodes
38
+ • COLOR OPERATIONS xx.Color
39
+ • DATA OPERATIONS xx.Data
40
+ • STR OPERATIONS xx.String
41
+ • CODE STRING OPERATIONS xx.Code
42
+ • REGEX PATTERN TEMPLATES xx.Regex
43
+ ```
44
+
45
+
46
+ <br>
47
+
48
+ --------------------------------------------------------------
49
+ [View this library on PyPI](https://pypi.org/project/XulbuX/)
@@ -0,0 +1,74 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ keywords = [
7
+ "xulbux",
8
+ "python",
9
+ "library",
10
+ "utility",
11
+ "helper",
12
+ "helpful",
13
+ "functions",
14
+ "tools",
15
+ "classes",
16
+ "types",
17
+ "methods",
18
+ "cmd",
19
+ "code",
20
+ "color",
21
+ "data",
22
+ "structures",
23
+ "env",
24
+ "environment",
25
+ "file",
26
+ "format",
27
+ "json",
28
+ "path",
29
+ "regex",
30
+ "string",
31
+ "system",
32
+ "operations",
33
+ "presets",
34
+ ]
35
+ name = "XulbuX"
36
+ version = "1.5.5"
37
+ authors = [{ name = "XulbuX", email = "xulbux.real@gmail.com" }]
38
+ description = "A library which includes a lot of really helpful functions."
39
+ readme = "README.md"
40
+ license = { file = "LICENSE" }
41
+ changelog = "CHANGELOG.md"
42
+ requires-python = ">=3.10.0"
43
+ dependencies = ["keyboard>=0.13.5", "mouse>=0.7.1", "regex>=2023.10.3"]
44
+ classifiers = [
45
+ "Intended Audience :: Developers",
46
+ "Programming Language :: Python :: 3",
47
+ "Programming Language :: Python :: 3.10",
48
+ "Programming Language :: Python :: 3.11",
49
+ "Programming Language :: Python :: 3.12",
50
+ "License :: OSI Approved :: MIT License",
51
+ "Operating System :: OS Independent",
52
+ "Topic :: Software Development :: Libraries :: Python Modules",
53
+ ]
54
+
55
+ [project.urls]
56
+ "Homepage" = "https://github.com/XulbuX-dev/Python/tree/main/Libraries/XulbuX"
57
+ "Bug Reports" = "https://github.com/XulbuX-dev/Python/issues"
58
+ "Documentation" = "https://github.com/XulbuX-dev/Python/wiki"
59
+ "Source Code" = "https://github.com/XulbuX-dev/Python/tree/main/Libraries/XulbuX/src"
60
+ "Changelog" = "https://github.com/XulbuX-dev/Python/blob/main/Libraries/XulbuX/CHANGELOG.md"
61
+
62
+ [project.scripts]
63
+ xulbux-help = "__help__:help"
64
+
65
+ [project.optional-dependencies]
66
+ dev = ["pytest>=7.0"]
67
+
68
+ [tool.hatch.build.targets.wheel]
69
+ packages = ["src/xulbux"]
70
+
71
+ [tool.pytest.ini_options]
72
+ minversion = "6.0"
73
+ addopts = "-ra -q"
74
+ testpaths = ["tests"]
@@ -0,0 +1,74 @@
1
+ try: from ._consts_ import DEFAULT
2
+ except: from _consts_ import DEFAULT
3
+ try: from .xx_format_codes import *
4
+ except: from xx_format_codes import *
5
+ try: from .xx_cmd import *
6
+ except: from xx_cmd import *
7
+
8
+ import os as _os
9
+
10
+
11
+
12
+
13
+ def get_version(file:str = '__init__.py', var:str = '__version__') -> str:
14
+ try:
15
+ from . import var
16
+ return var
17
+ except ImportError:
18
+ init_path = _os.path.join(_os.path.dirname(__file__), file)
19
+ if _os.path.isfile(init_path):
20
+ with open(init_path, encoding='utf-8') as f:
21
+ for line in f:
22
+ if line.startswith(var): return line.split('=')[-1].strip().strip('\'"')
23
+ return 'unknown'
24
+
25
+ def help():
26
+ """Show some info about the library, with a brief explanation of how to use it."""
27
+ color = {
28
+ 'lib': DEFAULT.color['ice'],
29
+ 'import': DEFAULT.color['red'],
30
+ 'class': DEFAULT.color['lavender'],
31
+ 'types': DEFAULT.color['lightblue'],
32
+ 'punctuators': DEFAULT.color['darkgray'],
33
+ }
34
+ FormatCodes.print(
35
+ rf''' [_|b|#7075FF] __ __
36
+ [b|#7075FF] _ __ __ __/ / / /_ __ ___ __
37
+ [b|#7075FF] | |/ // / / / / / __ \/ / / | |/ /
38
+ [b|#7075FF] > , </ /_/ / /_/ /_/ / /_/ /> , <
39
+ [b|#7075FF]/_/|_|\____/\__/\____/\____//_/|_| [*|BG:{DEFAULT.color['gray']}|#000] v[b]{get_version()} [*]
40
+
41
+ [i|{DEFAULT.color['coral']}]A TON OF COOL FUNCTIONS, YOU NEED![*]
42
+
43
+ [b|#75A2FF]Usage:[*]
44
+ [{color['punctuators']}]# GENERAL LIBRARY[*]
45
+ [{color['import']}]import [{color['lib']}]XulbuX [{color['import']}]as [{color['lib']}]xx[*]
46
+ [{color['punctuators']}]# CUSTOM TYPES[*]
47
+ [{color['import']}]from [{color['lib']}]XulbuX [{color['import']}]import [{color['lib']}]rgba[{color['punctuators']}], [{color['lib']}]hsla[{color['punctuators']}], [{color['lib']}]hexa[*]
48
+
49
+ [b|#75A2FF]Includes:[*]
50
+ [dim](•) CUSTOM TYPES:
51
+ [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']}])[*]
52
+ [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']}])[*]
53
+ [dim](•) [{color['class']}]hexa[{color['punctuators']}]/([i|{color['types']}]str[_|{color['punctuators']}])[*]
54
+ [dim](•) PATH OPERATIONS [{color['lib']}]xx[{color['punctuators']}].[{color['class']}]Path[*]
55
+ [dim](•) FILE OPERATIONS [{color['lib']}]xx[{color['punctuators']}].[{color['class']}]File[*]
56
+ [dim](•) JSON FILE OPERATIONS [{color['lib']}]xx[{color['punctuators']}].[{color['class']}]Json[*]
57
+ [dim](•) SYSTEM ACTIONS [{color['lib']}]xx[{color['punctuators']}].[{color['class']}]System[*]
58
+ [dim](•) MANAGE ENVIRONMENT VARS [{color['lib']}]xx[{color['punctuators']}].[{color['class']}]Env_vars[*]
59
+ [dim](•) CMD LOG AND ACTIONS [{color['lib']}]xx[{color['punctuators']}].[{color['class']}]Cmd[*]
60
+ [dim](•) PRETTY PRINTING [{color['lib']}]xx[{color['punctuators']}].[{color['class']}]FormatCodes[*]
61
+ [dim](•) COLOR OPERATIONS [{color['lib']}]xx[{color['punctuators']}].[{color['class']}]Color[*]
62
+ [dim](•) DATA OPERATIONS [{color['lib']}]xx[{color['punctuators']}].[{color['class']}]Data[*]
63
+ [dim](•) STR OPERATIONS [{color['lib']}]xx[{color['punctuators']}].[{color['class']}]String[*]
64
+ [dim](•) CODE STRING OPERATIONS [{color['lib']}]xx[{color['punctuators']}].[{color['class']}]Code[*]
65
+ [dim](•) REGEX PATTERN TEMPLATES [{color['lib']}]xx[{color['punctuators']}].[{color['class']}]Regex[*]
66
+ [_]
67
+ [dim](Press any key to exit...)
68
+ ''', DEFAULT.text_color)
69
+ Cmd.pause_exit(pause=True)
70
+
71
+
72
+
73
+ if __name__ == '__main__':
74
+ help()