Open-AutoTools 0.0.3rc5__tar.gz → 0.0.4__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.
Files changed (84) hide show
  1. open_autotools-0.0.4/MANIFEST.in +4 -0
  2. open_autotools-0.0.4/Open_AutoTools.egg-info/PKG-INFO +91 -0
  3. open_autotools-0.0.4/Open_AutoTools.egg-info/SOURCES.txt +57 -0
  4. {open_autotools-0.0.3rc5 → open_autotools-0.0.4}/Open_AutoTools.egg-info/entry_points.txt +0 -3
  5. open_autotools-0.0.4/Open_AutoTools.egg-info/requires.txt +19 -0
  6. open_autotools-0.0.4/PKG-INFO +91 -0
  7. open_autotools-0.0.4/README.md +43 -0
  8. {open_autotools-0.0.3rc5 → open_autotools-0.0.4}/autotools/autocaps/commands.py +3 -7
  9. open_autotools-0.0.4/autotools/autocaps/core.py +8 -0
  10. {open_autotools-0.0.3rc5 → open_autotools-0.0.4}/autotools/autoip/commands.py +8 -12
  11. open_autotools-0.0.4/autotools/autoip/core.py +262 -0
  12. {open_autotools-0.0.3rc5 → open_autotools-0.0.4}/autotools/autolower/commands.py +3 -7
  13. open_autotools-0.0.4/autotools/autolower/core.py +8 -0
  14. {open_autotools-0.0.3rc5 → open_autotools-0.0.4}/autotools/autopassword/commands.py +27 -33
  15. open_autotools-0.0.4/autotools/autopassword/core.py +62 -0
  16. open_autotools-0.0.4/autotools/autotest/__init__.py +2 -0
  17. open_autotools-0.0.4/autotools/autotest/commands.py +206 -0
  18. open_autotools-0.0.4/autotools/cli.py +156 -0
  19. open_autotools-0.0.4/autotools/utils/commands.py +13 -0
  20. open_autotools-0.0.4/autotools/utils/loading.py +24 -0
  21. open_autotools-0.0.4/autotools/utils/performance.py +424 -0
  22. open_autotools-0.0.4/autotools/utils/requirements.py +21 -0
  23. open_autotools-0.0.4/autotools/utils/text.py +16 -0
  24. open_autotools-0.0.4/autotools/utils/updates.py +38 -0
  25. open_autotools-0.0.4/autotools/utils/version.py +80 -0
  26. open_autotools-0.0.4/pyproject.toml +3 -0
  27. open_autotools-0.0.4/requirements.txt +10 -0
  28. open_autotools-0.0.4/setup.py +53 -0
  29. {open_autotools-0.0.3rc5/autotools/autocaps/tests → open_autotools-0.0.4/tests/autotools/autocaps}/test_autocaps_core.py +9 -8
  30. {open_autotools-0.0.3rc5/autotools/autocaps/tests → open_autotools-0.0.4/tests/autotools/autocaps}/test_autocaps_integration.py +0 -6
  31. open_autotools-0.0.4/tests/autotools/autoip/test_autoip_core.py +377 -0
  32. {open_autotools-0.0.3rc5/autotools/autoip/tests → open_autotools-0.0.4/tests/autotools/autoip}/test_autoip_integration.py +5 -23
  33. {open_autotools-0.0.3rc5/autotools/autolower/tests → open_autotools-0.0.4/tests/autotools/autolower}/test_autolower_core.py +9 -8
  34. {open_autotools-0.0.3rc5/autotools/autolower/tests → open_autotools-0.0.4/tests/autotools/autolower}/test_autolower_integration.py +0 -6
  35. open_autotools-0.0.4/tests/autotools/autopassword/test_autopassword_core.py +77 -0
  36. open_autotools-0.0.4/tests/autotools/autopassword/test_autopassword_integration.py +82 -0
  37. open_autotools-0.0.4/tests/autotools/autotest/__init__.py +0 -0
  38. open_autotools-0.0.4/tests/autotools/autotest/test_autotest_core.py +366 -0
  39. open_autotools-0.0.4/tests/autotools/utils/__init__.py +0 -0
  40. open_autotools-0.0.4/tests/autotools/utils/test_performance.py +959 -0
  41. open_autotools-0.0.4/tests/autotools/utils/test_requirements.py +148 -0
  42. open_autotools-0.0.4/tests/autotools/utils/test_text.py +93 -0
  43. open_autotools-0.0.4/tests/autotools/utils/test_updates.py +95 -0
  44. open_autotools-0.0.4/tests/autotools/utils/test_version.py +163 -0
  45. open_autotools-0.0.4/tests/test_cli.py +317 -0
  46. open_autotools-0.0.3rc5/Open_AutoTools.egg-info/PKG-INFO +0 -317
  47. open_autotools-0.0.3rc5/Open_AutoTools.egg-info/SOURCES.txt +0 -47
  48. open_autotools-0.0.3rc5/Open_AutoTools.egg-info/requires.txt +0 -46
  49. open_autotools-0.0.3rc5/PKG-INFO +0 -317
  50. open_autotools-0.0.3rc5/README.md +0 -244
  51. open_autotools-0.0.3rc5/autotools/autocaps/core.py +0 -7
  52. open_autotools-0.0.3rc5/autotools/autodownload/commands.py +0 -38
  53. open_autotools-0.0.3rc5/autotools/autodownload/core.py +0 -433
  54. open_autotools-0.0.3rc5/autotools/autoip/core.py +0 -311
  55. open_autotools-0.0.3rc5/autotools/autoip/tests/test_autoip_core.py +0 -72
  56. open_autotools-0.0.3rc5/autotools/autolower/core.py +0 -7
  57. open_autotools-0.0.3rc5/autotools/autopassword/core.py +0 -103
  58. open_autotools-0.0.3rc5/autotools/autospell/__init__.py +0 -3
  59. open_autotools-0.0.3rc5/autotools/autospell/commands.py +0 -123
  60. open_autotools-0.0.3rc5/autotools/autospell/core.py +0 -222
  61. open_autotools-0.0.3rc5/autotools/autotranslate/__init__.py +0 -3
  62. open_autotools-0.0.3rc5/autotools/autotranslate/commands.py +0 -42
  63. open_autotools-0.0.3rc5/autotools/autotranslate/core.py +0 -52
  64. open_autotools-0.0.3rc5/autotools/cli.py +0 -95
  65. open_autotools-0.0.3rc5/autotools/test/__init__.py +0 -3
  66. open_autotools-0.0.3rc5/autotools/test/commands.py +0 -118
  67. open_autotools-0.0.3rc5/autotools/utils/loading.py +0 -16
  68. open_autotools-0.0.3rc5/autotools/utils/updates.py +0 -30
  69. open_autotools-0.0.3rc5/autotools/utils/version.py +0 -74
  70. open_autotools-0.0.3rc5/setup.py +0 -102
  71. {open_autotools-0.0.3rc5 → open_autotools-0.0.4}/LICENSE +0 -0
  72. {open_autotools-0.0.3rc5 → open_autotools-0.0.4}/Open_AutoTools.egg-info/dependency_links.txt +0 -0
  73. {open_autotools-0.0.3rc5 → open_autotools-0.0.4}/Open_AutoTools.egg-info/top_level.txt +0 -0
  74. {open_autotools-0.0.3rc5 → open_autotools-0.0.4}/autotools/__init__.py +0 -0
  75. {open_autotools-0.0.3rc5 → open_autotools-0.0.4}/autotools/autocaps/__init__.py +0 -0
  76. {open_autotools-0.0.3rc5 → open_autotools-0.0.4}/autotools/autoip/__init__.py +0 -0
  77. {open_autotools-0.0.3rc5/autotools/autodownload → open_autotools-0.0.4/autotools/autolower}/__init__.py +0 -0
  78. {open_autotools-0.0.3rc5 → open_autotools-0.0.4}/autotools/autopassword/__init__.py +0 -0
  79. {open_autotools-0.0.3rc5 → open_autotools-0.0.4}/autotools/utils/__init__.py +0 -0
  80. {open_autotools-0.0.3rc5 → open_autotools-0.0.4}/setup.cfg +0 -0
  81. {open_autotools-0.0.3rc5/autotools/autolower → open_autotools-0.0.4/tests}/__init__.py +0 -0
  82. {open_autotools-0.0.3rc5/autotools/autocaps/tests → open_autotools-0.0.4/tests/autotools/autocaps}/__init__.py +0 -0
  83. {open_autotools-0.0.3rc5/autotools/autoip/tests → open_autotools-0.0.4/tests/autotools/autoip}/__init__.py +0 -0
  84. {open_autotools-0.0.3rc5/autotools/autolower/tests → open_autotools-0.0.4/tests/autotools/autolower}/__init__.py +0 -0
