zxtoolbox 1.1.0__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.
@@ -0,0 +1,124 @@
1
+ Metadata-Version: 2.3
2
+ Name: zxtoolbox
3
+ Version: 1.1.0
4
+ Summary: some used tool collections
5
+ Requires-Dist: paramiko>=3.5.1
6
+ Requires-Dist: prettytable>=3.16.0
7
+ Requires-Dist: psutil>=7.0.0
8
+ Requires-Dist: py-cpuinfo>=9.0.0
9
+ Requires-Dist: pynvml>=12.0.0
10
+ Requires-Dist: pyotp>=2.9.0
11
+ Requires-Dist: yt-dlp>=2025.1.0
12
+ Requires-Dist: pyyaml>=6.0.0
13
+ Requires-Dist: acme>=3.0.0
14
+ Requires-Dist: cryptography>=42.0.0
15
+ Requires-Dist: requests>=2.31.0
16
+ Requires-Dist: mkdocs>=1.6.0 ; extra == 'docs'
17
+ Requires-Dist: mkdocs-smzhbook-theme>=1.3 ; extra == 'docs'
18
+ Requires-Python: >=3.13
19
+ Provides-Extra: docs
20
+ Description-Content-Type: text/markdown
21
+
22
+ # zxtoolbox
23
+
24
+ A collection of tools for frequently performed repetitive tasks on Windows, Mac, and Linux systems
25
+
26
+ ## 0x01. Project Setup
27
+
28
+ ```shell
29
+ uv sync
30
+ ```
31
+
32
+ ## 0x02. Directory Structure
33
+ ```text
34
+ toolbox/
35
+ ├── doc/ # Documentation directory
36
+ │ ├── index.md # Project documentation
37
+ │ ├── computer_info.md # Computer information retrieval documentation
38
+ │ ├── config_manager.md # Configuration file management documentation
39
+ │ ├── git_config.md # Git repository configuration documentation
40
+ │ ├── letsencrypt.md # Let's Encrypt certificate documentation
41
+ │ ├── mkdocs_manager.md # MkDocs project management documentation
42
+ │ ├── ssl_cert.md # SSL certificate generation documentation
43
+ │ └── video_download.md # Video download documentation
44
+ ├── src/ # Source code directory
45
+ │ └── zxtoolbox/ # Main package
46
+ │ ├── __init__.py # Package initialization
47
+ │ ├── cli.py # Command-line entry point
48
+ │ ├── computer_info.py # Computer information retrieval
49
+ │ ├── config_manager.py # Configuration file management
50
+ │ ├── git_config.py # Git repository configuration management
51
+ │ ├── letsencrypt.py # Let's Encrypt certificate management
52
+ │ ├── mkdocs_manager.py # MkDocs project management
53
+ │ ├── pyopt_2fa.py # 2FA tool
54
+ │ ├── ssl_cert.py # SSL certificate generation
55
+ │ ├── video_download.py # Video download
56
+ │ └── test/ # Test directory
57
+ ├── pyproject.toml # Project configuration and dependencies
58
+ ├── README.md # Project description
59
+ └── uv.lock # uv locked dependency versions
60
+ ```
61
+
62
+ ## 0x03. Dependencies
63
+
64
+ ### Core Dependencies
65
+
66
+ | Package | Purpose | Website |
67
+ |---------|---------|---------|
68
+ | paramiko | SSH connections | [paramiko.org](https://www.paramiko.org/) |
69
+ | prettytable | Table formatting | [github.com](https://github.com/jazzband/prettytable) |
70
+ | psutil | System information | [psutil.readthedocs.io](https://psutil.readthedocs.io/) |
71
+ | py-cpuinfo | CPU information | [github.com](https://github.com/workhorsy/py-cpuinfo) |
72
+ | pynvml | NVIDIA GPU information | [github.com](https://github.com/gpuopenanalytics/pynvml) |
73
+ | pyotp | 2FA one-time passwords | [github.com](https://github.com/pyauth/pyotp) |
74
+ | yt-dlp | Video downloading | [github.com](https://github.com/yt-dlp/yt-dlp) |
75
+ | pyyaml | YAML parsing | [pyyaml.org](https://pyyaml.org/) |
76
+ | acme | ACME protocol (Let's Encrypt) | [github.com](https://github.com/certbot/certbot) |
77
+ | cryptography | Cryptographic functions | [cryptography.io](https://cryptography.io/) |
78
+ | requests | HTTP requests | [requests.readthedocs.io](https://requests.readthedocs.io/) |
79
+
80
+ ### Optional Dependencies
81
+
82
+ | Package | Purpose | Installation |
83
+ |---------|---------|--------------|
84
+ | mkdocs | Documentation site building | `uv sync --extra docs` |
85
+ | mkdocs-smzhbook-theme | MkDocs theme | `uv sync --extra docs` |
86
+
87
+ ## 0x04. Running Unit Tests
88
+
89
+ The project uses `pytest` as the testing framework. Test files are located in the `src/zxtoolbox/test/` directory.
90
+
91
+ ### Install Test Dependencies
92
+
93
+ ```shell
94
+ uv add --dev pytest
95
+ ```
96
+
97
+ ### Run All Tests
98
+
99
+ ```shell
100
+ uv run pytest src/zxtoolbox/test/ -v
101
+ ```
102
+
103
+ ### Run Single Test File
104
+
105
+ ```shell
106
+ uv run pytest src/zxtoolbox/test/test_cli.py -v
107
+ ```
108
+
109
+ ### Run Specific Test Class or Method
110
+
111
+ ```shell
112
+ # Run specific test class
113
+ uv run pytest src/zxtoolbox/test/test_cli.py::TestCliGit -v
114
+
115
+ # Run specific test method
116
+ uv run pytest src/zxtoolbox/test/test_cli.py::TestCliGit::test_git_config_check -v
117
+ ```
118
+
119
+ ### View Test Coverage
120
+
121
+ ```shell
122
+ uv add --dev pytest-cov
123
+ uv run pytest src/zxtoolbox/test/ --cov=zxtoolbox --cov-report=term-missing
124
+ ```
@@ -0,0 +1,103 @@
1
+ # zxtoolbox
2
+
3
+ A collection of tools for frequently performed repetitive tasks on Windows, Mac, and Linux systems
4
+
5
+ ## 0x01. Project Setup
6
+
7
+ ```shell
8
+ uv sync
9
+ ```
10
+
11
+ ## 0x02. Directory Structure
12
+ ```text
13
+ toolbox/
14
+ ├── doc/ # Documentation directory
15
+ │ ├── index.md # Project documentation
16
+ │ ├── computer_info.md # Computer information retrieval documentation
17
+ │ ├── config_manager.md # Configuration file management documentation
18
+ │ ├── git_config.md # Git repository configuration documentation
19
+ │ ├── letsencrypt.md # Let's Encrypt certificate documentation
20
+ │ ├── mkdocs_manager.md # MkDocs project management documentation
21
+ │ ├── ssl_cert.md # SSL certificate generation documentation
22
+ │ └── video_download.md # Video download documentation
23
+ ├── src/ # Source code directory
24
+ │ └── zxtoolbox/ # Main package
25
+ │ ├── __init__.py # Package initialization
26
+ │ ├── cli.py # Command-line entry point
27
+ │ ├── computer_info.py # Computer information retrieval
28
+ │ ├── config_manager.py # Configuration file management
29
+ │ ├── git_config.py # Git repository configuration management
30
+ │ ├── letsencrypt.py # Let's Encrypt certificate management
31
+ │ ├── mkdocs_manager.py # MkDocs project management
32
+ │ ├── pyopt_2fa.py # 2FA tool
33
+ │ ├── ssl_cert.py # SSL certificate generation
34
+ │ ├── video_download.py # Video download
35
+ │ └── test/ # Test directory
36
+ ├── pyproject.toml # Project configuration and dependencies
37
+ ├── README.md # Project description
38
+ └── uv.lock # uv locked dependency versions
39
+ ```
40
+
41
+ ## 0x03. Dependencies
42
+
43
+ ### Core Dependencies
44
+
45
+ | Package | Purpose | Website |
46
+ |---------|---------|---------|
47
+ | paramiko | SSH connections | [paramiko.org](https://www.paramiko.org/) |
48
+ | prettytable | Table formatting | [github.com](https://github.com/jazzband/prettytable) |
49
+ | psutil | System information | [psutil.readthedocs.io](https://psutil.readthedocs.io/) |
50
+ | py-cpuinfo | CPU information | [github.com](https://github.com/workhorsy/py-cpuinfo) |
51
+ | pynvml | NVIDIA GPU information | [github.com](https://github.com/gpuopenanalytics/pynvml) |
52
+ | pyotp | 2FA one-time passwords | [github.com](https://github.com/pyauth/pyotp) |
53
+ | yt-dlp | Video downloading | [github.com](https://github.com/yt-dlp/yt-dlp) |
54
+ | pyyaml | YAML parsing | [pyyaml.org](https://pyyaml.org/) |
55
+ | acme | ACME protocol (Let's Encrypt) | [github.com](https://github.com/certbot/certbot) |
56
+ | cryptography | Cryptographic functions | [cryptography.io](https://cryptography.io/) |
57
+ | requests | HTTP requests | [requests.readthedocs.io](https://requests.readthedocs.io/) |
58
+
59
+ ### Optional Dependencies
60
+
61
+ | Package | Purpose | Installation |
62
+ |---------|---------|--------------|
63
+ | mkdocs | Documentation site building | `uv sync --extra docs` |
64
+ | mkdocs-smzhbook-theme | MkDocs theme | `uv sync --extra docs` |
65
+
66
+ ## 0x04. Running Unit Tests
67
+
68
+ The project uses `pytest` as the testing framework. Test files are located in the `src/zxtoolbox/test/` directory.
69
+
70
+ ### Install Test Dependencies
71
+
72
+ ```shell
73
+ uv add --dev pytest
74
+ ```
75
+
76
+ ### Run All Tests
77
+
78
+ ```shell
79
+ uv run pytest src/zxtoolbox/test/ -v
80
+ ```
81
+
82
+ ### Run Single Test File
83
+
84
+ ```shell
85
+ uv run pytest src/zxtoolbox/test/test_cli.py -v
86
+ ```
87
+
88
+ ### Run Specific Test Class or Method
89
+
90
+ ```shell
91
+ # Run specific test class
92
+ uv run pytest src/zxtoolbox/test/test_cli.py::TestCliGit -v
93
+
94
+ # Run specific test method
95
+ uv run pytest src/zxtoolbox/test/test_cli.py::TestCliGit::test_git_config_check -v
96
+ ```
97
+
98
+ ### View Test Coverage
99
+
100
+ ```shell
101
+ uv add --dev pytest-cov
102
+ uv run pytest src/zxtoolbox/test/ --cov=zxtoolbox --cov-report=term-missing
103
+ ```
@@ -0,0 +1,37 @@
1
+ [project]
2
+ name = "zxtoolbox"
3
+ version = "1.1.0"
4
+ description = "some used tool collections"
5
+ readme = "README.md"
6
+ requires-python = ">=3.13"
7
+ dependencies = [
8
+ "paramiko>=3.5.1",
9
+ "prettytable>=3.16.0",
10
+ "psutil>=7.0.0",
11
+ "py-cpuinfo>=9.0.0",
12
+ "pynvml>=12.0.0",
13
+ "pyotp>=2.9.0",
14
+ "yt-dlp>=2025.1.0",
15
+ "pyyaml>=6.0.0",
16
+ "acme>=3.0.0",
17
+ "cryptography>=42.0.0",
18
+ "requests>=2.31.0",
19
+ ]
20
+
21
+ [project.optional-dependencies]
22
+ docs = [
23
+ "mkdocs>=1.6.0",
24
+ "mkdocs-smzhbook-theme>=1.3",
25
+ ]
26
+
27
+ [project.scripts]
28
+ zxtool = "zxtoolbox.cli:main"
29
+
30
+ [build-system]
31
+ requires = ["uv_build>=0.8.9,<0.9.0"]
32
+ build-backend = "uv_build"
33
+
34
+ [dependency-groups]
35
+ dev = [
36
+ "pytest>=9.0.2",
37
+ ]
@@ -0,0 +1,28 @@
1
+ from textwrap import dedent
2
+
3
+ __version__ = "0.1.0"
4
+
5
+
6
+ def cowsay(msg):
7
+ """
8
+ copy https://github.com/cs01/pycowsay/blob/master/pycowsay/main.py code
9
+ :param msg:
10
+ :return:
11
+ """
12
+ phrase = " ".join(msg)
13
+ topbar = "-" * len(phrase)
14
+ bottombar = "-" * len(phrase)
15
+ output = dedent(
16
+ """
17
+ %s
18
+ < %s >
19
+ %s
20
+ \ ^__^
21
+ \ (oo)\_______
22
+ (__)\ )\/\\
23
+ ||----w |
24
+ || ||
25
+ """
26
+ % (topbar, phrase, bottombar)
27
+ )
28
+ print(output)