nontrinsic-cli 0.0.1__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,18 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 nontrinsic
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
6
+ associated documentation files (the "Software"), to deal in the Software without restriction, including
7
+ without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
9
+ following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all copies or substantial
12
+ portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
15
+ LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
16
+ EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
18
+ USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,57 @@
1
+ Metadata-Version: 2.4
2
+ Name: nontrinsic-cli
3
+ Version: 0.0.1
4
+ Summary: EepyFileServer API CLI written in Python
5
+ Author: maxie
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://codeberg.org/maxeepy/eepyfileserver-cli
8
+ Project-URL: Issues, https://codeberg.org/maxeepy/eepyfileserver-cli/issues
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: 3.10
11
+ Classifier: Programming Language :: Python :: 3.11
12
+ Classifier: Programming Language :: Python :: 3.12
13
+ Classifier: Programming Language :: Python :: 3.13
14
+ Classifier: Programming Language :: Python :: 3.14
15
+ Classifier: Operating System :: POSIX :: Linux
16
+ Requires-Python: >=3.10
17
+ Description-Content-Type: text/markdown
18
+ License-File: LICENSE
19
+ Requires-Dist: requests>=2.30
20
+ Requires-Dist: nontrinsic
21
+ Dynamic: license-file
22
+
23
+ # nontrinsic-cli
24
+
25
+ Nontrinsic CLI made with python and Nontrinsic API Wrapper
26
+
27
+ ## prerequisites
28
+
29
+ - python 3.10 (3.12+ recommended)
30
+
31
+ ## install
32
+
33
+ `pip install nontrinsic-cli`
34
+
35
+ ## usage
36
+
37
+ ### set up a base_url of a nontrinsic instance
38
+
39
+ ```bash
40
+ nontrinsic-cli base_url "https://nontrinsic.linerly.xyz"
41
+ ```
42
+
43
+ ### view version
44
+
45
+ ```bash
46
+ nontrinsic-cli version
47
+ nontrinsic-cli ver
48
+ ```
49
+
50
+ ### view a nonsense
51
+
52
+ ```bash
53
+ nontrinsic-cli nonsense
54
+ nontrinsic-cli nonsense <uuid>
55
+
56
+ nontrinsic-cli view ...
57
+ ```
@@ -0,0 +1,35 @@
1
+ # nontrinsic-cli
2
+
3
+ Nontrinsic CLI made with python and Nontrinsic API Wrapper
4
+
5
+ ## prerequisites
6
+
7
+ - python 3.10 (3.12+ recommended)
8
+
9
+ ## install
10
+
11
+ `pip install nontrinsic-cli`
12
+
13
+ ## usage
14
+
15
+ ### set up a base_url of a nontrinsic instance
16
+
17
+ ```bash
18
+ nontrinsic-cli base_url "https://nontrinsic.linerly.xyz"
19
+ ```
20
+
21
+ ### view version
22
+
23
+ ```bash
24
+ nontrinsic-cli version
25
+ nontrinsic-cli ver
26
+ ```
27
+
28
+ ### view a nonsense
29
+
30
+ ```bash
31
+ nontrinsic-cli nonsense
32
+ nontrinsic-cli nonsense <uuid>
33
+
34
+ nontrinsic-cli view ...
35
+ ```
@@ -0,0 +1,38 @@
1
+ [build-system]
2
+ requires = ["setuptools >= 77.0.3", "requests >= 2.30", "nontrinsic"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "nontrinsic-cli"
7
+ authors = [
8
+ { name = "maxie" }
9
+ ]
10
+ description = "EepyFileServer API CLI written in Python"
11
+ readme = "README.md"
12
+ requires-python = ">=3.10"
13
+ dependencies = [
14
+ "requests >= 2.30",
15
+ "nontrinsic"
16
+ ]
17
+ classifiers = [
18
+ "Programming Language :: Python :: 3",
19
+ "Programming Language :: Python :: 3.10",
20
+ "Programming Language :: Python :: 3.11",
21
+ "Programming Language :: Python :: 3.12",
22
+ "Programming Language :: Python :: 3.13",
23
+ "Programming Language :: Python :: 3.14",
24
+ "Operating System :: POSIX :: Linux"
25
+ ]
26
+ license = "MIT"
27
+ license-files = ["LICEN[CS]E*"]
28
+ dynamic = ["version"]
29
+
30
+ [tool.setuptools.dynamic]
31
+ version = { attr = "nontrinsic_cli.__version__" }
32
+
33
+ [project.urls]
34
+ Homepage = "https://codeberg.org/maxeepy/eepyfileserver-cli"
35
+ Issues = "https://codeberg.org/maxeepy/eepyfileserver-cli/issues"
36
+
37
+ [project.scripts]
38
+ nontrinsic-cli = "nontrinsic_cli.cli:main"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1 @@
1
+ __version__ = "0.0.1"
@@ -0,0 +1,73 @@
1
+ from . import __version__ as version
2
+ from nontrinsic import __version__ as wrapper_version
3
+ from nontrinsic import Nontrinsic, process_variables
4
+ from argparse import ArgumentParser
5
+ from datetime import datetime, UTC
6
+ import os
7
+ import json
8
+ import sys
9
+
10
+ CONFIG_PATH = os.path.expanduser("~/.nontrinsic-cli_config.json")
11
+ if os.path.exists(os.path.expanduser("~/.config/")):
12
+ CONFIG_PATH = os.path.expanduser("~/.config/nontrinsic-cli.json")
13
+
14
+ def get_conf():
15
+ conf = None
16
+
17
+ if os.path.exists(CONFIG_PATH):
18
+ with open(CONFIG_PATH, "r") as file:
19
+ conf = json.load(file)
20
+
21
+ return conf
22
+
23
+ def init_api():
24
+ conf = get_conf()
25
+
26
+ if conf is None:
27
+ print("Please add base url with 'nontrinsic-cli base_url <base_url>'")
28
+ sys.exit(1)
29
+
30
+ non = Nontrinsic()
31
+ return non
32
+
33
+ def baseurl(base_url, **__):
34
+ data = {"base_url": base_url}
35
+ with open(CONFIG_PATH, "w") as file:
36
+ json.dump(data, file)
37
+ print(f"Saved nontrinsic base url in {CONFIG_PATH}")
38
+
39
+ def ver(**__):
40
+ print(f"nontrinsic-cli: {version}")
41
+ print(f"nontrinsic: {wrapper_version}")
42
+
43
+ def view(nonsense_uuid = None, **__):
44
+ api = init_api()
45
+ nonsense = None
46
+ if nonsense_uuid is None:
47
+ nonsense = api.get_random_nonsense()
48
+ else:
49
+ nonsense = api.get_nonsense(nonsense_uuid)
50
+ print(process_variables(nonsense, app_name = "nontrinsic-cli"))
51
+ print()
52
+ print(f"Added at {datetime.strftime(datetime.fromtimestamp(nonsense.created_at, UTC),'%Y/%m/%d - %H:%M:%S UTC')}")
53
+
54
+ def main():
55
+ parser = ArgumentParser("nontrinsic-cli", description="nontrinsic cli tool for viewing nonsense in the terminal")
56
+ subparser = parser.add_subparsers()
57
+
58
+ baseurl_parser = subparser.add_parser("base_url", help="configure the base url of a nontrinsic instance to use")
59
+ baseurl_parser.add_argument("base_url", help="the base url of a nontrinsic instance")
60
+ baseurl_parser.set_defaults(func=baseurl)
61
+
62
+ version_parser = subparser.add_parser("version", help="view nontrinsic-cli and dependencies versions", aliases=["ver"])
63
+ version_parser.set_defaults(func=ver)
64
+
65
+ view_parser = subparser.add_parser("nonsense", help="view nonsense", aliases=["view"])
66
+ view_parser.add_argument("nonsense_uuid", nargs="?", help="the uuid of the nonsense to view, default is random")
67
+ view_parser.set_defaults(func=view)
68
+
69
+ args = parser.parse_args()
70
+ args.func(**vars(args))
71
+
72
+ if __name__ == "__main__":
73
+ main()
@@ -0,0 +1,57 @@
1
+ Metadata-Version: 2.4
2
+ Name: nontrinsic-cli
3
+ Version: 0.0.1
4
+ Summary: EepyFileServer API CLI written in Python
5
+ Author: maxie
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://codeberg.org/maxeepy/eepyfileserver-cli
8
+ Project-URL: Issues, https://codeberg.org/maxeepy/eepyfileserver-cli/issues
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: 3.10
11
+ Classifier: Programming Language :: Python :: 3.11
12
+ Classifier: Programming Language :: Python :: 3.12
13
+ Classifier: Programming Language :: Python :: 3.13
14
+ Classifier: Programming Language :: Python :: 3.14
15
+ Classifier: Operating System :: POSIX :: Linux
16
+ Requires-Python: >=3.10
17
+ Description-Content-Type: text/markdown
18
+ License-File: LICENSE
19
+ Requires-Dist: requests>=2.30
20
+ Requires-Dist: nontrinsic
21
+ Dynamic: license-file
22
+
23
+ # nontrinsic-cli
24
+
25
+ Nontrinsic CLI made with python and Nontrinsic API Wrapper
26
+
27
+ ## prerequisites
28
+
29
+ - python 3.10 (3.12+ recommended)
30
+
31
+ ## install
32
+
33
+ `pip install nontrinsic-cli`
34
+
35
+ ## usage
36
+
37
+ ### set up a base_url of a nontrinsic instance
38
+
39
+ ```bash
40
+ nontrinsic-cli base_url "https://nontrinsic.linerly.xyz"
41
+ ```
42
+
43
+ ### view version
44
+
45
+ ```bash
46
+ nontrinsic-cli version
47
+ nontrinsic-cli ver
48
+ ```
49
+
50
+ ### view a nonsense
51
+
52
+ ```bash
53
+ nontrinsic-cli nonsense
54
+ nontrinsic-cli nonsense <uuid>
55
+
56
+ nontrinsic-cli view ...
57
+ ```
@@ -0,0 +1,11 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ src/nontrinsic_cli/__init__.py
5
+ src/nontrinsic_cli/cli.py
6
+ src/nontrinsic_cli.egg-info/PKG-INFO
7
+ src/nontrinsic_cli.egg-info/SOURCES.txt
8
+ src/nontrinsic_cli.egg-info/dependency_links.txt
9
+ src/nontrinsic_cli.egg-info/entry_points.txt
10
+ src/nontrinsic_cli.egg-info/requires.txt
11
+ src/nontrinsic_cli.egg-info/top_level.txt
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ nontrinsic-cli = nontrinsic_cli.cli:main
@@ -0,0 +1,2 @@
1
+ requests>=2.30
2
+ nontrinsic
@@ -0,0 +1 @@
1
+ nontrinsic_cli