@@ -0,0 +1,4 @@
1
+ include README.md
2
+ include LICENSE
3
+ include requirements.txt
4
+ recursive-include tests *.py
@@ -0,0 +1,91 @@
1
+ Metadata-Version: 2.4
2
+ Name: Open-AutoTools
3
+ Version: 0.0.4
4
+ Summary: A suite of automated tools accessible via CLI with a simple `autotools` command
5
+ Home-page: https://github.com/BabylooPro/Open-AutoTools
6
+ Author: BabylooPro
7
+ Author-email: maxremy.dev@gmail.com
8
+ License: MIT
9
+ Project-URL: Bug Tracker, https://github.com/BabylooPro/Open-AutoTools/issues
10
+ Classifier: Programming Language :: Python :: 3.10
11
+ Classifier: Programming Language :: Python :: 3.11
12
+ Classifier: Programming Language :: Python :: 3.12
13
+ Classifier: Operating System :: OS Independent
14
+ Requires-Python: >=3.10
15
+ Description-Content-Type: text/markdown
16
+ License-File: LICENSE
17
+ Requires-Dist: click>=8.1.3
18
+ Requires-Dist: requests>=2.31.0
19
+ Requires-Dist: python-dotenv>=1.0.0
20
+ Requires-Dist: packaging>=23.0
21
+ Requires-Dist: halo>=0.0.31
22
+ Requires-Dist: pyperclip>=1.8.2
23
+ Requires-Dist: netifaces>=0.11.0
24
+ Requires-Dist: speedtest-cli>=2.1.3
25
+ Requires-Dist: psutil>=5.9.0
26
+ Requires-Dist: cryptography>=42.0.2
27
+ Provides-Extra: dev
28
+ Requires-Dist: build>=1.4.0; extra == "dev"
29
+ Requires-Dist: wheel>=0.45.1; extra == "dev"
30
+ Requires-Dist: pytest>=7.4.0; extra == "dev"
31
+ Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
32
+ Requires-Dist: pytest-sugar>=1.0.0; extra == "dev"
33
+ Requires-Dist: pytest-xdist>=3.5.0; extra == "dev"
34
+ Requires-Dist: pytest-timeout>=2.2.0; extra == "dev"
35
+ Dynamic: author
36
+ Dynamic: author-email
37
+ Dynamic: classifier
38
+ Dynamic: description
39
+ Dynamic: description-content-type
40
+ Dynamic: home-page
41
+ Dynamic: license
42
+ Dynamic: license-file
43
+ Dynamic: project-url
44
+ Dynamic: provides-extra
45
+ Dynamic: requires-dist
46
+ Dynamic: requires-python
47
+ Dynamic: summary
48
+
49
+ # Open-AutoTools
50
+
51
+ [PYPI_BADGE]: https://badge.fury.io/py/Open-AutoTools.svg
52
+ [PYPI_URL]: https://pypi.org/project/Open-AutoTools/
53
+ [PYTHON_BADGE]: https://img.shields.io/badge/Python-3.11-blue.svg
54
+ [PYTHON_URL]: https://www.python.org/downloads/
55
+ [CHANGELOG_BADGE]: https://img.shields.io/badge/CHANGELOG-red.svg
56
+ [CHANGELOG_URL]: CHANGELOG.md
57
+ [TODO_BADGE]: https://img.shields.io/badge/TODO-purple.svg
58
+ [TODO_URL]: TODO.md
59
+
60
+ [![PyPI][PYPI_BADGE]][PYPI_URL] [![Python][PYTHON_BADGE]][PYTHON_URL] [![CHANGELOG][CHANGELOG_BADGE]][CHANGELOG_URL] [![TODO][TODO_BADGE]][TODO_URL]
61
+
62
+ Python CLI toolkit for everyday developer tasks. Boost productivity directly from your terminal.
63
+
64
+ https://github.com/BabylooPro/Open-AutoTools/assets/35376790/d57f2b9d-55f8-4368-bb40-c0010eb9d49a
65
+
66
+ ## Quick Install
67
+
68
+ ```bash
69
+ pip install open-autotools
70
+ ```
71
+
72
+ See [Installation Guide](docs/installation.md) for more details.
73
+
74
+ ## Tools
75
+
76
+ - **[AutoCaps](docs/tools/autocaps.md)** - Convert text to uppercase
77
+ - **[AutoLower](docs/tools/autolower.md)** - Convert text to lowercase
78
+ - **[AutoPassword](docs/tools/autopassword.md)** - Generate secure passwords and encryption keys
79
+ - **[AutoIP](docs/tools/autoip.md)** - Display network information and diagnostics
80
+ - **[Test Suite](docs/tools/autotest.md)** - Run the test suite (development only)
81
+
82
+ ## Documentation
83
+
84
+ - [Installation](docs/installation.md)
85
+ - [Development](docs/development.md)
86
+ - [Performance](docs/performance.md)
87
+ - [Docker Support](docs/docker.md)
88
+
89
+ ## License
90
+
91
+ MIT - see [LICENSE](LICENSE).
@@ -0,0 +1,57 @@
1
+ LICENSE
2
+ MANIFEST.in
3
+ README.md
4
+ pyproject.toml
5
+ requirements.txt
6
+ setup.py
7
+ Open_AutoTools.egg-info/PKG-INFO
8
+ Open_AutoTools.egg-info/SOURCES.txt
9
+ Open_AutoTools.egg-info/dependency_links.txt
10
+ Open_AutoTools.egg-info/entry_points.txt
11
+ Open_AutoTools.egg-info/requires.txt
12
+ Open_AutoTools.egg-info/top_level.txt
13
+ autotools/__init__.py
14
+ autotools/cli.py
15
+ autotools/autocaps/__init__.py
16
+ autotools/autocaps/commands.py
17
+ autotools/autocaps/core.py
18
+ autotools/autoip/__init__.py
19
+ autotools/autoip/commands.py
20
+ autotools/autoip/core.py
21
+ autotools/autolower/__init__.py
22
+ autotools/autolower/commands.py
23
+ autotools/autolower/core.py
24
+ autotools/autopassword/__init__.py
25
+ autotools/autopassword/commands.py
26
+ autotools/autopassword/core.py
27
+ autotools/autotest/__init__.py
28
+ autotools/autotest/commands.py
29
+ autotools/utils/__init__.py
30
+ autotools/utils/commands.py
31
+ autotools/utils/loading.py
32
+ autotools/utils/performance.py
33
+ autotools/utils/requirements.py
34
+ autotools/utils/text.py
35
+ autotools/utils/updates.py
36
+ autotools/utils/version.py
37
+ tests/__init__.py
38
+ tests/test_cli.py
39
+ tests/autotools/autocaps/__init__.py
40
+ tests/autotools/autocaps/test_autocaps_core.py
41
+ tests/autotools/autocaps/test_autocaps_integration.py
42
+ tests/autotools/autoip/__init__.py
43
+ tests/autotools/autoip/test_autoip_core.py
44
+ tests/autotools/autoip/test_autoip_integration.py
45
+ tests/autotools/autolower/__init__.py
46
+ tests/autotools/autolower/test_autolower_core.py
47
+ tests/autotools/autolower/test_autolower_integration.py
48
+ tests/autotools/autopassword/test_autopassword_core.py
49
+ tests/autotools/autopassword/test_autopassword_integration.py
50
+ tests/autotools/autotest/__init__.py
51
+ tests/autotools/autotest/test_autotest_core.py
52
+ tests/autotools/utils/__init__.py
53
+ tests/autotools/utils/test_performance.py
54
+ tests/autotools/utils/test_requirements.py
55
+ tests/autotools/utils/test_text.py
56
+ tests/autotools/utils/test_updates.py
57
+ tests/autotools/utils/test_version.py
@@ -1,9 +1,6 @@
1
1
  [console_scripts]
