machineconfig 2.0__py3-none-any.whl â 2.1__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/cluster/cloud_manager.py +0 -3
- machineconfig/cluster/data_transfer.py +0 -1
- machineconfig/cluster/file_manager.py +0 -1
- machineconfig/cluster/job_params.py +0 -3
- machineconfig/cluster/loader_runner.py +0 -3
- machineconfig/cluster/remote_machine.py +0 -1
- machineconfig/cluster/script_notify_upon_completion.py +0 -1
- machineconfig/cluster/sessions_managers/archive/create_zellij_template.py +3 -5
- machineconfig/cluster/sessions_managers/archive/session_managers.py +0 -1
- machineconfig/cluster/sessions_managers/enhanced_command_runner.py +17 -57
- machineconfig/cluster/sessions_managers/wt_local.py +36 -110
- machineconfig/cluster/sessions_managers/wt_local_manager.py +42 -112
- machineconfig/cluster/sessions_managers/wt_remote.py +23 -30
- machineconfig/cluster/sessions_managers/wt_remote_manager.py +20 -62
- machineconfig/cluster/sessions_managers/wt_utils/layout_generator.py +10 -15
- machineconfig/cluster/sessions_managers/wt_utils/process_monitor.py +27 -127
- machineconfig/cluster/sessions_managers/wt_utils/remote_executor.py +10 -43
- machineconfig/cluster/sessions_managers/wt_utils/session_manager.py +22 -101
- machineconfig/cluster/sessions_managers/wt_utils/status_reporter.py +11 -39
- machineconfig/cluster/sessions_managers/zellij_local.py +49 -102
- machineconfig/cluster/sessions_managers/zellij_local_manager.py +34 -78
- machineconfig/cluster/sessions_managers/zellij_remote.py +17 -24
- machineconfig/cluster/sessions_managers/zellij_remote_manager.py +7 -13
- machineconfig/cluster/sessions_managers/zellij_utils/example_usage.py +4 -2
- machineconfig/cluster/sessions_managers/zellij_utils/layout_generator.py +6 -6
- machineconfig/cluster/sessions_managers/zellij_utils/process_monitor.py +18 -88
- machineconfig/cluster/sessions_managers/zellij_utils/remote_executor.py +2 -6
- machineconfig/cluster/sessions_managers/zellij_utils/session_manager.py +12 -40
- machineconfig/cluster/sessions_managers/zellij_utils/status_reporter.py +3 -2
- machineconfig/cluster/templates/cli_click.py +0 -1
- machineconfig/cluster/templates/cli_gooey.py +0 -2
- machineconfig/cluster/templates/cli_trogon.py +0 -1
- machineconfig/cluster/templates/run_cloud.py +0 -1
- machineconfig/cluster/templates/run_cluster.py +0 -1
- machineconfig/cluster/templates/run_remote.py +0 -1
- machineconfig/cluster/templates/utils.py +26 -10
- machineconfig/jobs/__pycache__/__init__.cpython-313.pyc +0 -0
- machineconfig/jobs/linux/msc/cli_agents.sh +16 -0
- machineconfig/jobs/python/check_installations.py +1 -0
- machineconfig/jobs/python/create_bootable_media.py +0 -2
- machineconfig/jobs/python/python_ve_symlink.py +9 -11
- machineconfig/jobs/python/tasks.py +0 -1
- machineconfig/jobs/python/vscode/api.py +5 -5
- machineconfig/jobs/python/vscode/link_ve.py +13 -14
- machineconfig/jobs/python/vscode/select_interpreter.py +21 -22
- machineconfig/jobs/python/vscode/sync_code.py +9 -13
- machineconfig/jobs/python_custom_installers/__pycache__/__init__.cpython-313.pyc +0 -0
- machineconfig/jobs/python_custom_installers/archive/ngrok.py +13 -13
- machineconfig/jobs/python_custom_installers/dev/aider.py +7 -15
- machineconfig/jobs/python_custom_installers/dev/alacritty.py +9 -18
- machineconfig/jobs/python_custom_installers/dev/brave.py +10 -19
- machineconfig/jobs/python_custom_installers/dev/bypass_paywall.py +8 -15
- machineconfig/jobs/python_custom_installers/dev/code.py +14 -21
- machineconfig/jobs/python_custom_installers/dev/cursor.py +3 -14
- machineconfig/jobs/python_custom_installers/dev/docker_desktop.py +8 -7
- machineconfig/jobs/python_custom_installers/dev/espanso.py +15 -19
- machineconfig/jobs/python_custom_installers/dev/goes.py +5 -12
- machineconfig/jobs/python_custom_installers/dev/lvim.py +9 -17
- machineconfig/jobs/python_custom_installers/dev/nerdfont.py +12 -19
- machineconfig/jobs/python_custom_installers/dev/redis.py +12 -20
- machineconfig/jobs/python_custom_installers/dev/wezterm.py +12 -19
- machineconfig/jobs/python_custom_installers/dev/winget.py +5 -23
- machineconfig/jobs/python_custom_installers/docker.py +12 -21
- machineconfig/jobs/python_custom_installers/gh.py +11 -19
- machineconfig/jobs/python_custom_installers/hx.py +32 -16
- machineconfig/jobs/python_custom_installers/warp-cli.py +12 -20
- machineconfig/jobs/python_generic_installers/__pycache__/__init__.cpython-313.pyc +0 -0
- machineconfig/jobs/python_linux_installers/__pycache__/__init__.cpython-313.pyc +0 -0
- machineconfig/jobs/windows/archive/archive_pygraphviz.ps1 +1 -1
- machineconfig/jobs/windows/msc/cli_agents.bat +0 -0
- machineconfig/jobs/windows/msc/cli_agents.ps1 +0 -0
- machineconfig/jobs/windows/start_terminal.ps1 +1 -1
- machineconfig/profile/create.py +29 -22
- machineconfig/profile/create_hardlinks.py +26 -19
- machineconfig/profile/shell.py +51 -28
- machineconfig/scripts/__pycache__/__init__.cpython-313.pyc +0 -0
- machineconfig/scripts/cloud/init.sh +2 -2
- machineconfig/scripts/linux/checkout_versions +1 -1
- machineconfig/scripts/linux/choose_wezterm_theme +1 -1
- machineconfig/scripts/linux/cloud_copy +1 -1
- machineconfig/scripts/linux/cloud_manager +1 -1
- machineconfig/scripts/linux/cloud_mount +1 -1
- machineconfig/scripts/linux/cloud_repo_sync +1 -1
- machineconfig/scripts/linux/cloud_sync +1 -1
- machineconfig/scripts/linux/croshell +1 -1
- machineconfig/scripts/linux/devops +4 -6
- machineconfig/scripts/linux/fire +1 -1
- machineconfig/scripts/linux/fire_agents +3 -2
- machineconfig/scripts/linux/ftpx +1 -1
- machineconfig/scripts/linux/gh_models +1 -1
- machineconfig/scripts/linux/kill_process +1 -1
- machineconfig/scripts/linux/mcinit +1 -1
- machineconfig/scripts/linux/repos +1 -1
- machineconfig/scripts/linux/scheduler +1 -1
- machineconfig/scripts/linux/start_slidev +1 -1
- machineconfig/scripts/linux/start_terminals +1 -1
- machineconfig/scripts/linux/url2md +1 -1
- machineconfig/scripts/linux/warp-cli.sh +122 -0
- machineconfig/scripts/linux/wifi_conn +1 -1
- machineconfig/scripts/python/__pycache__/__init__.cpython-313.pyc +0 -0
- machineconfig/scripts/python/__pycache__/croshell.cpython-313.pyc +0 -0
- machineconfig/scripts/python/__pycache__/devops.cpython-313.pyc +0 -0
- machineconfig/scripts/python/__pycache__/devops_devapps_install.cpython-313.pyc +0 -0
- machineconfig/scripts/python/__pycache__/devops_update_repos.cpython-313.pyc +0 -0
- machineconfig/scripts/python/__pycache__/fire_jobs.cpython-313.pyc +0 -0
- machineconfig/scripts/python/ai/__init__.py +0 -0
- machineconfig/scripts/python/ai/__pycache__/__init__.cpython-313.pyc +0 -0
- machineconfig/scripts/python/ai/__pycache__/generate_files.cpython-313.pyc +0 -0
- machineconfig/scripts/python/ai/__pycache__/mcinit.cpython-313.pyc +0 -0
- machineconfig/scripts/python/ai/generate_files.py +84 -0
- machineconfig/scripts/python/ai/instructions/python/dev.instructions.md +2 -2
- machineconfig/scripts/python/ai/mcinit.py +7 -3
- machineconfig/scripts/python/ai/scripts/lint_and_type_check.sh +10 -5
- machineconfig/scripts/python/cloud_copy.py +1 -1
- machineconfig/scripts/python/cloud_mount.py +1 -1
- machineconfig/scripts/python/cloud_repo_sync.py +4 -4
- machineconfig/scripts/python/croshell.py +5 -3
- machineconfig/scripts/python/devops_add_identity.py +1 -1
- machineconfig/scripts/python/devops_add_ssh_key.py +1 -1
- machineconfig/scripts/python/devops_backup_retrieve.py +1 -1
- machineconfig/scripts/python/devops_update_repos.py +140 -52
- machineconfig/scripts/python/dotfile.py +1 -1
- machineconfig/scripts/python/fire_agents.py +28 -9
- machineconfig/scripts/python/fire_jobs.py +3 -4
- machineconfig/scripts/python/ftpx.py +2 -1
- machineconfig/scripts/python/helpers/__pycache__/__init__.cpython-313.pyc +0 -0
- machineconfig/scripts/python/helpers/__pycache__/helpers4.cpython-313.pyc +0 -0
- machineconfig/scripts/python/helpers/helpers2.py +2 -2
- machineconfig/scripts/python/helpers/helpers4.py +1 -2
- machineconfig/scripts/python/helpers/repo_sync_helpers.py +1 -1
- machineconfig/scripts/python/mount_nfs.py +1 -1
- machineconfig/scripts/python/mount_ssh.py +1 -1
- machineconfig/scripts/python/repos.py +1 -1
- machineconfig/scripts/python/start_slidev.py +1 -1
- machineconfig/scripts/python/wsl_windows_transfer.py +1 -1
- machineconfig/scripts/windows/checkout_version.ps1 +1 -3
- machineconfig/scripts/windows/choose_wezterm_theme.ps1 +1 -3
- machineconfig/scripts/windows/cloud_copy.ps1 +2 -6
- machineconfig/scripts/windows/cloud_manager.ps1 +1 -1
- machineconfig/scripts/windows/cloud_repo_sync.ps1 +1 -2
- machineconfig/scripts/windows/cloud_sync.ps1 +2 -2
- machineconfig/scripts/windows/croshell.ps1 +2 -2
- machineconfig/scripts/windows/devops.ps1 +1 -4
- machineconfig/scripts/windows/dotfile.ps1 +1 -3
- machineconfig/scripts/windows/fire.ps1 +1 -1
- machineconfig/scripts/windows/ftpx.ps1 +2 -2
- machineconfig/scripts/windows/gpt.ps1 +1 -1
- machineconfig/scripts/windows/kill_process.ps1 +1 -2
- machineconfig/scripts/windows/mcinit.ps1 +1 -1
- machineconfig/scripts/windows/mount_nfs.ps1 +1 -1
- machineconfig/scripts/windows/mount_ssh.ps1 +1 -1
- machineconfig/scripts/windows/pomodoro.ps1 +1 -1
- machineconfig/scripts/windows/py2exe.ps1 +1 -3
- machineconfig/scripts/windows/repos.ps1 +1 -1
- machineconfig/scripts/windows/scheduler.ps1 +1 -1
- machineconfig/scripts/windows/snapshot.ps1 +2 -2
- machineconfig/scripts/windows/start_slidev.ps1 +1 -1
- machineconfig/scripts/windows/start_terminals.ps1 +1 -1
- machineconfig/scripts/windows/wifi_conn.ps1 +1 -1
- machineconfig/scripts/windows/wsl_windows_transfer.ps1 +1 -3
- machineconfig/settings/lf/linux/lfrc +1 -1
- machineconfig/settings/linters/.ruff_cache/.gitignore +2 -0
- machineconfig/settings/linters/.ruff_cache/CACHEDIR.TAG +1 -0
- machineconfig/settings/lvim/windows/archive/config_additional.lua +1 -1
- machineconfig/settings/svim/linux/init.toml +1 -1
- machineconfig/settings/svim/windows/init.toml +1 -1
- machineconfig/setup_linux/web_shortcuts/croshell.sh +0 -54
- machineconfig/setup_linux/web_shortcuts/interactive.sh +6 -6
- machineconfig/setup_windows/web_shortcuts/all.ps1 +2 -2
- machineconfig/setup_windows/web_shortcuts/ascii_art.ps1 +1 -1
- machineconfig/setup_windows/web_shortcuts/croshell.ps1 +1 -1
- machineconfig/setup_windows/web_shortcuts/interactive.ps1 +5 -5
- machineconfig/setup_windows/wt_and_pwsh/install_fonts.ps1 +51 -15
- machineconfig/setup_windows/wt_and_pwsh/set_pwsh_theme.py +66 -12
- machineconfig/setup_windows/wt_and_pwsh/set_wt_settings.py +44 -36
- machineconfig/utils/ai/generate_file_checklist.py +8 -10
- machineconfig/utils/ai/url2md.py +4 -2
- machineconfig/utils/cloud/onedrive/setup_oauth.py +1 -0
- machineconfig/utils/cloud/onedrive/transaction.py +63 -98
- machineconfig/utils/code.py +60 -39
- machineconfig/utils/installer.py +27 -33
- machineconfig/utils/installer_utils/installer_abc.py +8 -7
- machineconfig/utils/installer_utils/installer_class.py +149 -70
- machineconfig/utils/links.py +22 -11
- machineconfig/utils/notifications.py +197 -0
- machineconfig/utils/options.py +29 -23
- machineconfig/utils/path.py +13 -6
- machineconfig/utils/path_reduced.py +485 -216
- machineconfig/utils/procs.py +47 -41
- machineconfig/utils/scheduling.py +0 -1
- machineconfig/utils/ssh.py +157 -76
- machineconfig/utils/terminal.py +82 -37
- machineconfig/utils/utils.py +12 -10
- machineconfig/utils/utils2.py +38 -48
- machineconfig/utils/utils5.py +183 -116
- machineconfig/utils/ve.py +9 -4
- {machineconfig-2.0.dist-info â machineconfig-2.1.dist-info}/METADATA +3 -2
- {machineconfig-2.0.dist-info â machineconfig-2.1.dist-info}/RECORD +200 -217
- machineconfig/jobs/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/jobs/python/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/jobs/python/__pycache__/python_ve_symlink.cpython-311.pyc +0 -0
- machineconfig/jobs/python/archive/python_tools.txt +0 -12
- machineconfig/jobs/python/vscode/__pycache__/select_interpreter.cpython-311.pyc +0 -0
- machineconfig/jobs/python_custom_installers/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/jobs/python_generic_installers/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/jobs/python_generic_installers/update.py +0 -3
- machineconfig/jobs/python_linux_installers/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/profile/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/profile/__pycache__/create.cpython-311.pyc +0 -0
- machineconfig/profile/__pycache__/shell.cpython-311.pyc +0 -0
- machineconfig/scripts/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/scripts/linux/activate_ve +0 -87
- machineconfig/scripts/python/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/cloud_copy.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/cloud_mount.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/cloud_sync.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/croshell.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/devops.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/devops_backup_retrieve.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/devops_devapps_install.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/devops_update_repos.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/fire_agents.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/fire_jobs.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/get_zellij_cmd.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/repos.cpython-311.pyc +0 -0
- machineconfig/scripts/python/ai/__pycache__/init.cpython-311.pyc +0 -0
- machineconfig/scripts/python/ai/__pycache__/mcinit.cpython-311.pyc +0 -0
- machineconfig/scripts/python/helpers/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/scripts/python/helpers/__pycache__/cloud_helpers.cpython-311.pyc +0 -0
- machineconfig/scripts/python/helpers/__pycache__/helpers2.cpython-311.pyc +0 -0
- machineconfig/scripts/python/helpers/__pycache__/helpers4.cpython-311.pyc +0 -0
- machineconfig/scripts/python/helpers/__pycache__/repo_sync_helpers.cpython-311.pyc +0 -0
- machineconfig/scripts/windows/activate_ve.ps1 +0 -54
- {machineconfig-2.0.dist-info â machineconfig-2.1.dist-info}/WHEEL +0 -0
- {machineconfig-2.0.dist-info â machineconfig-2.1.dist-info}/top_level.txt +0 -0
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
# """
|
|
3
2
|
# This module contains utility functions for the cluster module.
|
|
4
3
|
# """
|
|
@@ -8,7 +7,7 @@
|
|
|
8
7
|
|
|
9
8
|
# from machineconfig.cluster.remote_machine import WorkloadParams
|
|
10
9
|
from typing import Optional
|
|
11
|
-
from machineconfig.utils.path_reduced import
|
|
10
|
+
from machineconfig.utils.path_reduced import PathExtended, PLike
|
|
12
11
|
|
|
13
12
|
# def expensive_function(workload_params: WorkloadParams, sim_dict: Optional[dict[str, Any]] = None) -> P:
|
|
14
13
|
# import time
|
|
@@ -38,12 +37,25 @@ from machineconfig.utils.path_reduced import P, PLike
|
|
|
38
37
|
# return True
|
|
39
38
|
|
|
40
39
|
|
|
41
|
-
def to_cloud(
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
def to_cloud(
|
|
41
|
+
localpath: PLike,
|
|
42
|
+
cloud: str,
|
|
43
|
+
remotepath: Optional[PLike],
|
|
44
|
+
zip: bool = False,
|
|
45
|
+
encrypt: bool = False,
|
|
46
|
+
key: Optional[bytes] = None,
|
|
47
|
+
pwd: Optional[str] = None,
|
|
48
|
+
rel2home: bool = False,
|
|
49
|
+
strict: bool = True,
|
|
50
|
+
# obfuscate: bool = False,
|
|
51
|
+
share: bool = False,
|
|
52
|
+
verbose: bool = True,
|
|
53
|
+
os_specific: bool = False,
|
|
54
|
+
transfers: int = 10,
|
|
55
|
+
root: Optional[str] = "myhome",
|
|
56
|
+
) -> "PathExtended":
|
|
45
57
|
to_del = []
|
|
46
|
-
localpath =
|
|
58
|
+
localpath = PathExtended(localpath).expanduser().absolute() if not PathExtended(localpath).exists() else PathExtended(localpath)
|
|
47
59
|
if zip:
|
|
48
60
|
localpath = localpath.zip(inplace=False)
|
|
49
61
|
to_del.append(localpath)
|
|
@@ -52,19 +64,23 @@ def to_cloud(localpath: PLike, cloud: str, remotepath: Optional[PLike], zip: boo
|
|
|
52
64
|
to_del.append(localpath)
|
|
53
65
|
if remotepath is None:
|
|
54
66
|
rp = localpath.get_remote_path(root=root, os_specific=os_specific, rel2home=rel2home, strict=strict) # if rel2home else (P(root) / localpath if root is not None else localpath)
|
|
55
|
-
else:
|
|
67
|
+
else:
|
|
68
|
+
rp = PathExtended(remotepath)
|
|
56
69
|
|
|
57
70
|
from rclone_python import rclone
|
|
71
|
+
|
|
58
72
|
rclone.copy(localpath.as_posix(), f"{cloud}:{rp.as_posix()}", show_progress=True)
|
|
59
73
|
|
|
60
74
|
if share:
|
|
61
|
-
if verbose:
|
|
75
|
+
if verbose:
|
|
76
|
+
print("đ SHARING FILE")
|
|
62
77
|
tmp = rclone.link(f"{cloud}:{rp.as_posix()}")
|
|
63
|
-
return
|
|
78
|
+
return PathExtended(tmp)
|
|
64
79
|
return localpath
|
|
65
80
|
|
|
66
81
|
|
|
67
82
|
if __name__ == "__main__":
|
|
68
83
|
from pathlib import Path
|
|
84
|
+
|
|
69
85
|
localpath = Path.home().joinpath("Downloads", "exchangeInfo")
|
|
70
86
|
to_cloud(localpath, "odp", remotepath=None)
|
|
Binary file
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
npm install -g @google/gemini-cli
|
|
5
|
+
npm install -g @charmland/crush
|
|
6
|
+
npm install -g opencode-ai@latest
|
|
7
|
+
|
|
8
|
+
curl https://cursor.com/install -fsS | bash
|
|
9
|
+
|
|
10
|
+
cd $HOME/Downloads
|
|
11
|
+
curl --proto '=https' --tlsv1.2 -sSf "https://desktop-release.q.us-east-1.amazonaws.com/latest/q-x86_64-linux.zip" -o "q.zip"
|
|
12
|
+
unzip q.zip
|
|
13
|
+
./q/install.sh # goes to ~/.local/bin.
|
|
14
|
+
rm q.zip
|
|
15
|
+
rm -rfd q
|
|
16
|
+
|
|
@@ -1,31 +1,29 @@
|
|
|
1
|
-
"""Symlinks
|
|
2
|
-
"""
|
|
1
|
+
"""Symlinks"""
|
|
3
2
|
|
|
4
|
-
from machineconfig.utils.path_reduced import
|
|
3
|
+
from machineconfig.utils.path_reduced import PathExtended as PathExtended
|
|
5
4
|
# from machineconfig.utils.utils import display_options
|
|
6
5
|
|
|
7
6
|
|
|
8
7
|
def main():
|
|
9
8
|
print(f"""
|
|
10
|
-
{
|
|
9
|
+
{"=" * 150}
|
|
11
10
|
đ SYMLINK CREATOR | Create symlinks for virtual environments
|
|
12
|
-
{
|
|
11
|
+
{"=" * 150}
|
|
13
12
|
""")
|
|
14
13
|
target = PathExtended(input("đ¯ Symlink to which target? ")).expanduser().absolute()
|
|
15
14
|
source = input(f"đ Symlink from which source? [default to: CWD/{target.name}] ") or PathExtended.cwd().joinpath(target.name)
|
|
16
|
-
if isinstance(source, str):
|
|
17
|
-
|
|
18
|
-
# PathExtended('.gitignore').modify_text('venv', 'venv', replace_line=True)"
|
|
15
|
+
if isinstance(source, str):
|
|
16
|
+
source = PathExtended(source).expanduser().absolute()
|
|
19
17
|
source.symlink_to(target, overwrite=True)
|
|
20
18
|
print(f"""
|
|
21
|
-
{
|
|
19
|
+
{"=" * 150}
|
|
22
20
|
â
SUCCESS | Symlink created successfully
|
|
23
21
|
đ Source: {source}
|
|
24
22
|
đ¯ Target: {target}
|
|
25
|
-
{
|
|
23
|
+
{"=" * 150}
|
|
26
24
|
""")
|
|
27
25
|
return "echo 'đ Finished creating symlink.'"
|
|
28
26
|
|
|
29
27
|
|
|
30
|
-
if __name__ ==
|
|
28
|
+
if __name__ == "__main__":
|
|
31
29
|
pass
|
|
@@ -4,6 +4,7 @@ from machineconfig.utils.utils2 import randstr
|
|
|
4
4
|
|
|
5
5
|
def open_file_in_new_instance(file_path: str):
|
|
6
6
|
import git
|
|
7
|
+
|
|
7
8
|
repo = git.Repo(search_parent_directories=True)
|
|
8
9
|
repo_path = repo.working_tree_dir
|
|
9
10
|
# Ensure repo_path is not None before passing to Path
|
|
@@ -19,13 +20,10 @@ code --profile bitProfile --new-window {file_path}
|
|
|
19
20
|
from rich.console import Console
|
|
20
21
|
from rich.syntax import Syntax
|
|
21
22
|
from rich.panel import Panel
|
|
23
|
+
|
|
22
24
|
console = Console()
|
|
23
25
|
console.print(f"\n{'=' * 150}")
|
|
24
|
-
console.print(Panel(
|
|
25
|
-
Syntax(code, lexer="bash"),
|
|
26
|
-
title="đ VS CODE API | Opening file in new instance",
|
|
27
|
-
subtitle=f"đ {file_path}"
|
|
28
|
-
), style="bold blue")
|
|
26
|
+
console.print(Panel(Syntax(code, lexer="bash"), title="đ VS CODE API | Opening file in new instance", subtitle=f"đ {file_path}"), style="bold blue")
|
|
29
27
|
console.print(f"{'=' * 150}\n")
|
|
30
28
|
|
|
31
29
|
code_path = Path.home().joinpath(".config", "machingconfig", "vscode_api", "code_temp")
|
|
@@ -33,11 +31,13 @@ code --profile bitProfile --new-window {file_path}
|
|
|
33
31
|
code_path.write_text(code, encoding="utf-8")
|
|
34
32
|
code_path.chmod(0o755)
|
|
35
33
|
import subprocess
|
|
34
|
+
|
|
36
35
|
subprocess.run([str(code_path)], shell=True, check=True)
|
|
37
36
|
|
|
38
37
|
|
|
39
38
|
def main():
|
|
40
39
|
import argparse
|
|
40
|
+
|
|
41
41
|
parser = argparse.ArgumentParser(description="Open file in new vscode instance")
|
|
42
42
|
parser.add_argument("file_path", type=str, help="Path to the file to open")
|
|
43
43
|
args = parser.parse_args()
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
"""VScode task to set interpreter
|
|
2
|
-
"""
|
|
1
|
+
"""VScode task to set interpreter"""
|
|
3
2
|
|
|
4
3
|
# import os
|
|
5
4
|
# import json
|
|
@@ -10,51 +9,51 @@ import argparse
|
|
|
10
9
|
|
|
11
10
|
def select_interpreter(workspace_root: str):
|
|
12
11
|
print(f"""
|
|
13
|
-
{
|
|
12
|
+
{"=" * 150}
|
|
14
13
|
đ VSCODE VE LINKER | Linking virtual environment for VS Code
|
|
15
14
|
đ Workspace: {workspace_root}
|
|
16
|
-
{
|
|
15
|
+
{"=" * 150}
|
|
17
16
|
""")
|
|
18
17
|
|
|
19
|
-
path = Path(workspace_root).joinpath(
|
|
18
|
+
path = Path(workspace_root).joinpath(".ve_path")
|
|
20
19
|
|
|
21
20
|
if not path.exists():
|
|
22
21
|
print(f"""
|
|
23
|
-
{
|
|
22
|
+
{"â ī¸" * 20}
|
|
24
23
|
â ERROR | Could not find .ve_path file in workspace
|
|
25
24
|
đ Expected at: {path}
|
|
26
|
-
{
|
|
25
|
+
{"â ī¸" * 20}
|
|
27
26
|
""")
|
|
28
27
|
return
|
|
29
28
|
|
|
30
|
-
with open(path,
|
|
29
|
+
with open(path, "r", encoding="utf-8") as f:
|
|
31
30
|
ve_path = Path(f.read().strip()).expanduser()
|
|
32
31
|
|
|
33
32
|
venv_link = Path(workspace_root).joinpath(".venv")
|
|
34
33
|
|
|
35
34
|
if venv_link.exists() and not venv_link.is_symlink():
|
|
36
35
|
print(f"""
|
|
37
|
-
{
|
|
36
|
+
{"â ī¸" * 20}
|
|
38
37
|
â ERROR | .venv already exists and is not a symlink
|
|
39
38
|
đ Path: {venv_link}
|
|
40
|
-
{
|
|
39
|
+
{"â ī¸" * 20}
|
|
41
40
|
""")
|
|
42
41
|
return
|
|
43
42
|
|
|
44
43
|
venv_link.symlink_to(target=ve_path.expanduser().absolute())
|
|
45
44
|
|
|
46
45
|
print(f"""
|
|
47
|
-
{
|
|
46
|
+
{"=" * 150}
|
|
48
47
|
â
SUCCESS | Virtual environment linked successfully
|
|
49
48
|
đ Link: {venv_link}
|
|
50
49
|
đ¯ Target: {ve_path.expanduser().absolute()}
|
|
51
|
-
{
|
|
50
|
+
{"=" * 150}
|
|
52
51
|
""")
|
|
53
52
|
|
|
54
53
|
|
|
55
54
|
def main():
|
|
56
|
-
parser = argparse.ArgumentParser(description=
|
|
57
|
-
parser.add_argument(
|
|
55
|
+
parser = argparse.ArgumentParser(description="Link ve from repo to ve location.")
|
|
56
|
+
parser.add_argument("workspace_path", type=str, help="The workspace path")
|
|
58
57
|
|
|
59
58
|
args = parser.parse_args()
|
|
60
59
|
select_interpreter(args.workspace_path)
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
"""VScode task to set interpreter
|
|
2
|
-
"""
|
|
1
|
+
"""VScode task to set interpreter"""
|
|
3
2
|
|
|
4
3
|
# import os
|
|
5
4
|
# import json
|
|
@@ -12,39 +11,39 @@ import platform
|
|
|
12
11
|
|
|
13
12
|
def select_interpreter(workspace_root: str):
|
|
14
13
|
print(f"""
|
|
15
|
-
{
|
|
14
|
+
{"=" * 150}
|
|
16
15
|
đ PYTHON INTERPRETER | Setting up VS Code Python interpreter
|
|
17
16
|
đ Workspace: {workspace_root}
|
|
18
|
-
{
|
|
17
|
+
{"=" * 150}
|
|
19
18
|
""")
|
|
20
19
|
|
|
21
|
-
path = Path(workspace_root).joinpath(
|
|
20
|
+
path = Path(workspace_root).joinpath(".ve_path")
|
|
22
21
|
if not path.exists():
|
|
23
22
|
print(f"""
|
|
24
|
-
{
|
|
23
|
+
{"â ī¸" * 20}
|
|
25
24
|
â ERROR | Could not find .ve_path file in workspace
|
|
26
25
|
đ Expected at: {path}
|
|
27
|
-
{
|
|
26
|
+
{"â ī¸" * 20}
|
|
28
27
|
""")
|
|
29
28
|
return
|
|
30
29
|
|
|
31
|
-
with open(path,
|
|
30
|
+
with open(path, "r", encoding="utf-8") as f:
|
|
32
31
|
python_path = Path(f.read().strip()).expanduser()
|
|
33
32
|
|
|
34
33
|
print(f"đ Virtual environment path: {python_path}")
|
|
35
34
|
|
|
36
|
-
if platform.system() ==
|
|
37
|
-
python_path = python_path.joinpath(
|
|
38
|
-
elif platform.system() ==
|
|
39
|
-
python_path = python_path.joinpath(
|
|
40
|
-
elif platform.system() ==
|
|
41
|
-
python_path = python_path.joinpath(
|
|
35
|
+
if platform.system() == "Windows":
|
|
36
|
+
python_path = python_path.joinpath("Scripts", "python.exe")
|
|
37
|
+
elif platform.system() == "Linux":
|
|
38
|
+
python_path = python_path.joinpath("bin", "python")
|
|
39
|
+
elif platform.system() == "Darwin":
|
|
40
|
+
python_path = python_path.joinpath("bin", "python")
|
|
42
41
|
else:
|
|
43
42
|
error_msg = f"Unsupported platform: {platform.system()}"
|
|
44
43
|
print(f"""
|
|
45
|
-
{
|
|
44
|
+
{"â ī¸" * 20}
|
|
46
45
|
â ERROR | {error_msg}
|
|
47
|
-
{
|
|
46
|
+
{"â ī¸" * 20}
|
|
48
47
|
""")
|
|
49
48
|
raise NotImplementedError(error_msg)
|
|
50
49
|
|
|
@@ -53,7 +52,7 @@ def select_interpreter(workspace_root: str):
|
|
|
53
52
|
# tmp = os.getenv('APPDATA')
|
|
54
53
|
# assert tmp is not None
|
|
55
54
|
# settings_path = Path(tmp).joinpath('Code', 'User', 'settings.json')
|
|
56
|
-
work_space_settings = Path(workspace_root).joinpath(
|
|
55
|
+
work_space_settings = Path(workspace_root).joinpath(".vscode", "settings.json")
|
|
57
56
|
work_space_settings.parent.mkdir(parents=True, exist_ok=True)
|
|
58
57
|
if not work_space_settings.exists():
|
|
59
58
|
print(f"đ Creating new settings file: {work_space_settings}")
|
|
@@ -64,21 +63,21 @@ def select_interpreter(workspace_root: str):
|
|
|
64
63
|
print(f"đ Updating existing settings file: {work_space_settings}")
|
|
65
64
|
|
|
66
65
|
settings = read_json(work_space_settings)
|
|
67
|
-
settings[
|
|
66
|
+
settings["python.defaultInterpreterPath"] = str(python_path)
|
|
68
67
|
save_json(obj=settings, path=str(work_space_settings), indent=4)
|
|
69
68
|
|
|
70
69
|
print(f"""
|
|
71
|
-
{
|
|
70
|
+
{"=" * 150}
|
|
72
71
|
â
SUCCESS | Python interpreter configured successfully
|
|
73
72
|
đ Interpreter: {python_path}
|
|
74
73
|
đ Settings: {work_space_settings}
|
|
75
|
-
{
|
|
74
|
+
{"=" * 150}
|
|
76
75
|
""")
|
|
77
76
|
|
|
78
77
|
|
|
79
78
|
def main():
|
|
80
|
-
parser = argparse.ArgumentParser(description=
|
|
81
|
-
parser.add_argument(
|
|
79
|
+
parser = argparse.ArgumentParser(description="Set Python Interpretor in VSCode settings.")
|
|
80
|
+
parser.add_argument("workspace_path", type=str, help="The workspace path")
|
|
82
81
|
|
|
83
82
|
args = parser.parse_args()
|
|
84
83
|
select_interpreter(args.workspace_path)
|
|
@@ -7,10 +7,10 @@ config = read_ini(Path.home().joinpath(".ssh", "config"))
|
|
|
7
7
|
|
|
8
8
|
def sync_remote(machine_name: str):
|
|
9
9
|
print(f"""
|
|
10
|
-
{
|
|
10
|
+
{"=" * 150}
|
|
11
11
|
đ SYNC REMOTE | Initiating remote code synchronization
|
|
12
12
|
đĨī¸ Target machine: {machine_name}
|
|
13
|
-
{
|
|
13
|
+
{"=" * 150}
|
|
14
14
|
""")
|
|
15
15
|
|
|
16
16
|
# Handle config as a ConfigParser object
|
|
@@ -21,15 +21,15 @@ def sync_remote(machine_name: str):
|
|
|
21
21
|
if machine_config is None:
|
|
22
22
|
error_msg = f"Machine {machine_name} not found in SSH config."
|
|
23
23
|
print(f"""
|
|
24
|
-
{
|
|
24
|
+
{"â ī¸" * 20}
|
|
25
25
|
â ERROR | {error_msg}
|
|
26
|
-
{
|
|
26
|
+
{"â ī¸" * 20}
|
|
27
27
|
""")
|
|
28
28
|
raise ValueError(error_msg)
|
|
29
29
|
|
|
30
30
|
# this is template: code = """ssh -o "HostName=zgeby8zhe6ipftpad.alexsaffar.com" -o "User=alex" -o "ProxyCommand=cloudflared access ssh --hostname %h" -o "Port=443" -o "RequestTTY=yes" -o "RemoteCommand=bash ~/scripts/z_ls --attach; bash" tpadCF"""
|
|
31
31
|
code = f"""
|
|
32
|
-
ssh -o "HostName={machine_config[
|
|
32
|
+
ssh -o "HostName={machine_config["HostName"]}" -o "User={machine_config["User"]}" -o "ProxyCommand=cloudflared access ssh --hostname %h" -o "Port={machine_config["Port"]}" -o "RequestTTY=yes" -o "RemoteCommand=devops --which update; bash" {machine_name}
|
|
33
33
|
"""
|
|
34
34
|
from rich.console import Console
|
|
35
35
|
from rich.syntax import Syntax
|
|
@@ -37,11 +37,7 @@ ssh -o "HostName={machine_config['HostName']}" -o "User={machine_config['User']}
|
|
|
37
37
|
|
|
38
38
|
console = Console()
|
|
39
39
|
console.print(f"\n{'=' * 150}")
|
|
40
|
-
console.print(Panel(
|
|
41
|
-
Syntax(code, lexer="bash"),
|
|
42
|
-
title=f"đ SYNC COMMAND | Connecting to {machine_name}",
|
|
43
|
-
subtitle=f"đ Host: {machine_config['HostName']}"
|
|
44
|
-
), style="bold blue")
|
|
40
|
+
console.print(Panel(Syntax(code, lexer="bash"), title=f"đ SYNC COMMAND | Connecting to {machine_name}", subtitle=f"đ Host: {machine_config['HostName']}"), style="bold blue")
|
|
45
41
|
console.print(f"{'=' * 150}\n")
|
|
46
42
|
|
|
47
43
|
code_path = Path.home().joinpath(".config", "machingconfig", "vscode_api", "code_temp")
|
|
@@ -52,12 +48,12 @@ ssh -o "HostName={machine_config['HostName']}" -o "User={machine_config['User']}
|
|
|
52
48
|
print(f"đ Executing sync command for {machine_name}...")
|
|
53
49
|
|
|
54
50
|
import subprocess
|
|
51
|
+
|
|
55
52
|
subprocess.run([str(code_path)], shell=True, check=True)
|
|
56
53
|
|
|
57
54
|
print(f"""
|
|
58
|
-
{
|
|
55
|
+
{"=" * 150}
|
|
59
56
|
â
SUCCESS | Remote sync completed successfully
|
|
60
57
|
đĨī¸ Machine: {machine_name}
|
|
61
|
-
{
|
|
58
|
+
{"=" * 150}
|
|
62
59
|
""")
|
|
63
|
-
|
|
@@ -8,21 +8,21 @@ from typing import Optional
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
config_dict = {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
"repo_url": "CUSTOM",
|
|
12
|
+
"doc": "ngrok secure introspectable tunnels to localhost",
|
|
13
|
+
"filename_template_windows_amd_64": "ngrok-stable-windows-amd64.zip",
|
|
14
|
+
"filename_template_linux_amd_64": "ngrok-stable-linux-amd64.zip",
|
|
15
|
+
"strip_v": False,
|
|
16
|
+
"exe_name": "ngrok",
|
|
17
|
+
}
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
def main(version: Optional[str]):
|
|
21
21
|
print(f"""
|
|
22
|
-
{
|
|
22
|
+
{"=" * 150}
|
|
23
23
|
đ NGROK INSTALLER | Setting up secure tunnels to localhost
|
|
24
24
|
đģ Platform: {platform.system()}
|
|
25
|
-
{
|
|
25
|
+
{"=" * 150}
|
|
26
26
|
""")
|
|
27
27
|
|
|
28
28
|
_ = version
|
|
@@ -43,17 +43,17 @@ sudo nala update && sudo nala install ngrok
|
|
|
43
43
|
else:
|
|
44
44
|
error_msg = f"Unsupported platform: {platform.system()}"
|
|
45
45
|
print(f"""
|
|
46
|
-
{
|
|
46
|
+
{"â ī¸" * 20}
|
|
47
47
|
â ERROR | {error_msg}
|
|
48
|
-
{
|
|
48
|
+
{"â ī¸" * 20}
|
|
49
49
|
""")
|
|
50
50
|
raise NotImplementedError(error_msg)
|
|
51
51
|
|
|
52
52
|
print(f"""
|
|
53
|
-
{
|
|
53
|
+
{"=" * 150}
|
|
54
54
|
â ī¸ SECURITY WARNING | ngrok has been flagged by some antivirus engines
|
|
55
55
|
đĄī¸ Use at your own risk - flagged by 35% of antivirus engines
|
|
56
|
-
{
|
|
56
|
+
{"=" * 150}
|
|
57
57
|
""")
|
|
58
58
|
return program
|
|
59
59
|
|
|
@@ -1,37 +1,29 @@
|
|
|
1
1
|
from typing import Optional
|
|
2
2
|
import platform
|
|
3
3
|
|
|
4
|
-
config_dict = {
|
|
5
|
-
"repo_url": "CUSTOM",
|
|
6
|
-
"doc": "Aider Chat",
|
|
7
|
-
"filename_template_windows_amd_64": "aider-chat-{}.exe",
|
|
8
|
-
"filename_template_linux_amd_64": "aider-chat-{}.deb",
|
|
9
|
-
"strip_v": True,
|
|
10
|
-
"exe_name": "aider-chat"
|
|
11
|
-
}
|
|
4
|
+
config_dict = {"repo_url": "CUSTOM", "doc": "Aider Chat", "filename_template_windows_amd_64": "aider-chat-{}.exe", "filename_template_linux_amd_64": "aider-chat-{}.deb", "strip_v": True, "exe_name": "aider-chat"}
|
|
12
5
|
|
|
13
6
|
|
|
14
7
|
def main(version: Optional[str] = None):
|
|
15
8
|
print(f"""
|
|
16
|
-
{
|
|
9
|
+
{"=" * 150}
|
|
17
10
|
đ¤ AIDER INSTALLER | Installing AI code assistant
|
|
18
11
|
đģ Platform: {platform.system()}
|
|
19
|
-
đ Version: {
|
|
20
|
-
{
|
|
12
|
+
đ Version: {"latest" if version is None else version}
|
|
13
|
+
{"=" * 150}
|
|
21
14
|
""")
|
|
22
15
|
|
|
23
16
|
install_script = "uv tool install --force --python python3.12 aider-chat@latest"
|
|
24
17
|
|
|
25
18
|
print(f"""
|
|
26
|
-
{
|
|
19
|
+
{"=" * 150}
|
|
27
20
|
â
SUCCESS | Installation command prepared:
|
|
28
21
|
đ Command: {install_script}
|
|
29
|
-
{
|
|
22
|
+
{"=" * 150}
|
|
30
23
|
""")
|
|
31
24
|
|
|
32
25
|
return install_script
|
|
33
26
|
|
|
34
27
|
|
|
35
|
-
if __name__ ==
|
|
28
|
+
if __name__ == "__main__":
|
|
36
29
|
pass
|
|
37
|
-
|
|
@@ -1,27 +1,19 @@
|
|
|
1
|
-
"""alacritty
|
|
2
|
-
"""
|
|
1
|
+
"""alacritty"""
|
|
3
2
|
|
|
4
3
|
import platform
|
|
5
4
|
from typing import Optional
|
|
6
5
|
|
|
7
6
|
|
|
8
|
-
config_dict = {
|
|
9
|
-
"repo_url": "CUSTOM",
|
|
10
|
-
"doc": "Terminal Console",
|
|
11
|
-
"filename_template_windows_amd_64": "",
|
|
12
|
-
"filename_template_linux_amd_64": "",
|
|
13
|
-
"strip_v": False,
|
|
14
|
-
"exe_name": "alacritty"
|
|
15
|
-
}
|
|
7
|
+
config_dict = {"repo_url": "CUSTOM", "doc": "Terminal Console", "filename_template_windows_amd_64": "", "filename_template_linux_amd_64": "", "strip_v": False, "exe_name": "alacritty"}
|
|
16
8
|
|
|
17
9
|
|
|
18
10
|
def main(version: Optional[str]):
|
|
19
11
|
print(f"""
|
|
20
|
-
{
|
|
12
|
+
{"=" * 150}
|
|
21
13
|
đĨī¸ ALACRITTY INSTALLER | Installing GPU-accelerated terminal emulator
|
|
22
14
|
đģ Platform: {platform.system()}
|
|
23
|
-
đ Version: {
|
|
24
|
-
{
|
|
15
|
+
đ Version: {"latest" if version is None else version}
|
|
16
|
+
{"=" * 150}
|
|
25
17
|
""")
|
|
26
18
|
|
|
27
19
|
_ = version
|
|
@@ -48,19 +40,19 @@ git clone https://github.com/alacritty/alacritty-theme ~/.config/alacritty/theme
|
|
|
48
40
|
else:
|
|
49
41
|
error_msg = f"Unsupported platform: {platform.system()}"
|
|
50
42
|
print(f"""
|
|
51
|
-
{
|
|
43
|
+
{"â ī¸" * 20}
|
|
52
44
|
â ERROR | {error_msg}
|
|
53
|
-
{
|
|
45
|
+
{"â ī¸" * 20}
|
|
54
46
|
""")
|
|
55
47
|
raise NotImplementedError(error_msg)
|
|
56
48
|
|
|
57
49
|
print(f"""
|
|
58
|
-
{
|
|
50
|
+
{"=" * 150}
|
|
59
51
|
âšī¸ INFO | Installation will proceed with the following steps:
|
|
60
52
|
1ī¸âŖ Install Alacritty using Cargo
|
|
61
53
|
2ī¸âŖ Create config directories
|
|
62
54
|
3ī¸âŖ Clone theme repository
|
|
63
|
-
{
|
|
55
|
+
{"=" * 150}
|
|
64
56
|
""")
|
|
65
57
|
|
|
66
58
|
# _res = Terminal(stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE).run_script(script=program, shell="default").print(desc="Running custom installer", capture=True)
|
|
@@ -70,4 +62,3 @@ git clone https://github.com/alacritty/alacritty-theme ~/.config/alacritty/theme
|
|
|
70
62
|
|
|
71
63
|
if __name__ == "__main__":
|
|
72
64
|
pass
|
|
73
|
-
|
|
@@ -1,28 +1,19 @@
|
|
|
1
|
-
"""brave installer
|
|
2
|
-
"""
|
|
1
|
+
"""brave installer"""
|
|
3
2
|
|
|
4
3
|
import platform
|
|
5
4
|
from typing import Optional
|
|
6
5
|
|
|
7
6
|
|
|
8
|
-
config_dict = {
|
|
9
|
-
"repo_url": "CUSTOM",
|
|
10
|
-
"doc": "Chrome with no ads",
|
|
11
|
-
"filename_template_windows_amd_64": "",
|
|
12
|
-
"filename_template_linux_amd_64": "",
|
|
13
|
-
"strip_v": False,
|
|
14
|
-
"exe_name": "brave"
|
|
15
|
-
}
|
|
16
|
-
|
|
7
|
+
config_dict = {"repo_url": "CUSTOM", "doc": "Chrome with no ads", "filename_template_windows_amd_64": "", "filename_template_linux_amd_64": "", "strip_v": False, "exe_name": "brave"}
|
|
17
8
|
|
|
18
9
|
|
|
19
10
|
def main(version: Optional[str]):
|
|
20
11
|
print(f"""
|
|
21
|
-
{
|
|
12
|
+
{"=" * 150}
|
|
22
13
|
đĻ BRAVE BROWSER | Installing privacy-focused web browser
|
|
23
14
|
đģ Platform: {platform.system()}
|
|
24
|
-
đ Version: {
|
|
25
|
-
{
|
|
15
|
+
đ Version: {"latest" if version is None else version}
|
|
16
|
+
{"=" * 150}
|
|
26
17
|
""")
|
|
27
18
|
|
|
28
19
|
_ = version
|
|
@@ -38,6 +29,7 @@ winget install --Name "Brave Browser" --Id Brave.Brave --source winget --accept-
|
|
|
38
29
|
print(f"đ§ Installing Brave Browser on {system_name}...")
|
|
39
30
|
import machineconfig.jobs.python_custom_installers as module
|
|
40
31
|
from pathlib import Path
|
|
32
|
+
|
|
41
33
|
if platform.system() == "Linux":
|
|
42
34
|
program = Path(module.__file__).parent.joinpath("scripts/linux/brave.sh").read_text(encoding="utf-8")
|
|
43
35
|
else: # Darwin/macOS
|
|
@@ -45,20 +37,20 @@ winget install --Name "Brave Browser" --Id Brave.Brave --source winget --accept-
|
|
|
45
37
|
else:
|
|
46
38
|
error_msg = f"Unsupported platform: {platform.system()}"
|
|
47
39
|
print(f"""
|
|
48
|
-
{
|
|
40
|
+
{"â ī¸" * 20}
|
|
49
41
|
â ERROR | {error_msg}
|
|
50
|
-
{
|
|
42
|
+
{"â ī¸" * 20}
|
|
51
43
|
""")
|
|
52
44
|
raise NotImplementedError(error_msg)
|
|
53
45
|
|
|
54
46
|
print(f"""
|
|
55
|
-
{
|
|
47
|
+
{"=" * 150}
|
|
56
48
|
âšī¸ INFO | Brave Browser features:
|
|
57
49
|
đ Built-in ad blocking
|
|
58
50
|
đĄī¸ Privacy-focused browsing
|
|
59
51
|
đ¨ Faster page loading
|
|
60
52
|
đĒ Optional crypto rewards
|
|
61
|
-
{
|
|
53
|
+
{"=" * 150}
|
|
62
54
|
""")
|
|
63
55
|
|
|
64
56
|
# _res = Terminal(stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE).run_script(script=program, shell="default").print(desc="Running custom installer", capture=True)
|
|
@@ -68,4 +60,3 @@ winget install --Name "Brave Browser" --Id Brave.Brave --source winget --accept-
|
|
|
68
60
|
|
|
69
61
|
if __name__ == "__main__":
|
|
70
62
|
pass
|
|
71
|
-
|