xulbux 1.5.7__tar.gz → 1.5.9__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.5.9/PKG-INFO +110 -0
- xulbux-1.5.9/README.md +55 -0
- {xulbux-1.5.7 → xulbux-1.5.9}/pyproject.toml +21 -12
- xulbux-1.5.9/setup.cfg +4 -0
- {xulbux-1.5.7/src/XulbuX → xulbux-1.5.9/src/xulbux}/__init__.py +12 -12
- {xulbux-1.5.7/src/XulbuX → xulbux-1.5.9/src/xulbux}/_cli_.py +13 -12
- {xulbux-1.5.7/src/XulbuX → xulbux-1.5.9/src/xulbux}/_consts_.py +1 -0
- {xulbux-1.5.7/src/XulbuX → xulbux-1.5.9/src/xulbux}/xx_code.py +6 -6
- {xulbux-1.5.7/src/XulbuX → xulbux-1.5.9/src/xulbux}/xx_color.py +73 -66
- xulbux-1.5.7/src/XulbuX/xx_cmd.py → xulbux-1.5.9/src/xulbux/xx_console.py +39 -39
- xulbux-1.5.9/src/xulbux/xx_data.py +528 -0
- xulbux-1.5.9/src/xulbux/xx_env_path.py +113 -0
- {xulbux-1.5.7/src/XulbuX → xulbux-1.5.9/src/xulbux}/xx_file.py +25 -25
- {xulbux-1.5.7/src/XulbuX → xulbux-1.5.9/src/xulbux}/xx_format_codes.py +55 -36
- {xulbux-1.5.7/src/XulbuX → xulbux-1.5.9/src/xulbux}/xx_json.py +4 -4
- {xulbux-1.5.7/src/XulbuX → xulbux-1.5.9/src/xulbux}/xx_regex.py +29 -14
- xulbux-1.5.9/src/xulbux/xx_string.py +161 -0
- xulbux-1.5.9/src/xulbux.egg-info/PKG-INFO +110 -0
- xulbux-1.5.9/src/xulbux.egg-info/SOURCES.txt +30 -0
- xulbux-1.5.9/src/xulbux.egg-info/dependency_links.txt +1 -0
- xulbux-1.5.9/src/xulbux.egg-info/entry_points.txt +3 -0
- xulbux-1.5.9/src/xulbux.egg-info/requires.txt +10 -0
- xulbux-1.5.9/src/xulbux.egg-info/top_level.txt +1 -0
- {xulbux-1.5.7 → xulbux-1.5.9}/tests/test_cmd_info.py +4 -4
- xulbux-1.5.9/tests/test_color.py +18 -0
- {xulbux-1.5.7 → xulbux-1.5.9}/tests/test_color_types.py +1 -1
- xulbux-1.5.9/tests/test_data.py +51 -0
- xulbux-1.5.9/tests/test_env_vars.py +25 -0
- xulbux-1.5.9/tests/test_format_codes.py +42 -0
- xulbux-1.5.7/.github/workflows/python-package.yml +0 -49
- xulbux-1.5.7/.gitignore +0 -31
- xulbux-1.5.7/CHANGELOG.md +0 -303
- xulbux-1.5.7/PKG-INFO +0 -101
- xulbux-1.5.7/README.md +0 -49
- xulbux-1.5.7/documentation.md +0 -369
- xulbux-1.5.7/src/XulbuX/xx_data.py +0 -555
- xulbux-1.5.7/src/XulbuX/xx_env_vars.py +0 -73
- xulbux-1.5.7/src/XulbuX/xx_string.py +0 -144
- {xulbux-1.5.7 → xulbux-1.5.9}/LICENSE +0 -0
- {xulbux-1.5.7/src/XulbuX → xulbux-1.5.9/src/xulbux}/xx_path.py +0 -0
- {xulbux-1.5.7/src/XulbuX → xulbux-1.5.9/src/xulbux}/xx_system.py +0 -0
xulbux-1.5.9/PKG-INFO
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: xulbux
|
|
3
|
+
Version: 1.5.9
|
|
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.5.9/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/)
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
[build-system]
|
|
2
|
-
requires = ["
|
|
3
|
-
build-backend = "
|
|
2
|
+
requires = ["setuptools>=61.0"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
|
-
name = "
|
|
7
|
-
version = "1.5.
|
|
6
|
+
name = "xulbux"
|
|
7
|
+
version = "1.5.9"
|
|
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"
|
|
11
11
|
license = { file = "LICENSE" }
|
|
12
|
-
changelog = "CHANGELOG.md"
|
|
13
12
|
requires-python = ">=3.10.0"
|
|
14
13
|
dependencies = [
|
|
15
14
|
"keyboard>=0.13.5",
|
|
@@ -63,15 +62,17 @@ keywords = [
|
|
|
63
62
|
]
|
|
64
63
|
|
|
65
64
|
[project.urls]
|
|
66
|
-
"Homepage" = "https://github.com/XulbuX-dev/PythonLibraryXulbuX"
|
|
67
65
|
"Bug Reports" = "https://github.com/XulbuX-dev/PythonLibraryXulbuX/issues"
|
|
66
|
+
"Changelog" = "https://github.com/XulbuX-dev/PythonLibraryXulbuX/blob/main/CHANGELOG.md"
|
|
68
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"
|
|
69
70
|
"Source Code" = "https://github.com/XulbuX-dev/PythonLibraryXulbuX/tree/main/src"
|
|
70
|
-
|
|
71
|
+
|
|
71
72
|
|
|
72
73
|
[project.scripts]
|
|
73
|
-
xx-help = "
|
|
74
|
-
xulbux-help = "
|
|
74
|
+
xx-help = "xulbux._cli_:help_command"
|
|
75
|
+
xulbux-help = "xulbux._cli_:help_command"
|
|
75
76
|
|
|
76
77
|
[tool.black]
|
|
77
78
|
line-length = 127
|
|
@@ -107,11 +108,19 @@ max-complexity = 18
|
|
|
107
108
|
select = ["B", "C", "E", "F", "W", "T4", "B9"]
|
|
108
109
|
per-file-ignores = ["__init__.py:F401,F403"]
|
|
109
110
|
|
|
110
|
-
[tool.
|
|
111
|
-
packages = ["
|
|
111
|
+
[tool.setuptools]
|
|
112
|
+
packages = ["xulbux"]
|
|
113
|
+
package-dir = { "" = "src" }
|
|
112
114
|
|
|
113
115
|
[tool.pytest.ini_options]
|
|
114
116
|
minversion = "7.0"
|
|
115
117
|
addopts = "-ra -q"
|
|
116
118
|
pythonpath = ["src"]
|
|
117
|
-
testpaths = [
|
|
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.5.9/setup.cfg
ADDED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"""
|
|
2
|
-
>>> import
|
|
2
|
+
>>> import xulbux as xx
|
|
3
3
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
4
4
|
• CUSTOM TYPES:
|
|
5
5
|
• rgba(int,int,int,float)
|
|
@@ -9,30 +9,30 @@
|
|
|
9
9
|
• FILE OPERATIONS xx.File
|
|
10
10
|
• JSON FILE OPERATIONS xx.Json
|
|
11
11
|
• SYSTEM ACTIONS xx.System
|
|
12
|
-
• MANAGE
|
|
13
|
-
•
|
|
14
|
-
• PRETTY PRINTING
|
|
15
|
-
•
|
|
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
16
|
• DATA OPERATIONS xx.Data
|
|
17
|
-
•
|
|
17
|
+
• STRING OPERATIONS xx.String
|
|
18
18
|
• CODE STRING OPERATIONS xx.Code
|
|
19
19
|
• REGEX PATTERN TEMPLATES xx.Regex
|
|
20
20
|
"""
|
|
21
21
|
|
|
22
|
-
__version__ = "1.5.
|
|
22
|
+
__version__ = "1.5.9"
|
|
23
23
|
__author__ = "XulbuX"
|
|
24
24
|
__email__ = "xulbux.real@gmail.com"
|
|
25
25
|
__license__ = "MIT"
|
|
26
26
|
__copyright__ = "Copyright (c) 2024 XulbuX"
|
|
27
|
-
__url__ = "https://github.com/XulbuX-dev/
|
|
27
|
+
__url__ = "https://github.com/XulbuX-dev/PythonLibraryXulbuX"
|
|
28
28
|
__description__ = "A library which includes a lot of really helpful functions."
|
|
29
29
|
__all__ = [
|
|
30
30
|
"_consts_",
|
|
31
|
-
"
|
|
31
|
+
"xx_console",
|
|
32
32
|
"xx_code",
|
|
33
33
|
"xx_color",
|
|
34
34
|
"xx_data",
|
|
35
|
-
"
|
|
35
|
+
"xx_env_path",
|
|
36
36
|
"xx_file",
|
|
37
37
|
"xx_format_codes",
|
|
38
38
|
"xx_json",
|
|
@@ -43,11 +43,11 @@ __all__ = [
|
|
|
43
43
|
]
|
|
44
44
|
|
|
45
45
|
from ._consts_ import *
|
|
46
|
-
from .xx_cmd import *
|
|
47
46
|
from .xx_code import *
|
|
48
47
|
from .xx_color import *
|
|
48
|
+
from .xx_console import *
|
|
49
49
|
from .xx_data import *
|
|
50
|
-
from .
|
|
50
|
+
from .xx_env_path import *
|
|
51
51
|
from .xx_file import *
|
|
52
52
|
from .xx_format_codes import *
|
|
53
53
|
from .xx_json import *
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from . import __version__
|
|
2
2
|
from ._consts_ import DEFAULT
|
|
3
|
-
from .xx_format_codes import
|
|
4
|
-
from .
|
|
3
|
+
from .xx_format_codes import FormatCodes
|
|
4
|
+
from .xx_console import Console
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
def help_command():
|
|
@@ -24,29 +24,30 @@ def help_command():
|
|
|
24
24
|
|
|
25
25
|
[b|#75A2FF]Usage:[*]
|
|
26
26
|
[{color['punctuators']}]# GENERAL LIBRARY[*]
|
|
27
|
-
[{color['import']}]import [{color['lib']}]
|
|
27
|
+
[{color['import']}]import [{color['lib']}]xulbux [{color['import']}]as [{color['lib']}]xx[*]
|
|
28
28
|
[{color['punctuators']}]# CUSTOM TYPES[*]
|
|
29
|
-
[{color['import']}]from [{color['lib']}]
|
|
29
|
+
[{color['import']}]from [{color['lib']}]xulbux [{color['import']}]import [{color['lib']}]rgba[{color['punctuators']}], [{color['lib']}]hsla[{color['punctuators']}], [{color['lib']}]hexa[*]
|
|
30
30
|
|
|
31
31
|
[b|#75A2FF]Includes:[*]
|
|
32
32
|
[dim](•) CUSTOM TYPES:
|
|
33
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
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']}])[*]
|
|
35
|
+
[dim](•) [{color['class']}]hexa[{color['punctuators']}]/([i|{color['types']}]str[_|{color['punctuators']}]|[i|{color['types']}]int[_|{color['punctuators']}])[*]
|
|
36
36
|
[dim](•) PATH OPERATIONS [{color['lib']}]xx[{color['punctuators']}].[{color['class']}]Path[*]
|
|
37
37
|
[dim](•) FILE OPERATIONS [{color['lib']}]xx[{color['punctuators']}].[{color['class']}]File[*]
|
|
38
38
|
[dim](•) JSON FILE OPERATIONS [{color['lib']}]xx[{color['punctuators']}].[{color['class']}]Json[*]
|
|
39
39
|
[dim](•) SYSTEM ACTIONS [{color['lib']}]xx[{color['punctuators']}].[{color['class']}]System[*]
|
|
40
|
-
[dim](•) MANAGE
|
|
41
|
-
[dim](•)
|
|
42
|
-
[dim](•) PRETTY PRINTING
|
|
43
|
-
[dim](•)
|
|
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
44
|
[dim](•) DATA OPERATIONS [{color['lib']}]xx[{color['punctuators']}].[{color['class']}]Data[*]
|
|
45
|
-
[dim](•)
|
|
45
|
+
[dim](•) STRING OPERATIONS [{color['lib']}]xx[{color['punctuators']}].[{color['class']}]String[*]
|
|
46
46
|
[dim](•) CODE STRING OPERATIONS [{color['lib']}]xx[{color['punctuators']}].[{color['class']}]Code[*]
|
|
47
47
|
[dim](•) REGEX PATTERN TEMPLATES [{color['lib']}]xx[{color['punctuators']}].[{color['class']}]Regex[*]
|
|
48
48
|
[_]
|
|
49
49
|
[dim](Press any key to exit...)
|
|
50
|
-
"""
|
|
50
|
+
""",
|
|
51
|
+
default_color=DEFAULT.text_color,
|
|
51
52
|
)
|
|
52
|
-
|
|
53
|
+
Console.pause_exit(pause=True)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
from .xx_string import
|
|
2
|
-
from .xx_regex import
|
|
3
|
-
from .xx_data import
|
|
1
|
+
from .xx_string import String
|
|
2
|
+
from .xx_regex import Regex
|
|
3
|
+
from .xx_data import Data
|
|
4
4
|
|
|
5
5
|
import regex as _rx
|
|
6
6
|
|
|
@@ -16,7 +16,7 @@ class Code:
|
|
|
16
16
|
@staticmethod
|
|
17
17
|
def get_tab_spaces(code: str) -> int:
|
|
18
18
|
"""Will try to get the amount of spaces used for indentation."""
|
|
19
|
-
code_lines = String.
|
|
19
|
+
code_lines = String.get_lines(code, remove_empty_lines=True)
|
|
20
20
|
indents = [len(line) - len(line.lstrip()) for line in code_lines]
|
|
21
21
|
non_zero_indents = [i for i in indents if i > 0]
|
|
22
22
|
return min(non_zero_indents) if non_zero_indents else 0
|
|
@@ -26,8 +26,8 @@ class Code:
|
|
|
26
26
|
"""Replaces all tabs with `new_tab_size` spaces.<br>
|
|
27
27
|
If `remove_empty_lines` is `True`, empty lines will be removed in the process.
|
|
28
28
|
"""
|
|
29
|
-
code_lines = String.
|
|
30
|
-
lines = code_lines if remove_empty_lines else String.
|
|
29
|
+
code_lines = String.get_lines(code, remove_empty_lines=True)
|
|
30
|
+
lines = code_lines if remove_empty_lines else String.get_lines(code)
|
|
31
31
|
tab_spaces = Code.get_tab_spaces(code)
|
|
32
32
|
if (tab_spaces == new_tab_size) or tab_spaces == 0:
|
|
33
33
|
if remove_empty_lines:
|