2
2
  autocaps = autotools.cli:autocaps
3
- autodownload = autotools.cli:autodownload
4
3
  autoip = autotools.cli:autoip
5
4
  autolower = autotools.cli:autolower
6
5
  autopassword = autotools.cli:autopassword
7
- autospell = autotools.cli:autospell
8
6
  autotools = autotools.cli:cli
9
- autotranslate = autotools.cli:autotranslate
@@ -0,0 +1,19 @@
1
+ click>=8.1.3
2
+ requests>=2.31.0
3
+ python-dotenv>=1.0.0
4
+ packaging>=23.0
5
+ halo>=0.0.31
6
+ pyperclip>=1.8.2
7
+ netifaces>=0.11.0
8
+ speedtest-cli>=2.1.3
9
+ psutil>=5.9.0
10
+ cryptography>=42.0.2
11
+
12
+ [dev]
13
+ build>=1.4.0
14
+ wheel>=0.45.1
15
+ pytest>=7.4.0
16
+ pytest-cov>=4.1.0
17
+ pytest-sugar>=1.0.0
18
+ pytest-xdist>=3.5.0
19
+ pytest-timeout>=2.2.0
@@ -0,0 +1,91 @@
1
+ Metadata-Version: 2.4
2
+ Name: Open-AutoTools
3
+ Version: 0.0.4
4
+ Summary: A suite of automated tools accessible via CLI with a simple `autotools` command
5
+ Home-page: https://github.com/BabylooPro/Open-AutoTools
6
+ Author: BabylooPro
7
+ Author-email: maxremy.dev@gmail.com
8
+ License: MIT
9
+ Project-URL: Bug Tracker, https://github.com/BabylooPro/Open-AutoTools/issues
10
+ Classifier: Programming Language :: Python :: 3.10
11
+ Classifier: Programming Language :: Python :: 3.11
12
+ Classifier: Programming Language :: Python :: 3.12
13
+ Classifier: Operating System :: OS Independent
14
+ Requires-Python: >=3.10
15
+ Description-Content-Type: text/markdown
16
+ License-File: LICENSE
17
+ Requires-Dist: click>=8.1.3
18
+ Requires-Dist: requests>=2.31.0
19
+ Requires-Dist: python-dotenv>=1.0.0
20
+ Requires-Dist: packaging>=23.0
21
+ Requires-Dist: halo>=0.0.31
22
+ Requires-Dist: pyperclip>=1.8.2
23
+ Requires-Dist: netifaces>=0.11.0
24
+ Requires-Dist: speedtest-cli>=2.1.3
25
+ Requires-Dist: psutil>=5.9.0
26
+ Requires-Dist: cryptography>=42.0.2
27
+ Provides-Extra: dev
28
+ Requires-Dist: build>=1.4.0; extra == "dev"
29
+ Requires-Dist: wheel>=0.45.1; extra == "dev"
30
+ Requires-Dist: pytest>=7.4.0; extra == "dev"
31
+ Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
32
+ Requires-Dist: pytest-sugar>=1.0.0; extra == "dev"
33
+ Requires-Dist: pytest-xdist>=3.5.0; extra == "dev"
34
+ Requires-Dist: pytest-timeout>=2.2.0; extra == "dev"
35
+ Dynamic: author
36
+ Dynamic: author-email
37
+ Dynamic: classifier
38
+ Dynamic: description
39
+ Dynamic: description-content-type
40
+ Dynamic: home-page
41
+ Dynamic: license
42
+ Dynamic: license-file
43
+ Dynamic: project-url
44
+ Dynamic: provides-extra
45
+ Dynamic: requires-dist
46
+ Dynamic: requires-python
47
+ Dynamic: summary
48
+
49
+ # Open-AutoTools
50
+
51
+ [PYPI_BADGE]: https://badge.fury.io/py/Open-AutoTools.svg
52
+ [PYPI_URL]: https://pypi.org/project/Open-AutoTools/
53
+ [PYTHON_BADGE]: https://img.shields.io/badge/Python-3.11-blue.svg
54
+ [PYTHON_URL]: https://www.python.org/downloads/
55
+ [CHANGELOG_BADGE]: https://img.shields.io/badge/CHANGELOG-red.svg
56
+ [CHANGELOG_URL]: CHANGELOG.md
57
+ [TODO_BADGE]: https://img.shields.io/badge/TODO-purple.svg
58
+ [TODO_URL]: TODO.md
59
+
60
+ [![PyPI][PYPI_BADGE]][PYPI_URL] [![Python][PYTHON_BADGE]][PYTHON_URL] [![CHANGELOG][CHANGELOG_BADGE]][CHANGELOG_URL] [![TODO][TODO_BADGE]][TODO_URL]
61
+
62
+ Python CLI toolkit for everyday developer tasks. Boost productivity directly from your terminal.
63
+
64
+ https://github.com/BabylooPro/Open-AutoTools/assets/35376790/d57f2b9d-55f8-4368-bb40-c0010eb9d49a
65
+
66
+ ## Quick Install
67
+
68
+ ```bash
69
+ pip install open-autotools
70
+ ```
71
+
72
+ See [Installation Guide](docs/installation.md) for more details.
73
+
74
+ ## Tools
75
+
76
+ - **[AutoCaps](docs/tools/autocaps.md)** - Convert text to uppercase
77
+ - **[AutoLower](docs/tools/autolower.md)** - Convert text to lowercase
78
+ - **[AutoPassword](docs/tools/autopassword.md)** - Generate secure passwords and encryption keys
79
+ - **[AutoIP](docs/tools/autoip.md)** - Display network information and diagnostics
80
+ - **[Test Suite](docs/tools/autotest.md)** - Run the test suite (development only)
81
+
82
+ ## Documentation
83
+
84
+ - [Installation](docs/installation.md)
85
+ - [Development](docs/development.md)
86
+ - [Performance](docs/performance.md)
87
+ - [Docker Support](docs/docker.md)
88
+
89
+ ## License
90
+
91
+ MIT - see [LICENSE](LICENSE).
@@ -0,0 +1,43 @@
1
+ # Open-AutoTools
2
+
3
+ [PYPI_BADGE]: https://badge.fury.io/py/Open-AutoTools.svg
4
+ [PYPI_URL]: https://pypi.org/project/Open-AutoTools/
5
+ [PYTHON_BADGE]: https://img.shields.io/badge/Python-3.11-blue.svg
6
+ [PYTHON_URL]: https://www.python.org/downloads/
7
+ [CHANGELOG_BADGE]: https://img.shields.io/badge/CHANGELOG-red.svg
8
+ [CHANGELOG_URL]: CHANGELOG.md
9
+ [TODO_BADGE]: https://img.shields.io/badge/TODO-purple.svg
10
+ [TODO_URL]: TODO.md
11
+
12
+ [![PyPI][PYPI_BADGE]][PYPI_URL] [![Python][PYTHON_BADGE]][PYTHON_URL] [![CHANGELOG][CHANGELOG_BADGE]][CHANGELOG_URL] [![TODO][TODO_BADGE]][TODO_URL]
13
+
14
+ Python CLI toolkit for everyday developer tasks. Boost productivity directly from your terminal.
15
+
16
+ https://github.com/BabylooPro/Open-AutoTools/assets/35376790/d57f2b9d-55f8-4368-bb40-c0010eb9d49a
17
+
18
+ ## Quick Install
19
+
20
+ ```bash
21
+ pip install open-autotools
22
+ ```
23
+
24
+ See [Installation Guide](docs/installation.md) for more details.
25
+
26
+ ## Tools
27
+
28
+ - **[AutoCaps](docs/tools/autocaps.md)** - Convert text to uppercase
29
+ - **[AutoLower](docs/tools/autolower.md)** - Convert text to lowercase
30
+ - **[AutoPassword](docs/tools/autopassword.md)** - Generate secure passwords and encryption keys
31
+ - **[AutoIP](docs/tools/autoip.md)** - Display network information and diagnostics
32
+ - **[Test Suite](docs/tools/autotest.md)** - Run the test suite (development only)
33
+
34
+ ## Documentation
35
+
36
+ - [Installation](docs/installation.md)
37
+ - [Development](docs/development.md)
38
+ - [Performance](docs/performance.md)
39
+ - [Docker Support](docs/docker.md)
40
+
41
+ ## License
42
+
43
+ MIT - see [LICENSE](LICENSE).
@@ -3,15 +3,11 @@ from .core import autocaps_transform
3
3
  from ..utils.loading import LoadingAnimation
