machineconfig 4.96__py3-none-any.whl → 4.97__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.
Potentially problematic release.
This version of machineconfig might be problematic. Click here for more details.
- machineconfig/jobs/installer/custom/gh.py +2 -15
- machineconfig/jobs/installer/custom_dev/alacritty.py +41 -26
- machineconfig/jobs/installer/custom_dev/brave.py +42 -28
- machineconfig/jobs/installer/custom_dev/bypass_paywall.py +30 -19
- machineconfig/jobs/installer/custom_dev/code.py +29 -20
- machineconfig/jobs/installer/custom_dev/espanso.py +64 -41
- machineconfig/jobs/installer/custom_dev/goes.py +41 -36
- machineconfig/jobs/installer/custom_dev/lvim.py +49 -33
- machineconfig/jobs/installer/custom_dev/nerdfont.py +71 -47
- machineconfig/jobs/installer/custom_dev/nerfont_windows_helper.py +25 -10
- machineconfig/jobs/installer/custom_dev/redis.py +51 -33
- machineconfig/jobs/installer/installer_data.json +17 -0
- machineconfig/jobs/installer/package_groups.py +271 -102
- machineconfig/jobs/python/python_cargo_build_share.py +0 -1
- machineconfig/jobs/python/python_ve_symlink.py +23 -15
- machineconfig/jobs/python/vscode/api.py +16 -8
- machineconfig/jobs/python/vscode/sync_code.py +42 -27
- machineconfig/scripts/python/cloud_repo_sync.py +8 -4
- machineconfig/scripts/python/devops_devapps_install.py +34 -26
- machineconfig/scripts/python/helpers/repo_sync_helpers.py +4 -2
- machineconfig/scripts/python/interactive.py +24 -23
- machineconfig/scripts/python/mount_nfs.py +3 -6
- machineconfig/scripts/python/mount_ssh.py +3 -4
- machineconfig/scripts/python/sessions.py +10 -9
- machineconfig/scripts/python/start_slidev.py +14 -4
- machineconfig/setup_windows/wt_and_pwsh/set_wt_settings.py +36 -22
- machineconfig/utils/code.py +11 -2
- machineconfig/utils/installer.py +15 -9
- machineconfig/utils/path_extended.py +49 -7
- machineconfig/utils/ssh.py +22 -12
- machineconfig/utils/terminal.py +66 -92
- {machineconfig-4.96.dist-info → machineconfig-4.97.dist-info}/METADATA +1 -1
- {machineconfig-4.96.dist-info → machineconfig-4.97.dist-info}/RECORD +36 -36
- {machineconfig-4.96.dist-info → machineconfig-4.97.dist-info}/WHEEL +0 -0
- {machineconfig-4.96.dist-info → machineconfig-4.97.dist-info}/entry_points.txt +0 -0
- {machineconfig-4.96.dist-info → machineconfig-4.97.dist-info}/top_level.txt +0 -0
|
@@ -23,18 +23,7 @@ config_dict: InstallerData = {
|
|
|
23
23
|
"appName": "gh",
|
|
24
24
|
"repoURL": "https://github.com/cli/cli",
|
|
25
25
|
"doc": "GitHub CLI",
|
|
26
|
-
"fileNamePattern": {
|
|
27
|
-
"amd64": {
|
|
28
|
-
"windows": "gh_{version}_windows_amd64.msi",
|
|
29
|
-
"linux": "gh_{version}_linux_amd64.deb",
|
|
30
|
-
"macos": "gh_{version}_macOS_amd64.pkg",
|
|
31
|
-
},
|
|
32
|
-
"arm64": {
|
|
33
|
-
"windows": "gh_{version}_windows_arm64.msi",
|
|
34
|
-
"linux": "gh_{version}_linux_arm64.deb",
|
|
35
|
-
"macos": "gh_{version}_macOS_arm64.pkg",
|
|
36
|
-
},
|
|
37
|
-
},
|
|
26
|
+
"fileNamePattern": {"amd64": {"windows": "gh_{version}_windows_amd64.msi", "linux": "gh_{version}_linux_amd64.deb", "macos": "gh_{version}_macOS_amd64.pkg"}, "arm64": {"windows": "gh_{version}_windows_arm64.msi", "linux": "gh_{version}_linux_arm64.deb", "macos": "gh_{version}_macOS_arm64.pkg"}},
|
|
38
27
|
}
|
|
39
28
|
|
|
40
29
|
|
|
@@ -49,9 +38,7 @@ def main(version: Optional[str]):
|
|
|
49
38
|
|
|
50
39
|
_ = version
|
|
51
40
|
inst = Installer(installer_data=config_dict)
|
|
52
|
-
print("""
|
|
53
|
-
📦 INSTALLATION | Installing GitHub CLI base package...
|
|
54
|
-
""")
|
|
41
|
+
print("""📦 INSTALLATION | Installing GitHub CLI base package...""")
|
|
55
42
|
inst.install(version=version)
|
|
56
43
|
|
|
57
44
|
print(f"""
|
|
@@ -3,25 +3,30 @@
|
|
|
3
3
|
import platform
|
|
4
4
|
import subprocess
|
|
5
5
|
from typing import Optional
|
|
6
|
+
from rich import box
|
|
7
|
+
from rich.console import Console
|
|
8
|
+
from rich.panel import Panel
|
|
6
9
|
from machineconfig.utils.schemas.installer.installer_types import InstallerData
|
|
7
10
|
|
|
8
11
|
|
|
9
12
|
# config_dict: InstallerData = {"appName": "Alacritty", "repoURL": "CMD", "doc": "Terminal Console"}
|
|
10
13
|
|
|
11
14
|
|
|
12
|
-
def main(installer_data: InstallerData, version: Optional[str]):
|
|
15
|
+
def main(installer_data: InstallerData, version: Optional[str]) -> None:
|
|
16
|
+
console = Console()
|
|
13
17
|
_ = installer_data
|
|
14
|
-
print(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
console.print(
|
|
19
|
+
Panel.fit(
|
|
20
|
+
"\n".join([f"💻 Platform: {platform.system()}", f"🔄 Version: {'latest' if version is None else version}"]),
|
|
21
|
+
title="🖥️ Alacritty Installer",
|
|
22
|
+
border_style="cyan",
|
|
23
|
+
box=box.ROUNDED,
|
|
24
|
+
)
|
|
25
|
+
)
|
|
21
26
|
|
|
22
27
|
_ = version
|
|
23
28
|
if platform.system() == "Windows":
|
|
24
|
-
print("🪟 Installing Alacritty on Windows using Cargo...")
|
|
29
|
+
console.print("🪟 Installing Alacritty on Windows using Cargo...", style="bold")
|
|
25
30
|
program = """
|
|
26
31
|
|
|
27
32
|
cargo install alacritty
|
|
@@ -31,7 +36,7 @@ git clone https://github.com/alacritty/alacritty-theme ~/.config/alacritty/theme
|
|
|
31
36
|
"""
|
|
32
37
|
elif platform.system() in ["Linux", "Darwin"]:
|
|
33
38
|
system_name = "Linux" if platform.system() == "Linux" else "macOS"
|
|
34
|
-
print(f"🐧 Installing Alacritty on {system_name} using Cargo...")
|
|
39
|
+
console.print(f"🐧 Installing Alacritty on {system_name} using Cargo...", style="bold")
|
|
35
40
|
program = """
|
|
36
41
|
|
|
37
42
|
|
|
@@ -42,28 +47,38 @@ git clone https://github.com/alacritty/alacritty-theme ~/.config/alacritty/theme
|
|
|
42
47
|
"""
|
|
43
48
|
else:
|
|
44
49
|
error_msg = f"Unsupported platform: {platform.system()}"
|
|
45
|
-
print(
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
""
|
|
50
|
+
console.print(
|
|
51
|
+
Panel.fit(
|
|
52
|
+
"\n".join([error_msg]),
|
|
53
|
+
title="❌ Error",
|
|
54
|
+
subtitle="⚠️ Unsupported platform",
|
|
55
|
+
border_style="red",
|
|
56
|
+
box=box.ROUNDED,
|
|
57
|
+
)
|
|
58
|
+
)
|
|
50
59
|
raise NotImplementedError(error_msg)
|
|
51
60
|
|
|
52
|
-
print(
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
61
|
+
console.print(
|
|
62
|
+
Panel.fit(
|
|
63
|
+
"\n".join(
|
|
64
|
+
[
|
|
65
|
+
"1️⃣ Install Alacritty using Cargo",
|
|
66
|
+
"2️⃣ Create config directories",
|
|
67
|
+
"3️⃣ Clone theme repository",
|
|
68
|
+
]
|
|
69
|
+
),
|
|
70
|
+
title="ℹ️ Installation Plan",
|
|
71
|
+
border_style="magenta",
|
|
72
|
+
box=box.ROUNDED,
|
|
73
|
+
)
|
|
74
|
+
)
|
|
60
75
|
|
|
61
|
-
print("🔄 EXECUTING | Running Alacritty installation...")
|
|
76
|
+
console.print("🔄 EXECUTING | Running Alacritty installation...", style="bold yellow")
|
|
62
77
|
try:
|
|
63
78
|
subprocess.run(program, shell=True, text=True, check=True)
|
|
64
|
-
print("✅ Alacritty installation completed successfully")
|
|
79
|
+
console.print("✅ Alacritty installation completed successfully", style="bold green")
|
|
65
80
|
except subprocess.CalledProcessError as e:
|
|
66
|
-
print(f"❌ Installation failed with exit code {e.returncode}")
|
|
81
|
+
console.print(f"❌ Installation failed with exit code {e.returncode}", style="bold red")
|
|
67
82
|
raise
|
|
68
83
|
|
|
69
84
|
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
import platform
|
|
4
4
|
import subprocess
|
|
5
5
|
from typing import Optional
|
|
6
|
-
|
|
6
|
+
from rich import box
|
|
7
|
+
from rich.console import Console
|
|
8
|
+
from rich.panel import Panel
|
|
7
9
|
from machineconfig.utils.schemas.installer.installer_types import InstallerData
|
|
8
10
|
|
|
9
11
|
|
|
@@ -14,19 +16,21 @@ from machineconfig.utils.schemas.installer.installer_types import InstallerData
|
|
|
14
16
|
# }
|
|
15
17
|
|
|
16
18
|
|
|
17
|
-
def main(installer_data: InstallerData, version: Optional[str]):
|
|
19
|
+
def main(installer_data: InstallerData, version: Optional[str]) -> None:
|
|
20
|
+
console = Console()
|
|
18
21
|
_ = installer_data
|
|
19
|
-
print(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
console.print(
|
|
23
|
+
Panel.fit(
|
|
24
|
+
"\n".join([f"💻 Platform: {platform.system()}", f"🔄 Version: {'latest' if version is None else version}"]),
|
|
25
|
+
title="🦁 Brave Browser Installer",
|
|
26
|
+
border_style="orange1",
|
|
27
|
+
box=box.ROUNDED,
|
|
28
|
+
)
|
|
29
|
+
)
|
|
26
30
|
|
|
27
31
|
_ = version
|
|
28
32
|
if platform.system() == "Windows":
|
|
29
|
-
print("🪟 Installing Brave Browser on Windows using winget...")
|
|
33
|
+
console.print("🪟 Installing Brave Browser on Windows using winget...", style="bold")
|
|
30
34
|
program = """
|
|
31
35
|
|
|
32
36
|
winget install --Name "Brave Browser" --Id Brave.Brave --source winget --accept-package-agreements --accept-source-agreements
|
|
@@ -34,7 +38,7 @@ winget install --Name "Brave Browser" --Id Brave.Brave --source winget --accept-
|
|
|
34
38
|
"""
|
|
35
39
|
elif platform.system() in ["Linux", "Darwin"]:
|
|
36
40
|
system_name = "Linux" if platform.system() == "Linux" else "macOS"
|
|
37
|
-
print(f"🐧 Installing Brave Browser on {system_name}...")
|
|
41
|
+
console.print(f"🐧 Installing Brave Browser on {system_name}...", style="bold")
|
|
38
42
|
import machineconfig.jobs.installer as module
|
|
39
43
|
from pathlib import Path
|
|
40
44
|
|
|
@@ -44,29 +48,39 @@ winget install --Name "Brave Browser" --Id Brave.Brave --source winget --accept-
|
|
|
44
48
|
program = "brew install --cask brave-browser"
|
|
45
49
|
else:
|
|
46
50
|
error_msg = f"Unsupported platform: {platform.system()}"
|
|
47
|
-
print(
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
""
|
|
51
|
+
console.print(
|
|
52
|
+
Panel.fit(
|
|
53
|
+
"\n".join([error_msg]),
|
|
54
|
+
title="❌ Error",
|
|
55
|
+
subtitle="⚠️ Unsupported platform",
|
|
56
|
+
border_style="red",
|
|
57
|
+
box=box.ROUNDED,
|
|
58
|
+
)
|
|
59
|
+
)
|
|
52
60
|
raise NotImplementedError(error_msg)
|
|
53
61
|
|
|
54
|
-
print(
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
62
|
+
console.print(
|
|
63
|
+
Panel.fit(
|
|
64
|
+
"\n".join(
|
|
65
|
+
[
|
|
66
|
+
"🔒 Built-in ad blocking",
|
|
67
|
+
"🛡️ Privacy-focused browsing",
|
|
68
|
+
"💨 Faster page loading",
|
|
69
|
+
"🪙 Optional crypto rewards",
|
|
70
|
+
]
|
|
71
|
+
),
|
|
72
|
+
title="ℹ️ Brave Browser Features",
|
|
73
|
+
border_style="magenta",
|
|
74
|
+
box=box.ROUNDED,
|
|
75
|
+
)
|
|
76
|
+
)
|
|
63
77
|
|
|
64
|
-
print("🔄 EXECUTING | Running Brave Browser installation...")
|
|
78
|
+
console.print("🔄 EXECUTING | Running Brave Browser installation...", style="bold yellow")
|
|
65
79
|
try:
|
|
66
80
|
subprocess.run(program, shell=True, text=True, check=True)
|
|
67
|
-
print("✅ Brave Browser installation completed successfully")
|
|
81
|
+
console.print("✅ Brave Browser installation completed successfully", style="bold green")
|
|
68
82
|
except subprocess.CalledProcessError as e:
|
|
69
|
-
print(f"❌ Installation failed with exit code {e.returncode}")
|
|
83
|
+
console.print(f"❌ Installation failed with exit code {e.returncode}", style="bold red")
|
|
70
84
|
raise
|
|
71
85
|
|
|
72
86
|
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
# from platform import system
|
|
4
4
|
from typing import Optional
|
|
5
|
+
from rich import box
|
|
6
|
+
from rich.console import Console
|
|
7
|
+
from rich.panel import Panel
|
|
5
8
|
from machineconfig.utils.schemas.installer.installer_types import InstallerData
|
|
6
9
|
from machineconfig.utils.path_extended import PathExtended as PathExtended
|
|
7
10
|
|
|
@@ -13,33 +16,41 @@ from machineconfig.utils.path_extended import PathExtended as PathExtended
|
|
|
13
16
|
# }
|
|
14
17
|
|
|
15
18
|
|
|
16
|
-
def main(installer_data: InstallerData, version: Optional[str] = None):
|
|
19
|
+
def main(installer_data: InstallerData, version: Optional[str] = None) -> str:
|
|
20
|
+
console = Console()
|
|
17
21
|
_ = installer_data
|
|
18
|
-
print(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
console.print(
|
|
23
|
+
Panel.fit(
|
|
24
|
+
"\n".join([f"🔄 Version: {'latest' if version is None else version}"]),
|
|
25
|
+
title="🔓 Bypass Paywall Installer",
|
|
26
|
+
border_style="cyan",
|
|
27
|
+
box=box.ROUNDED,
|
|
28
|
+
)
|
|
29
|
+
)
|
|
24
30
|
|
|
25
31
|
_ = version
|
|
26
|
-
# see remove paywalls and enhance YT experience by Chris Titus
|
|
27
32
|
folder = r"C:\\"
|
|
28
33
|
|
|
29
|
-
print("📥 Downloading extension from GitHub repository...")
|
|
34
|
+
console.print("📥 Downloading extension from GitHub repository...", style="bold")
|
|
30
35
|
PathExtended("https://github.com/iamadamdev/bypass-paywalls-chrome/archive/master.zip").download().unzip(folder=folder, content=True)
|
|
31
36
|
extension_folder = PathExtended(folder).joinpath("bypass-paywalls-chrome-master")
|
|
32
37
|
|
|
33
|
-
print(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
console.print(
|
|
39
|
+
Panel.fit(
|
|
40
|
+
"\n".join(
|
|
41
|
+
[
|
|
42
|
+
f"📂 Location: {extension_folder}",
|
|
43
|
+
"ℹ️ Next steps:",
|
|
44
|
+
"1️⃣ Open Chrome and navigate to chrome://extensions",
|
|
45
|
+
"2️⃣ Enable Developer Mode (toggle in top right)",
|
|
46
|
+
"3️⃣ Click 'Load unpacked' and select the extension folder",
|
|
47
|
+
]
|
|
48
|
+
),
|
|
49
|
+
title="✅ Extension Ready",
|
|
50
|
+
border_style="green",
|
|
51
|
+
box=box.ROUNDED,
|
|
52
|
+
)
|
|
53
|
+
)
|
|
43
54
|
|
|
44
55
|
return ""
|
|
45
56
|
|
|
@@ -3,47 +3,56 @@
|
|
|
3
3
|
from typing import Optional
|
|
4
4
|
import platform
|
|
5
5
|
import subprocess
|
|
6
|
+
from rich import box
|
|
7
|
+
from rich.console import Console
|
|
8
|
+
from rich.panel import Panel
|
|
6
9
|
from machineconfig.utils.schemas.installer.installer_types import InstallerData
|
|
7
10
|
|
|
8
11
|
|
|
9
|
-
def main(installer_data: InstallerData, version: Optional[str] = None):
|
|
12
|
+
def main(installer_data: InstallerData, version: Optional[str] = None) -> None:
|
|
13
|
+
console = Console()
|
|
10
14
|
_ = installer_data
|
|
11
|
-
print(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
console.print(
|
|
16
|
+
Panel.fit(
|
|
17
|
+
"\n".join([f"🖥️ Platform: {platform.system()}", f"🔄 Version: {'latest' if version is None else version}"]),
|
|
18
|
+
title="💻 VS Code Installer",
|
|
19
|
+
border_style="blue",
|
|
20
|
+
box=box.ROUNDED,
|
|
21
|
+
)
|
|
22
|
+
)
|
|
18
23
|
|
|
19
24
|
if platform.system() == "Linux":
|
|
20
|
-
print("🐧 Installing VS Code on Linux using official script...")
|
|
25
|
+
console.print("🐧 Installing VS Code on Linux using official script...", style="bold")
|
|
21
26
|
import machineconfig.jobs.installer as module
|
|
22
27
|
from pathlib import Path
|
|
23
28
|
|
|
24
29
|
install_script = Path(module.__file__).parent.joinpath("linux_scripts/vscode.sh").read_text(encoding="utf-8")
|
|
25
30
|
elif platform.system() == "Darwin":
|
|
26
|
-
print("🍎 Installing VS Code on macOS using Homebrew...")
|
|
31
|
+
console.print("🍎 Installing VS Code on macOS using Homebrew...", style="bold")
|
|
27
32
|
install_script = """brew install --cask visual-studio-code"""
|
|
28
33
|
elif platform.system() == "Windows":
|
|
29
|
-
print("🪟 Installing VS Code on Windows using winget...")
|
|
34
|
+
console.print("🪟 Installing VS Code on Windows using winget...", style="bold")
|
|
30
35
|
install_script = """winget install --no-upgrade --name "Microsoft Visual Studio Code" --Id "Microsoft.VisualStudioCode" --source winget --scope user --accept-package-agreements --accept-source-agreements"""
|
|
31
36
|
else:
|
|
32
37
|
error_msg = f"Unsupported platform: {platform.system()}"
|
|
33
|
-
print(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
""
|
|
38
|
+
console.print(
|
|
39
|
+
Panel.fit(
|
|
40
|
+
"\n".join([error_msg]),
|
|
41
|
+
title="❌ Error",
|
|
42
|
+
subtitle="⚠️ Unsupported platform",
|
|
43
|
+
border_style="red",
|
|
44
|
+
box=box.ROUNDED,
|
|
45
|
+
)
|
|
46
|
+
)
|
|
38
47
|
raise NotImplementedError(error_msg)
|
|
39
48
|
_ = version
|
|
40
|
-
|
|
41
|
-
print("🔄 EXECUTING | Running VS Code installation...")
|
|
49
|
+
|
|
50
|
+
console.print("🔄 EXECUTING | Running VS Code installation...", style="bold yellow")
|
|
42
51
|
try:
|
|
43
52
|
subprocess.run(install_script, shell=True, text=True, check=True)
|
|
44
|
-
print("✅ VS Code installation completed successfully")
|
|
53
|
+
console.print("✅ VS Code installation completed successfully", style="bold green")
|
|
45
54
|
except subprocess.CalledProcessError as e:
|
|
46
|
-
print(f"❌ Installation failed with exit code {e.returncode}")
|
|
55
|
+
console.print(f"❌ Installation failed with exit code {e.returncode}", style="bold red")
|
|
47
56
|
raise
|
|
48
57
|
|
|
49
58
|
|
|
@@ -5,6 +5,9 @@ https://github.com/espanso/espanso
|
|
|
5
5
|
|
|
6
6
|
from typing import Optional
|
|
7
7
|
import subprocess
|
|
8
|
+
from rich import box
|
|
9
|
+
from rich.console import Console
|
|
10
|
+
from rich.panel import Panel
|
|
8
11
|
from machineconfig.utils.schemas.installer.installer_types import InstallerData
|
|
9
12
|
|
|
10
13
|
# config_dict: InstallerData = {
|
|
@@ -13,57 +16,71 @@ from machineconfig.utils.schemas.installer.installer_types import InstallerData
|
|
|
13
16
|
# "doc": "A text expander.",
|
|
14
17
|
# }
|
|
15
18
|
|
|
16
|
-
|
|
17
|
-
|
|
19
|
+
def main(installer_data: InstallerData, version: Optional[str]) -> None:
|
|
20
|
+
console = Console()
|
|
18
21
|
_ = installer_data
|
|
19
|
-
print(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
console.print(
|
|
23
|
+
Panel.fit(
|
|
24
|
+
"\n".join(
|
|
25
|
+
[
|
|
26
|
+
f"🔄 Version: {'latest' if version is None else version}",
|
|
27
|
+
"🔗 Source: https://github.com/espanso/espanso",
|
|
28
|
+
]
|
|
29
|
+
),
|
|
30
|
+
title="⚡ Espanso Installer",
|
|
31
|
+
border_style="yellow",
|
|
32
|
+
box=box.ROUNDED,
|
|
33
|
+
)
|
|
34
|
+
)
|
|
26
35
|
|
|
27
36
|
_ = version
|
|
28
37
|
import platform
|
|
29
38
|
|
|
30
39
|
installer_data["repoURL"] = "https://github.com/espanso/espanso"
|
|
31
40
|
if platform.system() == "Windows":
|
|
32
|
-
print("🪟 Installing Espanso on Windows...")
|
|
41
|
+
console.print("🪟 Installing Espanso on Windows...", style="bold")
|
|
33
42
|
elif platform.system() in ["Linux", "Darwin"]:
|
|
34
43
|
if platform.system() == "Linux":
|
|
35
44
|
import os
|
|
36
45
|
|
|
37
46
|
env = os.environ["XDG_SESSION_TYPE"]
|
|
38
47
|
if env == "wayland":
|
|
39
|
-
print(
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
48
|
+
console.print(
|
|
49
|
+
Panel.fit(
|
|
50
|
+
"\n".join(["Wayland detected", "📦 Using Wayland-specific package"]),
|
|
51
|
+
title="🖥️ Display Server",
|
|
52
|
+
border_style="cyan",
|
|
53
|
+
box=box.ROUNDED,
|
|
54
|
+
)
|
|
55
|
+
)
|
|
45
56
|
installer_data["fileNamePattern"]["amd64"]["linux"] = "espanso-debian-wayland-amd64.deb"
|
|
46
57
|
else:
|
|
47
|
-
print(
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
58
|
+
console.print(
|
|
59
|
+
Panel.fit(
|
|
60
|
+
"\n".join(["X11 detected", "📦 Using X11-specific package"]),
|
|
61
|
+
title="🖥️ Display Server",
|
|
62
|
+
border_style="cyan",
|
|
63
|
+
box=box.ROUNDED,
|
|
64
|
+
)
|
|
65
|
+
)
|
|
53
66
|
installer_data["fileNamePattern"]["amd64"]["linux"] = "espanso-debian-x11-amd64.deb"
|
|
54
67
|
else: # Darwin/macOS
|
|
55
|
-
print("🍎 Installing Espanso on macOS...")
|
|
68
|
+
console.print("🍎 Installing Espanso on macOS...", style="bold")
|
|
56
69
|
installer_data["fileNamePattern"]["amd64"]["macos"] = "Espanso.dmg"
|
|
57
70
|
else:
|
|
58
71
|
error_msg = f"Unsupported platform: {platform.system()}"
|
|
59
|
-
print(
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
""
|
|
72
|
+
console.print(
|
|
73
|
+
Panel.fit(
|
|
74
|
+
"\n".join([error_msg]),
|
|
75
|
+
title="❌ Error",
|
|
76
|
+
subtitle="⚠️ Unsupported platform",
|
|
77
|
+
border_style="red",
|
|
78
|
+
box=box.ROUNDED,
|
|
79
|
+
)
|
|
80
|
+
)
|
|
64
81
|
raise NotImplementedError(error_msg)
|
|
65
82
|
|
|
66
|
-
print("🚀 Installing Espanso using installer...")
|
|
83
|
+
console.print("🚀 Installing Espanso using installer...", style="bold yellow")
|
|
67
84
|
from machineconfig.utils.installer_utils.installer_class import Installer
|
|
68
85
|
|
|
69
86
|
installer = Installer(installer_data)
|
|
@@ -75,20 +92,26 @@ espanso start
|
|
|
75
92
|
espanso install actually-all-emojis
|
|
76
93
|
"""
|
|
77
94
|
|
|
78
|
-
print(
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
95
|
+
console.print(
|
|
96
|
+
Panel.fit(
|
|
97
|
+
"\n".join(
|
|
98
|
+
[
|
|
99
|
+
"📋 Post-installation steps:",
|
|
100
|
+
"1️⃣ Register Espanso as a service",
|
|
101
|
+
"2️⃣ Start the Espanso service",
|
|
102
|
+
"3️⃣ Install the emoji package",
|
|
103
|
+
]
|
|
104
|
+
),
|
|
105
|
+
title="✅ Espanso Installation Completed",
|
|
106
|
+
border_style="green",
|
|
107
|
+
box=box.ROUNDED,
|
|
108
|
+
)
|
|
109
|
+
)
|
|
87
110
|
|
|
88
|
-
print("🔄 EXECUTING | Running Espanso configuration...")
|
|
111
|
+
console.print("🔄 EXECUTING | Running Espanso configuration...", style="bold yellow")
|
|
89
112
|
try:
|
|
90
113
|
subprocess.run(config, shell=True, text=True, check=True)
|
|
91
|
-
print("✅ Espanso configuration completed successfully")
|
|
114
|
+
console.print("✅ Espanso configuration completed successfully", style="bold green")
|
|
92
115
|
except subprocess.CalledProcessError as e:
|
|
93
|
-
print(f"❌ Configuration failed with exit code {e.returncode}")
|
|
116
|
+
console.print(f"❌ Configuration failed with exit code {e.returncode}", style="bold red")
|
|
94
117
|
raise
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
"""natural language to API
|
|
2
|
-
https://github.com/
|
|
3
|
-
try:
|
|
4
|
-
subprocess.run(install_script, shell=True, text=True, check=True)
|
|
5
|
-
print("✅ Go installation completed successfully")
|
|
6
|
-
except subprocess.CalledProcessError as e:
|
|
7
|
-
print(f"❌ Installation failed with exit code {e.returncode}")
|
|
8
|
-
raisel/gorilla
|
|
2
|
+
https://github.com/ShishirPatil/gorilla
|
|
9
3
|
"""
|
|
10
4
|
|
|
11
5
|
import subprocess
|
|
6
|
+
from rich import box
|
|
7
|
+
from rich.console import Console
|
|
8
|
+
from rich.panel import Panel
|
|
12
9
|
from machineconfig.utils.schemas.installer.installer_types import InstallerData
|
|
13
10
|
|
|
14
11
|
# config_dict: InstallerData = {
|
|
@@ -20,44 +17,52 @@ from machineconfig.utils.schemas.installer.installer_types import InstallerData
|
|
|
20
17
|
ve_name = "goex"
|
|
21
18
|
|
|
22
19
|
|
|
23
|
-
def main(installer_data: InstallerData):
|
|
20
|
+
def main(installer_data: InstallerData) -> None:
|
|
21
|
+
console = Console()
|
|
24
22
|
_ = installer_data
|
|
25
|
-
print(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
""
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
23
|
+
console.print(
|
|
24
|
+
Panel.fit(
|
|
25
|
+
"\n".join(
|
|
26
|
+
[
|
|
27
|
+
"Natural language to API converter",
|
|
28
|
+
"🌐 Source: https://github.com/ShishirPatil/gorilla",
|
|
29
|
+
f"📦 Virtual Environment: {ve_name}",
|
|
30
|
+
]
|
|
31
|
+
),
|
|
32
|
+
title="🦍 Gorilla Installer",
|
|
33
|
+
border_style="blue",
|
|
34
|
+
box=box.ROUNDED,
|
|
35
|
+
)
|
|
36
|
+
)
|
|
35
37
|
|
|
38
|
+
console.print("🔄 Preparing installation script...", style="bold")
|
|
39
|
+
install_script = """
|
|
36
40
|
cd ~/code/foreign
|
|
37
41
|
git clone https://github.com/ShishirPatil/gorilla --depth 1
|
|
38
42
|
cd gorilla/goex
|
|
39
43
|
uv sync
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
print(f"""
|
|
43
|
-
{"=" * 150}
|
|
44
|
-
📋 INSTALLATION STEPS:
|
|
45
|
-
1️⃣ Creating Python 3.13 virtual environment: {ve_name}
|
|
46
|
-
2️⃣ Cloning Gorilla repository to ~/code/foreign
|
|
47
|
-
3️⃣ Installing Gorilla in development mode
|
|
48
|
-
{"=" * 150}
|
|
44
|
+
"""
|
|
49
45
|
|
|
50
|
-
|
|
51
|
-
|
|
46
|
+
console.print(
|
|
47
|
+
Panel.fit(
|
|
48
|
+
"\n".join(
|
|
49
|
+
[
|
|
50
|
+
f"1️⃣ Create Python 3.13 virtual environment: {ve_name}",
|
|
51
|
+
"2️⃣ Clone Gorilla repository to ~/code/foreign",
|
|
52
|
+
"3️⃣ Install Gorilla in development mode",
|
|
53
|
+
]
|
|
54
|
+
),
|
|
55
|
+
title="📋 Installation Steps",
|
|
56
|
+
subtitle="✅ Installation script prepared successfully!",
|
|
57
|
+
border_style="magenta",
|
|
58
|
+
box=box.ROUNDED,
|
|
59
|
+
)
|
|
60
|
+
)
|
|
52
61
|
|
|
53
|
-
print("🔄 EXECUTING | Running Gorilla installation...")
|
|
62
|
+
console.print("🔄 EXECUTING | Running Gorilla installation...", style="bold yellow")
|
|
54
63
|
try:
|
|
55
64
|
subprocess.run(install_script, shell=True, text=True, check=True)
|
|
56
|
-
print("✅ Gorilla installation completed successfully")
|
|
65
|
+
console.print("✅ Gorilla installation completed successfully", style="bold green")
|
|
57
66
|
except subprocess.CalledProcessError as e:
|
|
58
|
-
print(f"❌ Installation failed with exit code {e.returncode}")
|
|
67
|
+
console.print(f"❌ Installation failed with exit code {e.returncode}", style="bold red")
|
|
59
68
|
raise
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
if __name__ == "__main__":
|
|
63
|
-
pass
|