TermuxUO 0.0.2__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.
termuxuo-0.0.2/LICENSE ADDED
@@ -0,0 +1,9 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Ruizennis
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,50 @@
1
+ Metadata-Version: 2.4
2
+ Name: TermuxUO
3
+ Version: 0.0.2
4
+ Summary: A lightweight utility to open urls with python or with the cli that requires Zero extra dependencys
5
+ Author: Ruizennis
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/Ruizennis/TermuxUO
8
+ Project-URL: Issues, https://github.com/Ruizennis/TermuxUO/Issues
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Operating System :: POSIX :: Linux
12
+ Classifier: Environment :: Console
13
+ Classifier: Topic :: Utilities
14
+ Requires-Python: >=3.7
15
+ Description-Content-Type: text/markdown
16
+ License-File: LICENSE
17
+ Dynamic: license-file
18
+
19
+ # TermuxUO
20
+ ## Aka TermuxUrlOpener
21
+ **Zero** Dependencys Required.
22
+
23
+ This dual function pip package & cli tool was made to solve an issue with Termux, not allowing opening urls in browser easily without their companion app; This package solves that.
24
+
25
+ Required packages:
26
+ **None**
27
+
28
+ Yeah thats right this requires **Zero** extra packages to work it only needs access to am and some python packages that are auto installed when getting python on 3.10+
29
+
30
+ ## Cli Usage
31
+ its dead simple.
32
+ all you have to do is run the command and then then url
33
+ ```bash
34
+ termuxuo <url>
35
+ ```
36
+ ## Package Usage
37
+ Simply import the library and your good to go, just use the open_url function to open the url passed
38
+ ```python
39
+ import TermuxUO
40
+ open_url('https://example.com')
41
+ ```
42
+
43
+ ## Installation
44
+ ```bash
45
+ pip install TermuxUO
46
+ ```
47
+ ## Uninstallation
48
+ ```bash
49
+ pip uninstall TermuxUO
50
+ ```
@@ -0,0 +1,32 @@
1
+ # TermuxUO
2
+ ## Aka TermuxUrlOpener
3
+ **Zero** Dependencys Required.
4
+
5
+ This dual function pip package & cli tool was made to solve an issue with Termux, not allowing opening urls in browser easily without their companion app; This package solves that.
6
+
7
+ Required packages:
8
+ **None**
9
+
10
+ Yeah thats right this requires **Zero** extra packages to work it only needs access to am and some python packages that are auto installed when getting python on 3.10+
11
+
12
+ ## Cli Usage
13
+ its dead simple.
14
+ all you have to do is run the command and then then url
15
+ ```bash
16
+ termuxuo <url>
17
+ ```
18
+ ## Package Usage
19
+ Simply import the library and your good to go, just use the open_url function to open the url passed
20
+ ```python
21
+ import TermuxUO
22
+ open_url('https://example.com')
23
+ ```
24
+
25
+ ## Installation
26
+ ```bash
27
+ pip install TermuxUO
28
+ ```
29
+ ## Uninstallation
30
+ ```bash
31
+ pip uninstall TermuxUO
32
+ ```
@@ -0,0 +1,32 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "TermuxUO"
7
+ version = "0.0.2"
8
+ description = "A lightweight utility to open urls with python or with the cli that requires Zero extra dependencys"
9
+ authors = [{name = "Ruizennis"}]
10
+ requires-python = ">=3.7"
11
+ readme = "README.md"
12
+ license = {text = "MIT"}
13
+ classifiers = [
14
+ "Programming Language :: Python :: 3",
15
+ "License :: OSI Approved :: MIT License",
16
+ "Operating System :: POSIX :: Linux",
17
+ "Environment :: Console",
18
+ "Topic :: Utilities"
19
+ ]
20
+
21
+ [project.urls]
22
+ Homepage = "https://github.com/Ruizennis/TermuxUO"
23
+ Issues = "https://github.com/Ruizennis/TermuxUO/Issues"
24
+
25
+ [project.scripts]
26
+ Termuxuo = "TermuxUO:main"
27
+ termuxuo = "TermuxUO:main"
28
+
29
+ [tool.setuptools]
30
+ packages = ["TermuxUO"]
31
+ package-dir = {"" = "src"}
32
+
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,87 @@
1
+ import os
2
+ import subprocess
3
+ import sys
4
+ from importlib.metadata import version, PackageNotFoundError
5
+ # configuration
6
+ python_verbose_allowed = False
7
+ # end of config
8
+ #define flags
9
+ Flagslist = ''
10
+ Flags = {
11
+ verboseflags = ['-v', '--verbose'],
12
+ helpflags = ['-h', '--help', 'help'],
13
+ versionflags = ['-V' '--version', 'version']
14
+ }
15
+ #Define help url and project urls
16
+ SystemUrls = {
17
+ Github = "https://github.com/Ruizennis/TermuxUO",
18
+ Pypi = ""
19
+ }
20
+ help_information = '''
21
+ Cli Tool Usage:
22
+ termuxuo <url>
23
+
24
+ Python pip Package Usage:
25
+ import TermuxUO
26
+ openurl("<url>")
27
+ '''
28
+ # check for flags
29
+ def checkflags():
30
+ global Flagslist
31
+ if sys.argv > 1:
32
+ if sys.argv[1] in Flags["verboseflags"]:
33
+ flagslist = '-v'
34
+ if sys.argv[1] in Flags["helpflags"]:
35
+ print(help_information)
36
+ print('Press enter to leave or enter 1 or 2 to open the github repository or pipy page.')
37
+ Pick = input()
38
+ if Pick == '1':
39
+ open(SystemUrls['Github'])
40
+ elif Pick == '2':
41
+ open(SystemUrls['Pypi'])
42
+ sys.exit(0)
43
+ if sys.argv[1] in Flags["versionflags"]:
44
+ try:
45
+ Version = version(TermuxUO)
46
+ print(Version)
47
+ except PackageNotFoundError:
48
+ print('Error, pip paclage not found.')
49
+ sys.exit(0)
50
+ # check if verbose is enabled
51
+ def CheckV(type):
52
+ if type == 1:
53
+ if python_verbose_allowed:
54
+ if Flagslist == '-v':
55
+ return subprocess.DEVNULL
56
+ else:
57
+ return None
58
+ else:
59
+ return None
60
+ else:
61
+ if Flagslist == '-v':
62
+ return subprocess.DEVNULL
63
+ else:
64
+ return None
65
+ # opening urls
66
+ def openurl(url):
67
+ url = str(url)
68
+ if not url.startswith(('https', 'http', 'file://', 'file:///')):
69
+ url = 'https://' + url
70
+ subprocess.run(
71
+ ["am", "start", "-a", "android.intent.action.VIEW", "-d", url],
72
+ stdout=CheckV(1),
73
+ stderr=CheckV(1)
74
+ )
75
+
76
+ def main():
77
+ if len(sys.argv) > 1:
78
+ url = sys.argv[1]
79
+ else:
80
+ print('Error, no url provided')
81
+ if not url.startswith(('https', 'http', 'file://', 'file///')):
82
+ url = 'https://' + url
83
+ subprocess.run(
84
+ ["am", "start", "-a", "android.intent.action.VIEW", "-d", url],
85
+ stdout=CheckV(0),
86
+ stderr=CheckV(0)
87
+ )
@@ -0,0 +1,50 @@
1
+ Metadata-Version: 2.4
2
+ Name: TermuxUO
3
+ Version: 0.0.2
4
+ Summary: A lightweight utility to open urls with python or with the cli that requires Zero extra dependencys
5
+ Author: Ruizennis
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/Ruizennis/TermuxUO
8
+ Project-URL: Issues, https://github.com/Ruizennis/TermuxUO/Issues
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Operating System :: POSIX :: Linux
12
+ Classifier: Environment :: Console
13
+ Classifier: Topic :: Utilities
14
+ Requires-Python: >=3.7
15
+ Description-Content-Type: text/markdown
16
+ License-File: LICENSE
17
+ Dynamic: license-file
18
+
19
+ # TermuxUO
20
+ ## Aka TermuxUrlOpener
21
+ **Zero** Dependencys Required.
22
+
23
+ This dual function pip package & cli tool was made to solve an issue with Termux, not allowing opening urls in browser easily without their companion app; This package solves that.
24
+
25
+ Required packages:
26
+ **None**
27
+
28
+ Yeah thats right this requires **Zero** extra packages to work it only needs access to am and some python packages that are auto installed when getting python on 3.10+
29
+
30
+ ## Cli Usage
31
+ its dead simple.
32
+ all you have to do is run the command and then then url
33
+ ```bash
34
+ termuxuo <url>
35
+ ```
36
+ ## Package Usage
37
+ Simply import the library and your good to go, just use the open_url function to open the url passed
38
+ ```python
39
+ import TermuxUO
40
+ open_url('https://example.com')
41
+ ```
42
+
43
+ ## Installation
44
+ ```bash
45
+ pip install TermuxUO
46
+ ```
47
+ ## Uninstallation
48
+ ```bash
49
+ pip uninstall TermuxUO
50
+ ```
@@ -0,0 +1,9 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ src/TermuxUO/__init__.py
5
+ src/TermuxUO.egg-info/PKG-INFO
6
+ src/TermuxUO.egg-info/SOURCES.txt
7
+ src/TermuxUO.egg-info/dependency_links.txt
8
+ src/TermuxUO.egg-info/entry_points.txt
9
+ src/TermuxUO.egg-info/top_level.txt
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ Termuxuo = TermuxUO:main
3
+ termuxuo = TermuxUO:main
@@ -0,0 +1 @@
1
+ TermuxUO