absfuyu 5.0.1__py3-none-any.whl → 5.2.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 +3 -3
- 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 +15 -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 +70 -4
- absfuyu/core/docstring.py +43 -25
- absfuyu/core/dummy_cli.py +2 -2
- absfuyu/core/dummy_func.py +15 -4
- absfuyu/dxt/__init__.py +2 -2
- absfuyu/dxt/dictext.py +5 -2
- absfuyu/dxt/dxt_support.py +2 -2
- absfuyu/dxt/intext.py +34 -3
- absfuyu/dxt/listext.py +300 -113
- absfuyu/dxt/strext.py +75 -15
- absfuyu/extra/__init__.py +2 -2
- absfuyu/extra/beautiful.py +2 -2
- absfuyu/extra/da/__init__.py +36 -0
- absfuyu/extra/da/dadf.py +1177 -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 -3
- 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 +28 -2
- absfuyu/tools/checksum.py +27 -7
- absfuyu/tools/converter.py +120 -34
- absfuyu/tools/generator.py +251 -110
- absfuyu/tools/inspector.py +463 -0
- absfuyu/tools/keygen.py +2 -2
- absfuyu/tools/obfuscator.py +45 -7
- absfuyu/tools/passwordlib.py +88 -24
- absfuyu/tools/shutdownizer.py +2 -2
- absfuyu/tools/web.py +2 -2
- absfuyu/typings.py +136 -0
- absfuyu/util/__init__.py +18 -4
- absfuyu/util/api.py +36 -16
- absfuyu/util/json_method.py +43 -14
- absfuyu/util/lunar.py +2 -2
- absfuyu/util/path.py +190 -82
- absfuyu/util/performance.py +122 -7
- absfuyu/util/shorten_number.py +40 -10
- absfuyu/util/text_table.py +306 -0
- absfuyu/util/zipped.py +8 -7
- absfuyu/version.py +2 -2
- {absfuyu-5.0.1.dist-info → absfuyu-5.2.0.dist-info}/METADATA +9 -2
- absfuyu-5.2.0.dist-info/RECORD +76 -0
- absfuyu-5.0.1.dist-info/RECORD +0 -68
- {absfuyu-5.0.1.dist-info → absfuyu-5.2.0.dist-info}/WHEEL +0 -0
- {absfuyu-5.0.1.dist-info → absfuyu-5.2.0.dist-info}/entry_points.txt +0 -0
- {absfuyu-5.0.1.dist-info → absfuyu-5.2.0.dist-info}/licenses/LICENSE +0 -0
absfuyu/__init__.py
CHANGED
absfuyu/__main__.py
CHANGED
|
@@ -3,15 +3,15 @@ ABSFUYU
|
|
|
3
3
|
-------
|
|
4
4
|
COMMAND LINE INTERFACE
|
|
5
5
|
|
|
6
|
-
Version: 5.
|
|
7
|
-
Date updated:
|
|
6
|
+
Version: 5.2.0
|
|
7
|
+
Date updated: 13/03/2025 (dd/mm/yyyy)
|
|
8
8
|
"""
|
|
9
9
|
|
|
10
10
|
# Library
|
|
11
11
|
# ---------------------------------------------------------------------------
|
|
12
12
|
try:
|
|
13
13
|
from absfuyu.cli import cli
|
|
14
|
-
except
|
|
14
|
+
except ImportError: # Check for `click`, `colorama`
|
|
15
15
|
from absfuyu.core.dummy_cli import cli
|
|
16
16
|
|
|
17
17
|
|
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.2.0
|
|
7
|
+
Date updated: 13/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 ImportError: # 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.2.0
|
|
7
|
+
Date updated: 12/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.2.0
|
|
7
|
+
Date updated: 12/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.2.0
|
|
7
|
+
Date updated: 12/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,17 @@ ABSFUYU CLI
|
|
|
3
3
|
-----------
|
|
4
4
|
Tool
|
|
5
5
|
|
|
6
|
-
Version: 5.
|
|
7
|
-
Date updated:
|
|
6
|
+
Version: 5.2.0
|
|
7
|
+
Date updated: 12/03/2025 (dd/mm/yyyy)
|
|
8
8
|
"""
|
|
9
9
|
|
|
10
|
+
# Module Package
|
|
11
|
+
# ---------------------------------------------------------------------------
|
|
10
12
|
__all__ = ["tool_group"]
|
|
11
13
|
|
|
14
|
+
|
|
15
|
+
# Library
|
|
16
|
+
# ---------------------------------------------------------------------------
|
|
12
17
|
from typing import Literal
|
|
13
18
|
|
|
14
19
|
import click
|
|
@@ -17,6 +22,8 @@ from absfuyu.tools.checksum import Checksum
|
|
|
17
22
|
from absfuyu.tools.converter import Base64EncodeDecode, Text2Chemistry
|
|
18
23
|
|
|
19
24
|
|
|
25
|
+
# CLI
|
|
26
|
+
# ---------------------------------------------------------------------------
|
|
20
27
|
@click.command(name="checksum")
|
|
21
28
|
@click.argument("file_path", type=str)
|
|
22
29
|
@click.option(
|
|
@@ -65,13 +72,12 @@ def file_checksum(
|
|
|
65
72
|
hash_to_compare: str | None,
|
|
66
73
|
) -> None:
|
|
67
74
|
"""Checksum for file/directory"""
|
|
68
|
-
# print(hash_mode, save_result, recursive_mode)
|
|
69
75
|
instance = Checksum(file_path, hash_mode=hash_mode, save_result_to_file=save_result)
|
|
70
76
|
res = instance.checksum(recursive=recursive_mode)
|
|
71
77
|
if hash_to_compare is None:
|
|
72
|
-
|
|
78
|
+
click.echo(res)
|
|
73
79
|
else:
|
|
74
|
-
|
|
80
|
+
click.echo(res == hash_to_compare)
|
|
75
81
|
|
|
76
82
|
|
|
77
83
|
@click.command(name="t2c")
|
|
@@ -80,21 +86,21 @@ def text2chem(text: str) -> None:
|
|
|
80
86
|
"""Convert text into chemistry symbol"""
|
|
81
87
|
engine = Text2Chemistry()
|
|
82
88
|
out = engine.convert(text)
|
|
83
|
-
|
|
89
|
+
click.echo(Text2Chemistry.beautify_result(out))
|
|
84
90
|
|
|
85
91
|
|
|
86
92
|
@click.command(name="e")
|
|
87
93
|
@click.argument("text", type=str)
|
|
88
94
|
def base64encode(text: str) -> None:
|
|
89
95
|
"""Convert text to base64"""
|
|
90
|
-
|
|
96
|
+
click.echo(Base64EncodeDecode.encode(text))
|
|
91
97
|
|
|
92
98
|
|
|
93
99
|
@click.command(name="d")
|
|
94
100
|
@click.argument("text", type=str)
|
|
95
101
|
def base64decode(text: str) -> None:
|
|
96
102
|
"""Convert base64 to text"""
|
|
97
|
-
|
|
103
|
+
click.echo(Base64EncodeDecode.decode(text))
|
|
98
104
|
|
|
99
105
|
|
|
100
106
|
@click.command(name="img")
|
|
@@ -111,7 +117,7 @@ def base64decode(text: str) -> None:
|
|
|
111
117
|
@click.argument("img_path", type=str)
|
|
112
118
|
def base64convert_img(img_path: str, data_tag: bool) -> None:
|
|
113
119
|
"""Convert img to base64"""
|
|
114
|
-
|
|
120
|
+
click.echo(Base64EncodeDecode.encode_image(img_path, data_tag=data_tag))
|
|
115
121
|
|
|
116
122
|
|
|
117
123
|
@click.group(name="b64")
|
absfuyu/config/__init__.py
CHANGED