4
4
  from ..utils.updates import check_for_updates
5
5
 
6
+ # CLI COMMAND TO TRANSFORM TEXT TO UPPERCASE
6
7
  @click.command()
7
8
  @click.argument('text', nargs=-1)
8
9
  def autocaps(text):
9
- """Convert text to UPPERCASE."""
10
- with LoadingAnimation():
11
- result = autocaps_transform(" ".join(text))
10
+ with LoadingAnimation(): result = autocaps_transform(" ".join(text))
12
11
  click.echo(result)
13
-
14
- # UPDATE CHECK AT THE END
15
12
  update_msg = check_for_updates()
16
- if update_msg:
17
- click.echo(update_msg)
13
+ if update_msg: click.echo(update_msg)
@@ -0,0 +1,8 @@
1
+ import pyperclip
2
+
3
+ # TRANSFORMS TEXT TO UPPERCASE AND COPIES IT TO CLIPBOARD
4
+ def autocaps_transform(text):
5
+ transformed_text = text.upper()
6
+ try: pyperclip.copy(transformed_text)
7
+ except pyperclip.PyperclipException: pass
8
+ return transformed_text
@@ -2,7 +2,9 @@ import click
2
2
  from .core import run
3
3
  from ..utils.loading import LoadingAnimation
4
4
  from ..utils.updates import check_for_updates
