absfuyu 5.0.1__py3-none-any.whl → 5.1.0__py3-none-any.whl
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 absfuyu might be problematic. Click here for more details.
- absfuyu/__init__.py +1 -1
- absfuyu/__main__.py +2 -2
- absfuyu/cli/__init__.py +2 -2
- absfuyu/cli/color.py +30 -14
- absfuyu/cli/config_group.py +9 -2
- absfuyu/cli/do_group.py +13 -6
- absfuyu/cli/game_group.py +9 -2
- absfuyu/cli/tool_group.py +16 -9
- absfuyu/config/__init__.py +2 -2
- absfuyu/core/__init__.py +2 -2
- absfuyu/core/baseclass.py +448 -79
- absfuyu/core/baseclass2.py +2 -2
- absfuyu/core/decorator.py +69 -3
- absfuyu/core/docstring.py +2 -2
- absfuyu/core/dummy_cli.py +2 -2
- absfuyu/core/dummy_func.py +13 -2
- absfuyu/core/typings.py +40 -0
- absfuyu/dxt/__init__.py +2 -2
- absfuyu/dxt/dictext.py +2 -2
- absfuyu/dxt/dxt_support.py +2 -2
- absfuyu/dxt/intext.py +31 -3
- absfuyu/dxt/listext.py +28 -3
- absfuyu/dxt/strext.py +2 -2
- absfuyu/extra/__init__.py +2 -2
- absfuyu/extra/beautiful.py +2 -2
- absfuyu/extra/da/__init__.py +36 -0
- absfuyu/extra/da/dadf.py +1138 -0
- absfuyu/extra/da/dadf_base.py +186 -0
- absfuyu/extra/da/df_func.py +97 -0
- absfuyu/extra/da/mplt.py +219 -0
- absfuyu/extra/data_analysis.py +10 -1067
- absfuyu/fun/__init__.py +2 -2
- absfuyu/fun/tarot.py +2 -2
- absfuyu/game/__init__.py +2 -2
- absfuyu/game/game_stat.py +2 -2
- absfuyu/game/sudoku.py +2 -2
- absfuyu/game/tictactoe.py +2 -2
- absfuyu/game/wordle.py +2 -2
- absfuyu/general/__init__.py +2 -2
- absfuyu/general/content.py +2 -2
- absfuyu/general/human.py +2 -2
- absfuyu/general/shape.py +2 -2
- absfuyu/logger.py +2 -2
- absfuyu/pkg_data/__init__.py +2 -2
- absfuyu/pkg_data/deprecated.py +2 -2
- absfuyu/sort.py +2 -2
- absfuyu/tools/__init__.py +25 -2
- absfuyu/tools/checksum.py +27 -7
- absfuyu/tools/converter.py +93 -28
- absfuyu/tools/generator.py +2 -2
- absfuyu/tools/inspector.py +433 -0
- absfuyu/tools/keygen.py +2 -2
- absfuyu/tools/obfuscator.py +45 -7
- absfuyu/tools/passwordlib.py +87 -22
- absfuyu/tools/shutdownizer.py +2 -2
- absfuyu/tools/web.py +2 -2
- absfuyu/util/__init__.py +2 -2
- absfuyu/util/api.py +2 -2
- absfuyu/util/json_method.py +2 -2
- absfuyu/util/lunar.py +2 -2
- absfuyu/util/path.py +190 -82
- absfuyu/util/performance.py +4 -4
- absfuyu/util/shorten_number.py +40 -10
- absfuyu/util/text_table.py +272 -0
- absfuyu/util/zipped.py +6 -6
- absfuyu/version.py +2 -2
- {absfuyu-5.0.1.dist-info → absfuyu-5.1.0.dist-info}/METADATA +9 -2
- absfuyu-5.1.0.dist-info/RECORD +76 -0
- absfuyu-5.0.1.dist-info/RECORD +0 -68
- {absfuyu-5.0.1.dist-info → absfuyu-5.1.0.dist-info}/WHEEL +0 -0
- {absfuyu-5.0.1.dist-info → absfuyu-5.1.0.dist-info}/entry_points.txt +0 -0
- {absfuyu-5.0.1.dist-info → absfuyu-5.1.0.dist-info}/licenses/LICENSE +0 -0
absfuyu/__init__.py
CHANGED
absfuyu/__main__.py
CHANGED
absfuyu/cli/__init__.py
CHANGED
absfuyu/cli/color.py
CHANGED
|
@@ -3,8 +3,8 @@ ABSFUYU CLI
|
|
|
3
3
|
-----------
|
|
4
4
|
Color
|
|
5
5
|
|
|
6
|
-
Version: 5.
|
|
7
|
-
Date updated:
|
|
6
|
+
Version: 5.1.0
|
|
7
|
+
Date updated: 10/03/2025 (dd/mm/yyyy)
|
|
8
8
|
"""
|
|
9
9
|
|
|
10
10
|
# Module Package
|
|
@@ -14,18 +14,34 @@ __all__ = ["COLOR"]
|
|
|
14
14
|
|
|
15
15
|
# Library
|
|
16
16
|
# ---------------------------------------------------------------------------
|
|
17
|
-
|
|
17
|
+
try:
|
|
18
|
+
import colorama
|
|
19
|
+
except ModuleNotFoundError: # Check for `colorama`
|
|
20
|
+
colorama = None
|
|
18
21
|
|
|
19
22
|
# Color
|
|
20
23
|
# ---------------------------------------------------------------------------
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
24
|
+
if colorama is None:
|
|
25
|
+
COLOR = {
|
|
26
|
+
"green": "",
|
|
27
|
+
"GREEN": "",
|
|
28
|
+
"blue": "",
|
|
29
|
+
"BLUE": "",
|
|
30
|
+
"red": "",
|
|
31
|
+
"RED": "",
|
|
32
|
+
"yellow": "",
|
|
33
|
+
"YELLOW": "",
|
|
34
|
+
"reset": "",
|
|
35
|
+
}
|
|
36
|
+
else:
|
|
37
|
+
COLOR = {
|
|
38
|
+
"green": colorama.Fore.LIGHTGREEN_EX,
|
|
39
|
+
"GREEN": colorama.Fore.GREEN,
|
|
40
|
+
"blue": colorama.Fore.LIGHTCYAN_EX,
|
|
41
|
+
"BLUE": colorama.Fore.CYAN,
|
|
42
|
+
"red": colorama.Fore.LIGHTRED_EX,
|
|
43
|
+
"RED": colorama.Fore.RED,
|
|
44
|
+
"yellow": colorama.Fore.LIGHTYELLOW_EX,
|
|
45
|
+
"YELLOW": colorama.Fore.YELLOW,
|
|
46
|
+
"reset": colorama.Fore.RESET,
|
|
47
|
+
}
|
absfuyu/cli/config_group.py
CHANGED
|
@@ -3,18 +3,25 @@ ABSFUYU CLI
|
|
|
3
3
|
-----------
|
|
4
4
|
Config
|
|
5
5
|
|
|
6
|
-
Version: 5.
|
|
7
|
-
Date updated:
|
|
6
|
+
Version: 5.1.0
|
|
7
|
+
Date updated: 10/03/2025 (dd/mm/yyyy)
|
|
8
8
|
"""
|
|
9
9
|
|
|
10
|
+
# Module Package
|
|
11
|
+
# ---------------------------------------------------------------------------
|
|
10
12
|
__all__ = ["config_group"]
|
|
11
13
|
|
|
14
|
+
|
|
15
|
+
# Library
|
|
16
|
+
# ---------------------------------------------------------------------------
|
|
12
17
|
import click
|
|
13
18
|
|
|
14
19
|
from absfuyu.cli.color import COLOR
|
|
15
20
|
from absfuyu.config import ABSFUYU_CONFIG
|
|
16
21
|
|
|
17
22
|
|
|
23
|
+
# CLI
|
|
24
|
+
# ---------------------------------------------------------------------------
|
|
18
25
|
@click.command()
|
|
19
26
|
@click.option(
|
|
20
27
|
"--setting",
|
absfuyu/cli/do_group.py
CHANGED
|
@@ -3,12 +3,17 @@ ABSFUYU CLI
|
|
|
3
3
|
-----------
|
|
4
4
|
Do
|
|
5
5
|
|
|
6
|
-
Version: 5.
|
|
7
|
-
Date updated:
|
|
6
|
+
Version: 5.1.0
|
|
7
|
+
Date updated: 10/03/2025 (dd/mm/yyyy)
|
|
8
8
|
"""
|
|
9
9
|
|
|
10
|
+
# Module Package
|
|
11
|
+
# ---------------------------------------------------------------------------
|
|
10
12
|
__all__ = ["do_group"]
|
|
11
13
|
|
|
14
|
+
|
|
15
|
+
# Library
|
|
16
|
+
# ---------------------------------------------------------------------------
|
|
12
17
|
import subprocess
|
|
13
18
|
|
|
14
19
|
import click
|
|
@@ -17,10 +22,12 @@ from absfuyu import __title__
|
|
|
17
22
|
from absfuyu.cli.color import COLOR
|
|
18
23
|
from absfuyu.core import __package_feature__
|
|
19
24
|
from absfuyu.tools.shutdownizer import ShutDownizer
|
|
20
|
-
from absfuyu.util.
|
|
25
|
+
from absfuyu.util.path import Directory
|
|
21
26
|
from absfuyu.version import PkgVersion
|
|
22
27
|
|
|
23
28
|
|
|
29
|
+
# CLI
|
|
30
|
+
# ---------------------------------------------------------------------------
|
|
24
31
|
@click.command()
|
|
25
32
|
@click.option(
|
|
26
33
|
"--force_update/--no-force-update",
|
|
@@ -64,9 +71,9 @@ def install(pkg: str) -> None:
|
|
|
64
71
|
def unzip_files_in_dir(dir: str) -> None:
|
|
65
72
|
"""Unzip every files in directory"""
|
|
66
73
|
|
|
67
|
-
engine =
|
|
68
|
-
engine.
|
|
69
|
-
|
|
74
|
+
engine = Directory(dir)
|
|
75
|
+
engine.decompress()
|
|
76
|
+
click.echo(f"{COLOR['green']}Done!")
|
|
70
77
|
|
|
71
78
|
|
|
72
79
|
@click.command(name="shutdown")
|
absfuyu/cli/game_group.py
CHANGED
|
@@ -3,12 +3,17 @@ ABSFUYU CLI
|
|
|
3
3
|
-----------
|
|
4
4
|
Game
|
|
5
5
|
|
|
6
|
-
Version: 5.
|
|
7
|
-
Date updated:
|
|
6
|
+
Version: 5.1.0
|
|
7
|
+
Date updated: 10/03/2025 (dd/mm/yyyy)
|
|
8
8
|
"""
|
|
9
9
|
|
|
10
|
+
# Module Package
|
|
11
|
+
# ---------------------------------------------------------------------------
|
|
10
12
|
__all__ = ["game_group"]
|
|
11
13
|
|
|
14
|
+
|
|
15
|
+
# Library
|
|
16
|
+
# ---------------------------------------------------------------------------
|
|
12
17
|
import click
|
|
13
18
|
|
|
14
19
|
from absfuyu.game import game_escapeLoop, game_RockPaperScissors
|
|
@@ -17,6 +22,8 @@ from absfuyu.game.tictactoe import GameMode, TicTacToe
|
|
|
17
22
|
from absfuyu.game.wordle import Wordle
|
|
18
23
|
|
|
19
24
|
|
|
25
|
+
# CLI
|
|
26
|
+
# ---------------------------------------------------------------------------
|
|
20
27
|
@click.command
|
|
21
28
|
@click.option(
|
|
22
29
|
"--hard",
|
absfuyu/cli/tool_group.py
CHANGED
|
@@ -3,12 +3,18 @@ ABSFUYU CLI
|
|
|
3
3
|
-----------
|
|
4
4
|
Tool
|
|
5
5
|
|
|
6
|
-
Version: 5.
|
|
7
|
-
Date updated:
|
|
6
|
+
Version: 5.1.0
|
|
7
|
+
Date updated: 10/03/2025 (dd/mm/yyyy)
|
|
8
8
|
"""
|
|
9
9
|
|
|
10
|
+
|
|
11
|
+
# Module Package
|
|
12
|
+
# ---------------------------------------------------------------------------
|
|
10
13
|
__all__ = ["tool_group"]
|
|
11
14
|
|
|
15
|
+
|
|
16
|
+
# Library
|
|
17
|
+
# ---------------------------------------------------------------------------
|
|
12
18
|
from typing import Literal
|
|
13
19
|
|
|
14
20
|
import click
|
|
@@ -17,6 +23,8 @@ from absfuyu.tools.checksum import Checksum
|
|
|
17
23
|
from absfuyu.tools.converter import Base64EncodeDecode, Text2Chemistry
|
|
18
24
|
|
|
19
25
|
|
|
26
|
+
# CLI
|
|
27
|
+
# ---------------------------------------------------------------------------
|
|
20
28
|
@click.command(name="checksum")
|
|
21
29
|
@click.argument("file_path", type=str)
|
|
22
30
|
@click.option(
|
|
@@ -65,13 +73,12 @@ def file_checksum(
|
|
|
65
73
|
hash_to_compare: str | None,
|
|
66
74
|
) -> None:
|
|
67
75
|
"""Checksum for file/directory"""
|
|
68
|
-
# print(hash_mode, save_result, recursive_mode)
|
|
69
76
|
instance = Checksum(file_path, hash_mode=hash_mode, save_result_to_file=save_result)
|
|
70
77
|
res = instance.checksum(recursive=recursive_mode)
|
|
71
78
|
if hash_to_compare is None:
|
|
72
|
-
|
|
79
|
+
click.echo(res)
|
|
73
80
|
else:
|
|
74
|
-
|
|
81
|
+
click.echo(res == hash_to_compare)
|
|
75
82
|
|
|
76
83
|
|
|
77
84
|
@click.command(name="t2c")
|
|
@@ -80,21 +87,21 @@ def text2chem(text: str) -> None:
|
|
|
80
87
|
"""Convert text into chemistry symbol"""
|
|
81
88
|
engine = Text2Chemistry()
|
|
82
89
|
out = engine.convert(text)
|
|
83
|
-
|
|
90
|
+
click.echo(Text2Chemistry.beautify_result(out))
|
|
84
91
|
|
|
85
92
|
|
|
86
93
|
@click.command(name="e")
|
|
87
94
|
@click.argument("text", type=str)
|
|
88
95
|
def base64encode(text: str) -> None:
|
|
89
96
|
"""Convert text to base64"""
|
|
90
|
-
|
|
97
|
+
click.echo(Base64EncodeDecode.encode(text))
|
|
91
98
|
|
|
92
99
|
|
|
93
100
|
@click.command(name="d")
|
|
94
101
|
@click.argument("text", type=str)
|
|
95
102
|
def base64decode(text: str) -> None:
|
|
96
103
|
"""Convert base64 to text"""
|
|
97
|
-
|
|
104
|
+
click.echo(Base64EncodeDecode.decode(text))
|
|
98
105
|
|
|
99
106
|
|
|
100
107
|
@click.command(name="img")
|
|
@@ -111,7 +118,7 @@ def base64decode(text: str) -> None:
|
|
|
111
118
|
@click.argument("img_path", type=str)
|
|
112
119
|
def base64convert_img(img_path: str, data_tag: bool) -> None:
|
|
113
120
|
"""Convert img to base64"""
|
|
114
|
-
|
|
121
|
+
click.echo(Base64EncodeDecode.encode_image(img_path, data_tag=data_tag))
|
|
115
122
|
|
|
116
123
|
|
|
117
124
|
@click.group(name="b64")
|
absfuyu/config/__init__.py
CHANGED