machineconfig 1.5__py3-none-any.whl → 1.8__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/__init__.py +8 -5
- machineconfig/jobs/python/check_installations.py +173 -163
- machineconfig/jobs/python/checkout_version.py +117 -0
- machineconfig/jobs/python/create_bootable_media.py +14 -14
- machineconfig/jobs/python/create_zellij_template.py +59 -56
- machineconfig/jobs/python/python_cargo_build_share.py +50 -45
- machineconfig/jobs/python/python_ve_symlink.py +20 -18
- machineconfig/jobs/python/tasks.py +4 -0
- machineconfig/jobs/script_installer/azure_data_studio.py +22 -0
- machineconfig/jobs/script_installer/bypass_paywall.py +23 -0
- machineconfig/jobs/script_installer/code.py +34 -0
- machineconfig/jobs/script_installer/docker_desktop.py +41 -0
- machineconfig/jobs/script_installer/ngrok.py +29 -0
- machineconfig/jobs/{python_linux_installers → script_installer}/skim.py +21 -19
- machineconfig/jobs/script_installer/wezterm.py +34 -0
- machineconfig/profile/create.py +107 -200
- machineconfig/profile/shell.py +127 -0
- machineconfig/scripts/__init__.py +6 -6
- machineconfig/scripts/python/cloud_copy.py +93 -0
- machineconfig/scripts/python/cloud_manager.py +38 -0
- machineconfig/scripts/python/cloud_mount.py +115 -52
- machineconfig/scripts/python/cloud_repo_sync.py +154 -114
- machineconfig/scripts/python/cloud_sync.py +261 -79
- machineconfig/scripts/python/croshell.py +151 -0
- machineconfig/scripts/python/devops.py +119 -87
- machineconfig/scripts/python/devops_add_identity.py +27 -23
- machineconfig/scripts/python/devops_add_ssh_key.py +70 -55
- machineconfig/scripts/python/devops_backup_retrieve.py +52 -46
- machineconfig/scripts/python/devops_devapps_install.py +120 -91
- machineconfig/scripts/python/devops_update_repos.py +82 -68
- machineconfig/scripts/python/dotfile.py +42 -38
- machineconfig/scripts/python/fire_jobs.py +351 -98
- machineconfig/scripts/python/ftpx.py +82 -0
- machineconfig/scripts/python/mount_nfs.py +54 -3
- machineconfig/scripts/python/mount_nw_drive.py +31 -0
- machineconfig/scripts/python/mount_ssh.py +44 -20
- machineconfig/scripts/python/onetimeshare.py +60 -51
- machineconfig/scripts/python/pomodoro.py +41 -37
- machineconfig/scripts/python/repos.py +195 -128
- machineconfig/scripts/python/scheduler.py +52 -0
- machineconfig/scripts/python/snapshot.py +21 -21
- machineconfig/scripts/python/start_slidev.py +104 -0
- machineconfig/scripts/python/start_terminals.py +97 -0
- machineconfig/scripts/python/wifi_conn.py +90 -71
- machineconfig/scripts/python/{transfer_wsl_win.py → wsl_windows_transfer.py} +47 -39
- machineconfig/setup_windows/wt_and_pwsh/set_pwsh_theme.py +44 -48
- machineconfig/setup_windows/wt_and_pwsh/set_wt_settings.py +136 -130
- machineconfig/utils/installer.py +251 -0
- machineconfig/utils/procs.py +114 -64
- machineconfig/utils/scheduling.py +188 -0
- machineconfig/utils/utils.py +353 -249
- machineconfig/utils/ve.py +222 -0
- {machineconfig-1.5.dist-info → machineconfig-1.8.dist-info}/METADATA +140 -110
- machineconfig-1.8.dist-info/RECORD +70 -0
- {machineconfig-1.5.dist-info → machineconfig-1.8.dist-info}/WHEEL +1 -1
- machineconfig/jobs/python/python_linux_installers_all.py +0 -73
- machineconfig/jobs/python/python_ve_installer.py +0 -73
- machineconfig/jobs/python/python_windows_installers_all.py +0 -23
- machineconfig/jobs/python_generic_installers/archive/nvim.py +0 -15
- machineconfig/jobs/python_generic_installers/archive/strongbox.py +0 -32
- machineconfig/jobs/python_generic_installers/archive/vtm.py +0 -25
- machineconfig/jobs/python_generic_installers/broot.py +0 -39
- machineconfig/jobs/python_generic_installers/browsh.py +0 -25
- machineconfig/jobs/python_generic_installers/bw.py +0 -26
- machineconfig/jobs/python_generic_installers/chatgpt.py +0 -24
- machineconfig/jobs/python_generic_installers/cpufetch.py +0 -23
- machineconfig/jobs/python_generic_installers/delta.py +0 -59
- machineconfig/jobs/python_generic_installers/dev/__init__.py +0 -0
- machineconfig/jobs/python_generic_installers/dev/autogpt.py +0 -28
- machineconfig/jobs/python_generic_installers/dev/bw.py +0 -29
- machineconfig/jobs/python_generic_installers/dev/evcxr.py +0 -22
- machineconfig/jobs/python_generic_installers/dev/kondo.py +0 -21
- machineconfig/jobs/python_generic_installers/dev/lvim.py +0 -60
- machineconfig/jobs/python_generic_installers/dev/ngrok.py +0 -35
- machineconfig/jobs/python_generic_installers/dev/opencommit.py +0 -21
- machineconfig/jobs/python_generic_installers/dev/qrcp.py +0 -25
- machineconfig/jobs/python_generic_installers/dev/qrscan.py +0 -16
- machineconfig/jobs/python_generic_installers/dev/rust-analyzer.py +0 -24
- machineconfig/jobs/python_generic_installers/dev/termscp.py +0 -23
- machineconfig/jobs/python_generic_installers/dev/tldr.py +0 -25
- machineconfig/jobs/python_generic_installers/dev/tokei.py +0 -24
- machineconfig/jobs/python_generic_installers/diskonaut.py +0 -26
- machineconfig/jobs/python_generic_installers/dua.py +0 -21
- machineconfig/jobs/python_generic_installers/evcxr.py +0 -21
- machineconfig/jobs/python_generic_installers/gitui.py +0 -23
- machineconfig/jobs/python_generic_installers/gopass.py +0 -19
- machineconfig/jobs/python_generic_installers/helix.py +0 -45
- machineconfig/jobs/python_generic_installers/kondo.py +0 -20
- machineconfig/jobs/python_generic_installers/lf.py +0 -25
- machineconfig/jobs/python_generic_installers/lvim.py +0 -34
- machineconfig/jobs/python_generic_installers/mprocs.py +0 -20
- machineconfig/jobs/python_generic_installers/navi.py +0 -20
- machineconfig/jobs/python_generic_installers/ots.py +0 -26
- machineconfig/jobs/python_generic_installers/ouch.py +0 -25
- machineconfig/jobs/python_generic_installers/pomodoro.py +0 -19
- machineconfig/jobs/python_generic_installers/procs.py +0 -20
- machineconfig/jobs/python_generic_installers/qrcp.py +0 -22
- machineconfig/jobs/python_generic_installers/qrscan.py +0 -14
- machineconfig/jobs/python_generic_installers/rclone.py +0 -21
- machineconfig/jobs/python_generic_installers/rust-analyzer.py +0 -24
- machineconfig/jobs/python_generic_installers/tere.py +0 -26
- machineconfig/jobs/python_generic_installers/termscp.py +0 -23
- machineconfig/jobs/python_generic_installers/tldr.py +0 -24
- machineconfig/jobs/python_generic_installers/tokei.py +0 -21
- machineconfig/jobs/python_generic_installers/vtm.py +0 -26
- machineconfig/jobs/python_generic_installers/watchexec.py +0 -21
- machineconfig/jobs/python_linux_installers/archive/__init__.py +0 -0
- machineconfig/jobs/python_linux_installers/archive/ranger.py +0 -18
- machineconfig/jobs/python_linux_installers/bandwhich.py +0 -11
- machineconfig/jobs/python_linux_installers/bottom.py +0 -17
- machineconfig/jobs/python_linux_installers/btop.py +0 -17
- machineconfig/jobs/python_linux_installers/dev/bandwhich.py +0 -13
- machineconfig/jobs/python_linux_installers/dev/bytehound.py +0 -20
- machineconfig/jobs/python_linux_installers/dev/nnn.py +0 -21
- machineconfig/jobs/python_linux_installers/gotty.py +0 -16
- machineconfig/jobs/python_linux_installers/joshuto.py +0 -28
- machineconfig/jobs/python_linux_installers/mcfly.py +0 -12
- machineconfig/jobs/python_linux_installers/nnn.py +0 -18
- machineconfig/jobs/python_linux_installers/topgrade.py +0 -15
- machineconfig/jobs/python_linux_installers/viu.py +0 -19
- machineconfig/jobs/python_linux_installers/xplr.py +0 -22
- machineconfig/jobs/python_linux_installers/zellij.py +0 -31
- machineconfig/jobs/python_windows_installers/archive/ntop.py +0 -20
- machineconfig/jobs/python_windows_installers/bat.py +0 -16
- machineconfig/jobs/python_windows_installers/boxes.py +0 -19
- machineconfig/jobs/python_windows_installers/bypass_paywall.py +0 -18
- machineconfig/jobs/python_windows_installers/dev/bypass_paywall.py +0 -21
- machineconfig/jobs/python_windows_installers/dev/obs_background_removal_plugin.py +0 -20
- machineconfig/jobs/python_windows_installers/fd.py +0 -17
- machineconfig/jobs/python_windows_installers/fzf.py +0 -19
- machineconfig/jobs/python_windows_installers/obs_background_removal_plugin.py +0 -19
- machineconfig/jobs/python_windows_installers/rg.py +0 -15
- machineconfig/jobs/python_windows_installers/ugrep.py +0 -14
- machineconfig/jobs/python_windows_installers/zoomit.py +0 -20
- machineconfig/jobs/python_windows_installers/zoxide.py +0 -20
- machineconfig/profile/fix_shell_profiles.py +0 -8
- machineconfig/scripts/python/archive/__init__.py +0 -0
- machineconfig/scripts/python/archive/bu_gdrive_rx.py +0 -41
- machineconfig/scripts/python/archive/bu_gdrive_sx.py +0 -40
- machineconfig/scripts/python/archive/bu_onedrive_rx.py +0 -59
- machineconfig/scripts/python/archive/bu_onedrive_sx.py +0 -45
- machineconfig/scripts/python/chatgpt.py +0 -28
- machineconfig/scripts/python/choose_ohmybash_theme.py +0 -25
- machineconfig/scripts/python/choose_ohmyposh_theme.py +0 -40
- machineconfig/scripts/python/cloud_rx.py +0 -42
- machineconfig/scripts/python/cloud_sx.py +0 -40
- machineconfig/scripts/python/ftprx.py +0 -37
- machineconfig/scripts/python/ftpsx.py +0 -36
- machineconfig/scripts/python/im2text.py +0 -15
- machineconfig/scripts/python/tmate_conn.py +0 -28
- machineconfig/scripts/python/tmate_start.py +0 -31
- machineconfig/utils/to_exe.py +0 -7
- machineconfig-1.5.dist-info/RECORD +0 -147
- /machineconfig/jobs/{python_generic_installers/archive → script_installer}/__init__.py +0 -0
- {machineconfig-1.5.dist-info → machineconfig-1.8.dist-info}/top_level.txt +0 -0
|
@@ -1,45 +1,50 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"""
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
1
|
+
|
|
2
|
+
"""
|
|
3
|
+
cargo install
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
from crocodile.meta import Terminal
|
|
7
|
+
from crocodile.file_management import P
|
|
8
|
+
import platform
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def build_rust_executable(url: str = r"https://github.com/atanunq/viu"):
|
|
12
|
+
tool_name = url.split('/')[-1]
|
|
13
|
+
|
|
14
|
+
# move command is not required since tool will go to .cargo/bin which is in PATH by default.
|
|
15
|
+
# move_command = f"mv {exe} {tb.get_env().WindowsApps.as_posix()}/" if platform.platform() == "Windows" else f"sudo mv {exe} /usr/local/bin/"
|
|
16
|
+
# {move_command}
|
|
17
|
+
|
|
18
|
+
script = f"""
|
|
19
|
+
cd ~
|
|
20
|
+
git clone --depth 1 {url}
|
|
21
|
+
cd {tool_name}
|
|
22
|
+
cargo install --path .
|
|
23
|
+
"""
|
|
24
|
+
print(f"Executing {script}")
|
|
25
|
+
if platform.system() == "Windows":
|
|
26
|
+
Terminal(stdout=None).run(f". {P.tmpfile(suffix='.ps1').write_text(script)}", shell="pwsh").print()
|
|
27
|
+
else:
|
|
28
|
+
Terminal(stdout=None).run(script, shell="pwsh")
|
|
29
|
+
|
|
30
|
+
exe = P.home().joinpath(f".cargo/bin/{tool_name}" + (".exe" if platform.system() == "Windows" else ""))
|
|
31
|
+
|
|
32
|
+
try:
|
|
33
|
+
P.home().joinpath(tool_name).delete(sure=True)
|
|
34
|
+
except PermissionError:
|
|
35
|
+
print(f"PermissionError, couldn't delete: {P.home().joinpath(tool_name)}")
|
|
36
|
+
|
|
37
|
+
if platform.system() == "Windows":
|
|
38
|
+
exe = exe.move(folder=P.get_env().WindowsApps)
|
|
39
|
+
elif platform.system() == "Linux":
|
|
40
|
+
Terminal().run(f"sudo mv {exe} /usr/local/bin")
|
|
41
|
+
exe = P(r"/usr/local/bin").joinpath(exe.name)
|
|
42
|
+
else:
|
|
43
|
+
raise NotImplementedError(f"Platform {platform.system()} not supported.")
|
|
44
|
+
share_link = exe.to_cloud("gdpo", share=True)
|
|
45
|
+
return share_link
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
# after cargo install diskonaut
|
|
49
|
+
# then mv ~/.cargo/bin/diskonaut.exe ~/AppData/Local/Microsoft/WindowsApps/
|
|
50
|
+
# then bu_gdrive_sx.ps1 .\diskonaut.exe -sRz # zipping is vital to avoid security layers and keep file metadata.
|
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
source
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
|
|
2
|
+
"""Symlinks
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from crocodile.file_management import P
|
|
6
|
+
# from machineconfig.utils.utils import display_options
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def main():
|
|
10
|
+
target = P(input("Symlink to which target? ")).expanduser().absolute()
|
|
11
|
+
source = input(f"symlink from which source ? [default to: CWD/{target.name}] ") or P.cwd().joinpath(target.name)
|
|
12
|
+
if isinstance(source, str): source = P(source).expanduser().absolute()
|
|
13
|
+
# ve_path = display_options(msg="symlin link? ", options=P.home().joinpath("ve").starget.symlink_to; P(r'$pwd').joinpath('venv').symlink_to(r'$to'); P('.gitignore').modify_text('venv', 'venv', replace_line=True)"(target.symlink_to(
|
|
14
|
+
# P('.gitignore').modify_text('venv', 'venv', replace_line=True)"
|
|
15
|
+
source.symlink_to(target, overwrite=True)
|
|
16
|
+
return "echo '😁 Finished creating symlink.'"
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
if __name__ == '__main__':
|
|
20
|
+
pass
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
|
|
2
|
+
from typing import Optional
|
|
3
|
+
import platform
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def main(version: Optional[str] = None):
|
|
7
|
+
_ = version
|
|
8
|
+
if platform.system() == "Linux": return f"""
|
|
9
|
+
|
|
10
|
+
curl https://azuredatastudio-update.azurewebsites.net/latest/linux-x64/stable -o ~/azuredatastudio-linux-x64.tar.gz
|
|
11
|
+
tar -xvf ~/azuredatastudio-linux-<version string>.tar.gz
|
|
12
|
+
echo 'export PATH="$PATH:~/azuredatastudio-linux-x64"' >> ~/.bashrc
|
|
13
|
+
source ~/.bashrc
|
|
14
|
+
|
|
15
|
+
"""
|
|
16
|
+
elif platform.system() == "Windows": return "winget install -e --id Microsoft.AzureDataStudio"
|
|
17
|
+
else:
|
|
18
|
+
raise NotImplementedError(f"Your platform {platform.system()} is not supported!")
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
if __name__ == '__main__':
|
|
22
|
+
pass
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
|
|
2
|
+
# import numpy as np
|
|
3
|
+
# import matplotlib.pyplot as plt
|
|
4
|
+
|
|
5
|
+
# from platform import system
|
|
6
|
+
from typing import Optional
|
|
7
|
+
from crocodile.file_management import P
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
__doc__ = """Plugin for chrome to bypass paywalls"""
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def main(version: Optional[str] = None):
|
|
14
|
+
_ = version
|
|
15
|
+
# see remove paywalls and enhance YT experience by Chris Titus
|
|
16
|
+
folder = r"C:\\"
|
|
17
|
+
P("https://github.com/iamadamdev/bypass-paywalls-chrome/archive/master.zip").download().unzip(folder=folder, content=True)
|
|
18
|
+
P(folder).joinpath("bypass-paywalls-chrome-master")
|
|
19
|
+
return ""
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
if __name__ == '__main__':
|
|
23
|
+
pass
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
"""vs code installer as per https://code.visualstudio.com/docs/setup/linux
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from typing import Optional
|
|
6
|
+
import platform
|
|
7
|
+
|
|
8
|
+
def main(version: Optional[str] = None):
|
|
9
|
+
|
|
10
|
+
if platform.system() == 'Linux':
|
|
11
|
+
code = """
|
|
12
|
+
|
|
13
|
+
sudo apt-get install wget gpg
|
|
14
|
+
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
|
|
15
|
+
sudo install -D -o root -g root -m 644 packages.microsoft.gpg /etc/apt/keyrings/packages.microsoft.gpg
|
|
16
|
+
sudo sh -c 'echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list'
|
|
17
|
+
rm -f packages.microsoft.gpg
|
|
18
|
+
|
|
19
|
+
sudo apt install apt-transport-https -y
|
|
20
|
+
sudo apt update
|
|
21
|
+
sudo apt install code -y # or code-insiders
|
|
22
|
+
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
elif platform.system() == 'Windows':
|
|
26
|
+
code = "winget install -e --id Microsoft.VisualStudioCode"
|
|
27
|
+
else:
|
|
28
|
+
raise NotImplementedError(f"Unsupported platform: {platform.system()}")
|
|
29
|
+
_ = version
|
|
30
|
+
return code
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
if __name__ == '__main__':
|
|
34
|
+
pass
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
|
|
2
|
+
# from machineconfig.utils.installer import get_latest_release
|
|
3
|
+
#
|
|
4
|
+
# from crocodile.meta import Terminal
|
|
5
|
+
from typing import Optional
|
|
6
|
+
|
|
7
|
+
# https://docs.docker.com/desktop/install/ubuntu/
|
|
8
|
+
# https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository
|
|
9
|
+
# https://stackoverflow.com/questions/41133455/docker-repository-does-not-have-a-release-file-on-running-apt-get-update-on-ubun
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
# url = r"https://github.com/koute/bytehound"
|
|
13
|
+
# fname = r"bytehound-x86_64-unknown-linux-gnu.tgz"
|
|
14
|
+
__doc__ = """Docker Desltop for Ubuntu as per https://docs.docker.com/desktop/install/ubuntu/"""
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def main(version: Optional[str] = None):
|
|
18
|
+
_ = version
|
|
19
|
+
code = """
|
|
20
|
+
# Add Docker's official GPG key:
|
|
21
|
+
sudo apt-get update
|
|
22
|
+
sudo apt-get install ca-certificates curl gnupg
|
|
23
|
+
sudo install -m 0755 -d /etc/apt/keyrings
|
|
24
|
+
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
|
|
25
|
+
sudo chmod a+r /etc/apt/keyrings/docker.gpg
|
|
26
|
+
|
|
27
|
+
# Add the repository to Apt sources:
|
|
28
|
+
echo \
|
|
29
|
+
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
|
|
30
|
+
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
|
|
31
|
+
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
|
|
32
|
+
sudo apt-get update
|
|
33
|
+
|
|
34
|
+
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
|
|
35
|
+
|
|
36
|
+
"""
|
|
37
|
+
return code
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
if __name__ == '__main__':
|
|
41
|
+
pass
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
|
|
2
|
+
"""ngrok
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
import platform
|
|
6
|
+
from typing import Optional
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def main(version: Optional[str]):
|
|
10
|
+
_ = version
|
|
11
|
+
if platform.system() == "Windows":
|
|
12
|
+
program = "winget install ngrok.ngrok"
|
|
13
|
+
elif platform.system() == "Linux":
|
|
14
|
+
# as per https://ngrok.com/docs/getting-started/?os=linux
|
|
15
|
+
program = """
|
|
16
|
+
|
|
17
|
+
curl -s https://ngrok-agent.s3.amazonaws.com/ngrok.asc | \
|
|
18
|
+
sudo tee /etc/apt/trusted.gpg.d/ngrok.asc >/dev/null && \
|
|
19
|
+
echo "deb https://ngrok-agent.s3.amazonaws.com buster main" | \
|
|
20
|
+
sudo tee /etc/apt/sources.list.d/ngrok.list && \
|
|
21
|
+
sudo apt update && sudo apt install ngrok
|
|
22
|
+
"""
|
|
23
|
+
else:
|
|
24
|
+
raise NotImplementedError("unsupported platform")
|
|
25
|
+
return program
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
if __name__ == "__main__":
|
|
29
|
+
pass
|
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
"""
|
|
3
|
-
Rust version of FZF (GO)
|
|
4
|
-
"""
|
|
5
|
-
|
|
6
|
-
from machineconfig.utils.utils import get_latest_release
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
|
|
2
|
+
"""
|
|
3
|
+
Rust version of FZF (GO)
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
# from machineconfig.utils.utils import get_latest_release
|
|
7
|
+
#
|
|
8
|
+
from typing import Optional
|
|
9
|
+
|
|
10
|
+
__doc__ = """skim is a fuzzy finder in rust!"""
|
|
11
|
+
repo_url = r"https://github.com/lotabout/skim"
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def main(version: Optional[str] = None):
|
|
15
|
+
_ = version
|
|
16
|
+
# release = get_latest_release(repo_url.as_url_str(), suffix='x86_64-unknown-linux-musl', compression='tar.gz', linux=True, strip_v=True, download_n_extract=True)
|
|
17
|
+
pass
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
if __name__ == '__main__':
|
|
21
|
+
pass
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
"""wezterm installer
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from machineconfig.utils.installer import get_installers
|
|
6
|
+
from typing import Optional
|
|
7
|
+
import platform
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def main(version: Optional[str]):
|
|
11
|
+
if platform.system() == "Windows":
|
|
12
|
+
program = "winget install wez.wezterm"
|
|
13
|
+
elif platform.system() == "Linux":
|
|
14
|
+
insts = get_installers(system=platform.system(), dev=False)
|
|
15
|
+
program = ""
|
|
16
|
+
for inst in insts:
|
|
17
|
+
if "wezterm" in inst.name:
|
|
18
|
+
# as per https://wezfurlong.org/wezterm/install/linux.html#installing-on-ubuntu-and-debian-based-systems
|
|
19
|
+
downloaded, version_to_be_installed = inst.download(version=version)
|
|
20
|
+
_= version_to_be_installed
|
|
21
|
+
|
|
22
|
+
program = f"""
|
|
23
|
+
sudo apt install -y {downloaded}
|
|
24
|
+
rm {downloaded}
|
|
25
|
+
"""
|
|
26
|
+
break
|
|
27
|
+
else:
|
|
28
|
+
raise NotImplementedError("unsupported platform")
|
|
29
|
+
return program
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
if __name__ == "__main__":
|
|
33
|
+
# main(version=None)
|
|
34
|
+
pass
|