5
+ from ..utils.text import safe_text
5
6
 
7
+ # CLI COMMAND TO DISPLAY NETWORK INFORMATION AND RUN DIAGNOSTICS
6
8
  @click.command()
7
9
  @click.option('--test', '-t', is_flag=True, help='Run connectivity tests')
8
10
  @click.option('--speed', '-s', is_flag=True, help='Run internet speed test')
@@ -13,17 +15,11 @@ from ..utils.updates import check_for_updates
13
15
  @click.option('--location', '-l', is_flag=True, help='Show IP location info')
14
16
  @click.option('--no-ip', '-n', is_flag=True, help='Hide IP addresses')
15
17
  def autoip(test, speed, monitor, interval, ports, dns, location, no_ip):
16
- """Display network information and diagnostics.
17
-
18
- Shows local and public IP addresses, runs network diagnostics,
19
- performs speed tests, monitors traffic with custom intervals,
20
- checks ports, displays DNS information and provides geolocation data."""
21
18
  with LoadingAnimation():
22
- output = run(test=test, speed=speed, monitor=monitor, interval=interval,
23
- ports=ports, dns=dns, location=location, no_ip=no_ip)
24
- click.echo(output)
25
-
26
- # UPDATE CHECK AT THE END
19
+ output = run(
20
+ test=test, speed=speed, monitor=monitor, interval=interval,
21
+ ports=ports, dns=dns, location=location, no_ip=no_ip
22
+ )
23
+ click.echo(safe_text(output))
27
24
  update_msg = check_for_updates()
