gto-ssh 0.1.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.
gto/__init__.py ADDED
File without changes
gto/app.py ADDED
@@ -0,0 +1,55 @@
1
+ #!/usr/bin/env python3
2
+ import json
3
+ import subprocess
4
+ import sys
5
+ import shutil
6
+ from pathlib import Path
7
+
8
+ # Use a standard config path so it works for all users
9
+ DATA_FILE = Path.home() / ".config/gto.json"
10
+
11
+
12
+ def load_hosts():
13
+ DATA_FILE.parent.mkdir(parents=True, exist_ok=True)
14
+ if not DATA_FILE.exists():
15
+ return []
16
+ with open(DATA_FILE, "r") as f:
17
+ try:
18
+ return json.load(f)
19
+ except json.JSONDecodeError:
20
+ return []
21
+
22
+
23
+ def save_hosts(hosts):
24
+ with open(DATA_FILE, "w") as f:
25
+ json.dump(hosts, f, indent=2)
26
+
27
+
28
+ def run_config():
29
+ # Your existing config logic here...
30
+ pass
31
+
32
+
33
+ def run_selector(fav_mode=False):
34
+ # Your existing selector logic here...
35
+ pass
36
+
37
+
38
+ def main():
39
+ # System Dependency Check
40
+ if not shutil.which("gum"):
41
+ print(
42
+ "Error: 'gum' is not installed. Please install it from https://github.com/charmbracelet/gum"
43
+ )
44
+ sys.exit(1)
45
+
46
+ if len(sys.argv) > 1 and sys.argv[1] == "config":
47
+ run_config()
48
+ elif len(sys.argv) > 1 and sys.argv[1] == "--fav":
49
+ run_selector(fav_mode=True)
50
+ else:
51
+ run_selector()
52
+
53
+
54
+ if __name__ == "__main__":
55
+ main()
@@ -0,0 +1,5 @@
1
+ Metadata-Version: 2.4
2
+ Name: gto-ssh
3
+ Version: 0.1.0
4
+ Summary: Gum Transmission Operator
5
+ Author-email: Otakumob <wolfer.carter@gmail.com>
@@ -0,0 +1,7 @@
1
+ gto/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ gto/app.py,sha256=-NKfPHqMcX7V1OPnOhxUtOSnBw85zIfO9DmQDoU56ls,1192
3
+ gto_ssh-0.1.0.dist-info/METADATA,sha256=cgAqUVM-I2WUCtrOsKD2uiHvYbEKLE5_OC0g4fifgvw,135
4
+ gto_ssh-0.1.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
5
+ gto_ssh-0.1.0.dist-info/entry_points.txt,sha256=2RWZyKyKWl7NhDp9AeTOP6oLscVnBc8oZbsEhAaeFXc,37
6
+ gto_ssh-0.1.0.dist-info/top_level.txt,sha256=4cijBhOgsJnL_137qSVrB7lWxVvVlBgE03UKQopRDNI,4
7
+ gto_ssh-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (82.0.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ gto = gto.app:main
@@ -0,0 +1 @@
1
+ gto