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.

Files changed (35) hide show
  1. {xulbux-1.6.1/src/xulbux.egg-info → xulbux-1.6.3}/PKG-INFO +15 -15
  2. {xulbux-1.6.1 → xulbux-1.6.3}/README.md +13 -13
  3. {xulbux-1.6.1 → xulbux-1.6.3}/pyproject.toml +3 -2
  4. {xulbux-1.6.1 → xulbux-1.6.3}/src/xulbux/__init__.py +1 -1
  5. {xulbux-1.6.1 → xulbux-1.6.3}/src/xulbux/_consts_.py +18 -18
  6. {xulbux-1.6.1 → xulbux-1.6.3}/src/xulbux/xx_color.py +102 -92
  7. {xulbux-1.6.1 → xulbux-1.6.3}/src/xulbux/xx_console.py +0 -12
  8. {xulbux-1.6.1 → xulbux-1.6.3}/src/xulbux/xx_env_path.py +1 -1
  9. xulbux-1.6.3/src/xulbux/xx_format_codes.py +429 -0
  10. {xulbux-1.6.1 → xulbux-1.6.3}/src/xulbux/xx_regex.py +41 -30
  11. {xulbux-1.6.1 → xulbux-1.6.3}/src/xulbux/xx_system.py +53 -1
  12. {xulbux-1.6.1 → xulbux-1.6.3/src/xulbux.egg-info}/PKG-INFO +15 -15
  13. {xulbux-1.6.1 → xulbux-1.6.3}/src/xulbux.egg-info/SOURCES.txt +1 -1
  14. xulbux-1.6.3/tests/test_color.py +18 -0
  15. {xulbux-1.6.1 → xulbux-1.6.3}/tests/test_color_types.py +5 -2
  16. xulbux-1.6.1/tests/test_cmd_info.py → xulbux-1.6.3/tests/test_console_info.py +2 -4
  17. xulbux-1.6.3/tests/test_env_vars.py +25 -0
  18. xulbux-1.6.1/src/xulbux/xx_format_codes.py +0 -305
  19. xulbux-1.6.1/tests/test_color.py +0 -18
  20. xulbux-1.6.1/tests/test_env_vars.py +0 -25
  21. {xulbux-1.6.1 → xulbux-1.6.3}/LICENSE +0 -0
  22. {xulbux-1.6.1 → xulbux-1.6.3}/setup.cfg +0 -0
  23. {xulbux-1.6.1 → xulbux-1.6.3}/src/xulbux/_cli_.py +0 -0
  24. {xulbux-1.6.1 → xulbux-1.6.3}/src/xulbux/xx_code.py +0 -0
  25. {xulbux-1.6.1 → xulbux-1.6.3}/src/xulbux/xx_data.py +0 -0
  26. {xulbux-1.6.1 → xulbux-1.6.3}/src/xulbux/xx_file.py +0 -0
  27. {xulbux-1.6.1 → xulbux-1.6.3}/src/xulbux/xx_json.py +0 -0
  28. {xulbux-1.6.1 → xulbux-1.6.3}/src/xulbux/xx_path.py +0 -0
  29. {xulbux-1.6.1 → xulbux-1.6.3}/src/xulbux/xx_string.py +0 -0
  30. {xulbux-1.6.1 → xulbux-1.6.3}/src/xulbux.egg-info/dependency_links.txt +0 -0
  31. {xulbux-1.6.1 → xulbux-1.6.3}/src/xulbux.egg-info/entry_points.txt +0 -0
  32. {xulbux-1.6.1 → xulbux-1.6.3}/src/xulbux.egg-info/requires.txt +0 -0
  33. {xulbux-1.6.1 → xulbux-1.6.3}/src/xulbux.egg-info/top_level.txt +0 -0
  34. {xulbux-1.6.1 → xulbux-1.6.3}/tests/test_data.py +0 -0
  35. {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.1
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> | 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, ...*) |
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> | 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, ...*) |
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.1"
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/test_cmd_info.py",
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",
@@ -19,7 +19,7 @@
19
19
  • REGEX PATTERN TEMPLATES xx.Regex
20
20
  """
21
21
 
22
- __version__ = "1.6.1"
22
+ __version__ = "1.6.3"
23
23
  __author__ = "XulbuX"
24
24
  __email__ = "xulbux.real@gmail.com"
25
25
  __license__ = "MIT"
@@ -58,12 +58,12 @@ class ANSI:
58
58
 
59
59
  global CHAR, START, SEP, END
60
60
 
61
- char_esc = r"\x1b"
61
+ escaped_char = "\\x1b"
62
62
  CHAR = char = "\x1b"
63
63
  START = start = "["
64
64
  SEP = sep = ";"
65
65
  END = end = "m"
66
- modifier = {"lighten": "+l", "darken": "-d"}
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
- ("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,
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
- ("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,
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
  }