28
- if update_msg:
29
- click.echo(update_msg)
25
+ if update_msg: click.echo(update_msg)
@@ -0,0 +1,262 @@
1
+ import socket
2
+ import requests
3
+ import json
4
+ import ipaddress
5
+ import netifaces
6
+ import time
7
+ import speedtest
8
+ import psutil
9
+
10
+ # EXTRACTS IPV4 ADDRESSES FROM INTERFACE ADDRESSES
11
+ def _extract_ipv4_addresses(addrs):
12
+ ipv4_list = []
13
+ if netifaces.AF_INET in addrs:
14
+ for addr in addrs[netifaces.AF_INET]:
15
+ if 'addr' in addr and not addr['addr'].startswith('127.'):
16
+ ipv4_list.append(addr['addr'])
17
+ return ipv4_list
18
+
19
+ # EXTRACTS IPV6 ADDRESSES FROM INTERFACE ADDRESSES
20
+ def _extract_ipv6_addresses(addrs):
21
+ ipv6_list = []
22
+ if netifaces.AF_INET6 in addrs:
23
+ for addr in addrs[netifaces.AF_INET6]:
24
+ if 'addr' in addr and not addr['addr'].startswith('fe80:'):
25
+ clean_addr = addr['addr'].split('%')[0]
26
+ ipv6_list.append(clean_addr)
27
+ return ipv6_list
28
+
29
+ # RETRIEVES ALL LOCAL IP ADDRESSES (IPV4 AND IPV6) FROM NETWORK INTERFACES
30
+ def get_local_ips():
31
+ ips = {'ipv4': [], 'ipv6': []}
32
+
33
+ for interface in netifaces.interfaces():
34
+ addrs = netifaces.ifaddresses(interface)
35
+ ips['ipv4'].extend(_extract_ipv4_addresses(addrs))
36
+ ips['ipv6'].extend(_extract_ipv6_addresses(addrs))
37
+
38
+ return ips
39
+
40
+ # RETRIEVES PUBLIC IP ADDRESSES (IPV4 AND IPV6) FROM EXTERNAL SERVICES
41
+ def get_public_ips():
42
+ ips = {'ipv4': None, 'ipv6': None}
43
+ ipv4_services = ['https://api.ipify.org', 'https://ipv4.icanhazip.com', 'https://v4.ident.me']
44
+ ipv6_services = ['https://api6.ipify.org', 'https://ipv6.icanhazip.com', 'https://v6.ident.me']
45
+
46
+ for service in ipv4_services:
47
+ try:
48
+ ips['ipv4'] = requests.get(service, timeout=2).text.strip()
49
+ if ips['ipv4']: break
50
+ except (requests.RequestException, requests.Timeout, requests.ConnectionError):
51
+ continue
52
+
53
+ for service in ipv6_services:
54
+ try:
55
+ ips['ipv6'] = requests.get(service, timeout=2).text.strip()
56
+ if ips['ipv6']: break
57
+ except (requests.RequestException, requests.Timeout, requests.ConnectionError):
58
+ continue
59
+
60
+ return ips
61
+
62
+ # TESTS NETWORK CONNECTIVITY TO COMMON HOSTS
63
+ def test_connectivity():
64
+ results = []
65
+ test_hosts = {
66
+ 'Google DNS': ('8.8.8.8', 53),
67
+ 'CloudFlare DNS': ('1.1.1.1', 53),
68
+ 'Google': ('google.com', 443),
69
+ 'Cloudflare': ('cloudflare.com', 443),
70
+ 'GitHub': ('github.com', 443),
71
+ }
72
+
73
+ for name, (host, port) in test_hosts.items():
74
+ try:
75
+ start = time.time()
76
+ s = socket.create_connection((host, port), timeout=2)
77
+ latency = round((time.time() - start) * 1000, 2)
78
+ s.close()
79
+ results.append((name, True, latency))
80
+ except OSError:
81
+ results.append((name, False, None))
82
+
83
+ return results
84
+
85
+ # RUNS INTERNET SPEED TEST AND DISPLAYS RESULTS INCLUDING PING
86
+ def run_speedtest():
87
+ print("\nRunning speed test (this may take a minute)...")
88
+ try:
89
+ st = speedtest.Speedtest()
90
+ st.get_best_server()
91
+
92
+ print("Testing download speed...")
93
+ download_speed = st.download() / 1_000_000 # CONVERT TO MBPS
94
+
95
+ print("Testing upload speed...")
96
+ upload_speed = st.upload() / 1_000_000 # CONVERT TO MBPS
97
+
98
+ print("Testing ping...")
99
+ ping = st.results.ping
100
+
101
+ print("\nSpeed Test Results:")
102
+ print(f"Download: {download_speed:.2f} Mbps")
103
+ print(f"Upload: {upload_speed:.2f} Mbps")
104
+ print(f"Ping: {ping:.0f} ms")
105
+
106
+ return True
107
+ except Exception as e:
108
+ print(f"\nSpeed test failed: {str(e)}")
109
+ return False
110
+
111
+ # GETS PUBLIC IP ADDRESS USING EXTERNAL API SERVICES
112
+ def get_public_ip():
113
+ try:
114
+ response = requests.get('https://api.ipify.org')
115
+ return response.text
116
+ except requests.RequestException:
117
+ try:
118
+ response = requests.get('https://api.ipapi.com/api/check')
119
+ return response.json()['ip']
120
+ except (requests.RequestException, KeyError, ValueError):
121
+ return None
122
+
123
+ # GETS LOCAL IP ADDRESS OF DEFAULT NETWORK INTERFACE
124
+ def get_local_ip():
125
+ try:
126
+ gateways = netifaces.gateways()
127
+ default_interface = gateways['default'][netifaces.AF_INET][1]
128
+ addrs = netifaces.ifaddresses(default_interface)
129
+ return addrs[netifaces.AF_INET][0]['addr']
130
+ except (KeyError, IndexError, OSError):
131
+ try:
132
+ s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
133
+ s.connect(("8.8.8.8", 80))
134
+ ip = s.getsockname()[0]
135
+ s.close()
136
+ return ip
137
+ except OSError:
138
+ return None
139
+
140
+ # RETRIEVES DETAILED INFORMATION ABOUT AN IP ADDRESS
141
+ def get_ip_info(ip=None):
142
+ if ip:
143
+ try:
144
+ ip_obj = ipaddress.ip_address(ip)
145
+ if ip_obj.is_private:
146
+ raise ValueError("Cannot get info for private IP addresses")
147
+ except ValueError as e:
148
+ raise ValueError(f"Invalid IP address: {str(e)}")
149
+
150
+ try:
151
+ url = f'https://ipapi.co/{ip}/json' if ip else 'https://ipapi.co/json'
152
+ response = requests.get(url)
153
+ data = response.json()
154
+
155
+ if 'error' in data: raise ValueError(f"Error getting IP info: {data['error']}")
156
+
157
+ return data
158
+ except requests.RequestException as e:
159
+ raise ValueError(f"Error connecting to IP info service: {str(e)}")
160
+
161
+ # DISPLAYS LOCAL AND PUBLIC IP ADDRESSES
162
+ def _display_ip_addresses(output):
163
+ local_ips = get_local_ips()
164
+ public_ips = get_public_ips()
165
+ output.append("\nLocal IPs:")
166
+
167
+ if local_ips['ipv4']:
168
+ for ip in local_ips['ipv4']: output.append(f"IPv4: {ip}")
169
+ else:
170
+ output.append("IPv4: Not available")
171
+
172
+ if local_ips['ipv6']:
173
+ for ip in local_ips['ipv6']: output.append(f"IPv6: {ip}")
174
+ else:
175
+ output.append("IPv6: Not available")
176
+
177
+ output.append("\nPublic IPs:")
178
+ output.append(f"IPv4: {public_ips['ipv4'] or 'Not available'}")
179
+ output.append(f"IPv6: {public_ips['ipv6'] or 'Not available'}")
180
+
181
+ # DISPLAYS CONNECTIVITY TEST RESULTS
182
+ def _display_connectivity_tests(output):
183
+ output.append("\nConnectivity Tests:")
184
+ results = test_connectivity()
185
+ for name, success, latency in results:
186
+ status = f"OK {latency}ms" if success else "X Failed"
187
+ output.append(f"{name:<15} {status}")
188
+
189
+ # DISPLAYS LOCATION INFORMATION
190
+ def _display_location_info(output):
191
+ try:
192
+ loc = get_ip_info()
193
+ output.append("\nLocation Info:")
194
+ output.append(f"City: {loc.get('city', 'Unknown')}")
195
+ output.append(f"Region: {loc.get('region', 'Unknown')}")
196
+ output.append(f"Country: {loc.get('country', 'Unknown')}")
197
+ output.append(f"ISP: {loc.get('org', 'Unknown')}")
198
+ except Exception as e:
199
+ output.append(f"\nLocation lookup failed: {str(e)}")
200
+
201
+ # DISPLAYS DNS SERVER INFORMATION
202
+ def _display_dns_servers(output):
203
+ output.append("\nDNS Servers:")
204
+ try:
205
+ with open('/etc/resolv.conf', 'r') as f:
206
+ for line in f:
207
+ if 'nameserver' in line: output.append(f"DNS: {line.split()[1]}")
208
+ except OSError:
209
+ output.append("Could not read DNS configuration")
210
+
211
+ # CHECKS AND DISPLAYS COMMON PORTS STATUS
212
+ def _display_ports_status(output):
213
+ common_ports = [80, 443, 22, 21, 25, 3306]
214
+ output.append("\nCommon Ports Status (localhost):")
215
+
216
+ for port in common_ports:
217
+ sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
218
+ result = sock.connect_ex(('127.0.0.1', port))
219
+ status = "Open" if result == 0 else "Closed"
220
+ output.append(f"Port {port}: {status}")
221
+ sock.close()
222
+
223
+ # MONITORS NETWORK TRAFFIC
224
+ def _monitor_network_traffic(output, interval):
225
+ output.append("\nNetwork Monitor (Press Ctrl+C to stop):")
226
+ try:
227
+ prev_bytes_sent = psutil.net_io_counters().bytes_sent
228
+ prev_bytes_recv = psutil.net_io_counters().bytes_recv
229
+
230
+ while True:
231
+ time.sleep(interval)
232
+ bytes_sent = psutil.net_io_counters().bytes_sent
233
+ bytes_recv = psutil.net_io_counters().bytes_recv
234
+
235
+ upload_speed = (bytes_sent - prev_bytes_sent) / (1024 * interval)
236
+ download_speed = (bytes_recv - prev_bytes_recv) / (1024 * interval)
237
+
238
+ output.append(f"\rUp: {upload_speed:.2f} KB/s | Down: {download_speed:.2f} KB/s")
239
+
240
+ prev_bytes_sent = bytes_sent
241
+ prev_bytes_recv = bytes_recv
242
+
243
+ except KeyboardInterrupt:
244
+ output.append("\nMonitoring stopped")
245
+
246
+ # MAIN FUNCTION TO RUN NETWORK DIAGNOSTICS AND DISPLAY RESULTS
247
+ def run(test=False, speed=False, monitor=False, interval=1, ports=False, dns=False, location=False, no_ip=False):
248
+ output = []
249
+
250
+ if not no_ip: _display_ip_addresses(output)
251
+ if test: _display_connectivity_tests(output)
252
+ if location: _display_location_info(output)
253
+ if dns: _display_dns_servers(output)
254
+ if ports: _display_ports_status(output)
255
+ if monitor: _monitor_network_traffic(output, interval)
256
+
257
+ if speed:
258
+ output.append("\nRunning speed test...")
259
+ if run_speedtest(): output.append("Speed test completed successfully")
260
+ else: output.append("Speed test failed")
261
+
262
+ return "\n".join(output)
@@ -3,15 +3,11 @@ from .core import autolower_transform
3
3
  from ..utils.loading import LoadingAnimation
4
4
  from ..utils.updates import check_for_updates
5
5
 
6
+ # CLI COMMAND TO TRANSFORM TEXT TO LOWERCASE
6
7
  @click.command()
7
8
  @click.argument('text', nargs=-1)
8
9
  def autolower(text):
9
- """Convert text to lowercase."""
10
- with LoadingAnimation():
11
- result = autolower_transform(" ".join(text))
10
+ with LoadingAnimation(): result = autolower_transform(" ".join(text))
12
11
  click.echo(result)
13
-
14
- # UPDATE CHECK AT THE END
15
12
  update_msg = check_for_updates()
16
- if update_msg:
17
- click.echo(update_msg)
13
+ if update_msg: click.echo(update_msg)
@@ -0,0 +1,8 @@
1
+ import pyperclip
2
+
3
+ # TRANSFORMS TEXT TO LOWERCASE AND COPIES IT TO CLIPBOARD
4
+ def autolower_transform(text):
5
+ transformed_text = text.lower()
6
+ try: pyperclip.copy(transformed_text)
7
+ except pyperclip.PyperclipException: pass
8
+ return transformed_text