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.

Files changed (155) hide show
  1. machineconfig/__init__.py +8 -5
  2. machineconfig/jobs/python/check_installations.py +173 -163
  3. machineconfig/jobs/python/checkout_version.py +117 -0
  4. machineconfig/jobs/python/create_bootable_media.py +14 -14
  5. machineconfig/jobs/python/create_zellij_template.py +59 -56
  6. machineconfig/jobs/python/python_cargo_build_share.py +50 -45
  7. machineconfig/jobs/python/python_ve_symlink.py +20 -18
  8. machineconfig/jobs/python/tasks.py +4 -0
  9. machineconfig/jobs/script_installer/azure_data_studio.py +22 -0
  10. machineconfig/jobs/script_installer/bypass_paywall.py +23 -0
  11. machineconfig/jobs/script_installer/code.py +34 -0
  12. machineconfig/jobs/script_installer/docker_desktop.py +41 -0
  13. machineconfig/jobs/script_installer/ngrok.py +29 -0
  14. machineconfig/jobs/{python_linux_installers → script_installer}/skim.py +21 -19
  15. machineconfig/jobs/script_installer/wezterm.py +34 -0
  16. machineconfig/profile/create.py +107 -200
  17. machineconfig/profile/shell.py +127 -0
  18. machineconfig/scripts/__init__.py +6 -6
  19. machineconfig/scripts/python/cloud_copy.py +93 -0
  20. machineconfig/scripts/python/cloud_manager.py +38 -0
  21. machineconfig/scripts/python/cloud_mount.py +115 -52
  22. machineconfig/scripts/python/cloud_repo_sync.py +154 -114
  23. machineconfig/scripts/python/cloud_sync.py +261 -79
  24. machineconfig/scripts/python/croshell.py +151 -0
  25. machineconfig/scripts/python/devops.py +119 -87
  26. machineconfig/scripts/python/devops_add_identity.py +27 -23
  27. machineconfig/scripts/python/devops_add_ssh_key.py +70 -55
  28. machineconfig/scripts/python/devops_backup_retrieve.py +52 -46
  29. machineconfig/scripts/python/devops_devapps_install.py +120 -91
  30. machineconfig/scripts/python/devops_update_repos.py +82 -68
  31. machineconfig/scripts/python/dotfile.py +42 -38
  32. machineconfig/scripts/python/fire_jobs.py +351 -98
  33. machineconfig/scripts/python/ftpx.py +82 -0
  34. machineconfig/scripts/python/mount_nfs.py +54 -3
  35. machineconfig/scripts/python/mount_nw_drive.py +31 -0
  36. machineconfig/scripts/python/mount_ssh.py +44 -20
  37. machineconfig/scripts/python/onetimeshare.py +60 -51
  38. machineconfig/scripts/python/pomodoro.py +41 -37
  39. machineconfig/scripts/python/repos.py +195 -128
  40. machineconfig/scripts/python/scheduler.py +52 -0
  41. machineconfig/scripts/python/snapshot.py +21 -21
  42. machineconfig/scripts/python/start_slidev.py +104 -0
  43. machineconfig/scripts/python/start_terminals.py +97 -0
  44. machineconfig/scripts/python/wifi_conn.py +90 -71
  45. machineconfig/scripts/python/{transfer_wsl_win.py → wsl_windows_transfer.py} +47 -39
  46. machineconfig/setup_windows/wt_and_pwsh/set_pwsh_theme.py +44 -48
  47. machineconfig/setup_windows/wt_and_pwsh/set_wt_settings.py +136 -130
  48. machineconfig/utils/installer.py +251 -0
  49. machineconfig/utils/procs.py +114 -64
  50. machineconfig/utils/scheduling.py +188 -0
  51. machineconfig/utils/utils.py +353 -249
  52. machineconfig/utils/ve.py +222 -0
  53. {machineconfig-1.5.dist-info → machineconfig-1.8.dist-info}/METADATA +140 -110
  54. machineconfig-1.8.dist-info/RECORD +70 -0
  55. {machineconfig-1.5.dist-info → machineconfig-1.8.dist-info}/WHEEL +1 -1
  56. machineconfig/jobs/python/python_linux_installers_all.py +0 -73
  57. machineconfig/jobs/python/python_ve_installer.py +0 -73
  58. machineconfig/jobs/python/python_windows_installers_all.py +0 -23
  59. machineconfig/jobs/python_generic_installers/archive/nvim.py +0 -15
  60. machineconfig/jobs/python_generic_installers/archive/strongbox.py +0 -32
  61. machineconfig/jobs/python_generic_installers/archive/vtm.py +0 -25
  62. machineconfig/jobs/python_generic_installers/broot.py +0 -39
  63. machineconfig/jobs/python_generic_installers/browsh.py +0 -25
  64. machineconfig/jobs/python_generic_installers/bw.py +0 -26
  65. machineconfig/jobs/python_generic_installers/chatgpt.py +0 -24
  66. machineconfig/jobs/python_generic_installers/cpufetch.py +0 -23
  67. machineconfig/jobs/python_generic_installers/delta.py +0 -59
  68. machineconfig/jobs/python_generic_installers/dev/__init__.py +0 -0
  69. machineconfig/jobs/python_generic_installers/dev/autogpt.py +0 -28
  70. machineconfig/jobs/python_generic_installers/dev/bw.py +0 -29
  71. machineconfig/jobs/python_generic_installers/dev/evcxr.py +0 -22
  72. machineconfig/jobs/python_generic_installers/dev/kondo.py +0 -21
  73. machineconfig/jobs/python_generic_installers/dev/lvim.py +0 -60
  74. machineconfig/jobs/python_generic_installers/dev/ngrok.py +0 -35
  75. machineconfig/jobs/python_generic_installers/dev/opencommit.py +0 -21
  76. machineconfig/jobs/python_generic_installers/dev/qrcp.py +0 -25
  77. machineconfig/jobs/python_generic_installers/dev/qrscan.py +0 -16
  78. machineconfig/jobs/python_generic_installers/dev/rust-analyzer.py +0 -24
  79. machineconfig/jobs/python_generic_installers/dev/termscp.py +0 -23
  80. machineconfig/jobs/python_generic_installers/dev/tldr.py +0 -25
  81. machineconfig/jobs/python_generic_installers/dev/tokei.py +0 -24
  82. machineconfig/jobs/python_generic_installers/diskonaut.py +0 -26
  83. machineconfig/jobs/python_generic_installers/dua.py +0 -21
  84. machineconfig/jobs/python_generic_installers/evcxr.py +0 -21
  85. machineconfig/jobs/python_generic_installers/gitui.py +0 -23
  86. machineconfig/jobs/python_generic_installers/gopass.py +0 -19
  87. machineconfig/jobs/python_generic_installers/helix.py +0 -45
  88. machineconfig/jobs/python_generic_installers/kondo.py +0 -20
  89. machineconfig/jobs/python_generic_installers/lf.py +0 -25
  90. machineconfig/jobs/python_generic_installers/lvim.py +0 -34
  91. machineconfig/jobs/python_generic_installers/mprocs.py +0 -20
  92. machineconfig/jobs/python_generic_installers/navi.py +0 -20
  93. machineconfig/jobs/python_generic_installers/ots.py +0 -26
  94. machineconfig/jobs/python_generic_installers/ouch.py +0 -25
  95. machineconfig/jobs/python_generic_installers/pomodoro.py +0 -19
  96. machineconfig/jobs/python_generic_installers/procs.py +0 -20
  97. machineconfig/jobs/python_generic_installers/qrcp.py +0 -22
  98. machineconfig/jobs/python_generic_installers/qrscan.py +0 -14
  99. machineconfig/jobs/python_generic_installers/rclone.py +0 -21
  100. machineconfig/jobs/python_generic_installers/rust-analyzer.py +0 -24
  101. machineconfig/jobs/python_generic_installers/tere.py +0 -26
  102. machineconfig/jobs/python_generic_installers/termscp.py +0 -23
  103. machineconfig/jobs/python_generic_installers/tldr.py +0 -24
  104. machineconfig/jobs/python_generic_installers/tokei.py +0 -21
  105. machineconfig/jobs/python_generic_installers/vtm.py +0 -26
  106. machineconfig/jobs/python_generic_installers/watchexec.py +0 -21
  107. machineconfig/jobs/python_linux_installers/archive/__init__.py +0 -0
  108. machineconfig/jobs/python_linux_installers/archive/ranger.py +0 -18
  109. machineconfig/jobs/python_linux_installers/bandwhich.py +0 -11
  110. machineconfig/jobs/python_linux_installers/bottom.py +0 -17
  111. machineconfig/jobs/python_linux_installers/btop.py +0 -17
  112. machineconfig/jobs/python_linux_installers/dev/bandwhich.py +0 -13
  113. machineconfig/jobs/python_linux_installers/dev/bytehound.py +0 -20
  114. machineconfig/jobs/python_linux_installers/dev/nnn.py +0 -21
  115. machineconfig/jobs/python_linux_installers/gotty.py +0 -16
  116. machineconfig/jobs/python_linux_installers/joshuto.py +0 -28
  117. machineconfig/jobs/python_linux_installers/mcfly.py +0 -12
  118. machineconfig/jobs/python_linux_installers/nnn.py +0 -18
  119. machineconfig/jobs/python_linux_installers/topgrade.py +0 -15
  120. machineconfig/jobs/python_linux_installers/viu.py +0 -19
  121. machineconfig/jobs/python_linux_installers/xplr.py +0 -22
  122. machineconfig/jobs/python_linux_installers/zellij.py +0 -31
  123. machineconfig/jobs/python_windows_installers/archive/ntop.py +0 -20
  124. machineconfig/jobs/python_windows_installers/bat.py +0 -16
  125. machineconfig/jobs/python_windows_installers/boxes.py +0 -19
  126. machineconfig/jobs/python_windows_installers/bypass_paywall.py +0 -18
  127. machineconfig/jobs/python_windows_installers/dev/bypass_paywall.py +0 -21
  128. machineconfig/jobs/python_windows_installers/dev/obs_background_removal_plugin.py +0 -20
  129. machineconfig/jobs/python_windows_installers/fd.py +0 -17
  130. machineconfig/jobs/python_windows_installers/fzf.py +0 -19
  131. machineconfig/jobs/python_windows_installers/obs_background_removal_plugin.py +0 -19
  132. machineconfig/jobs/python_windows_installers/rg.py +0 -15
  133. machineconfig/jobs/python_windows_installers/ugrep.py +0 -14
  134. machineconfig/jobs/python_windows_installers/zoomit.py +0 -20
  135. machineconfig/jobs/python_windows_installers/zoxide.py +0 -20
  136. machineconfig/profile/fix_shell_profiles.py +0 -8
  137. machineconfig/scripts/python/archive/__init__.py +0 -0
  138. machineconfig/scripts/python/archive/bu_gdrive_rx.py +0 -41
  139. machineconfig/scripts/python/archive/bu_gdrive_sx.py +0 -40
  140. machineconfig/scripts/python/archive/bu_onedrive_rx.py +0 -59
  141. machineconfig/scripts/python/archive/bu_onedrive_sx.py +0 -45
  142. machineconfig/scripts/python/chatgpt.py +0 -28
  143. machineconfig/scripts/python/choose_ohmybash_theme.py +0 -25
  144. machineconfig/scripts/python/choose_ohmyposh_theme.py +0 -40
  145. machineconfig/scripts/python/cloud_rx.py +0 -42
  146. machineconfig/scripts/python/cloud_sx.py +0 -40
  147. machineconfig/scripts/python/ftprx.py +0 -37
  148. machineconfig/scripts/python/ftpsx.py +0 -36
  149. machineconfig/scripts/python/im2text.py +0 -15
  150. machineconfig/scripts/python/tmate_conn.py +0 -28
  151. machineconfig/scripts/python/tmate_start.py +0 -31
  152. machineconfig/utils/to_exe.py +0 -7
  153. machineconfig-1.5.dist-info/RECORD +0 -147
  154. /machineconfig/jobs/{python_generic_installers/archive → script_installer}/__init__.py +0 -0
  155. {machineconfig-1.5.dist-info → machineconfig-1.8.dist-info}/top_level.txt +0 -0
@@ -1,45 +1,50 @@
1
-
2
- import crocodile.toolbox as tb
3
- import platform
4
-
5
-
6
- def build_rust_executable(url=r"https://github.com/atanunq/viu"):
7
- tool_name = url.split('/')[-1]
8
-
9
- # move command is not required since tool will go to .cargo/bin which is in PATH by default.
10
- # move_command = f"mv {exe} {tb.get_env().WindowsApps.as_posix()}/" if platform.platform() == "Windows" else f"sudo mv {exe} /usr/local/bin/"
11
- # {move_command}
12
-
13
- script = f"""
14
- cd ~
15
- git clone --depth 1 {url}
16
- cd {tool_name}
17
- cargo install --path .
18
- """
19
- print(f"Executing {script}")
20
- if platform.system() == "Windows":
21
- tb.Terminal(stdout=None).run(f". {tb.P.tmpfile(suffix='.ps1').write_text(script)}", shell="pwsh").print()
22
- else:
23
- tb.Terminal(stdout=None).run(script, shell="pwsh")
24
-
25
- exe = tb.P.home().joinpath(f".cargo/bin/{tool_name}" + (".exe" if platform.system() == "Windows" else ""))
26
-
27
- try:
28
- tb.P.home().joinpath(tool_name).delete(sure=True)
29
- except PermissionError:
30
- print(f"PermissionError, couldn't delete: {tb.P.home().joinpath(tool_name)}")
31
-
32
- if platform.system() == "Windows":
33
- exe = exe.move(folder=tb.get_env().WindowsApps)
34
- elif platform.system() == "Linux":
35
- tb.Terminal().run(f"sudo mv {exe} /usr/local/bin")
36
- exe = tb.P(r"/usr/local/bin").joinpath(exe.name)
37
- else:
38
- raise NotImplementedError(f"Platform {platform.system()} not supported.")
39
- share_link = exe.to_cloud("gdpo", share=True)
40
- return share_link
41
-
42
-
43
- # after cargo install diskonaut
44
- # then mv ~/.cargo/bin/diskonaut.exe ~/AppData/Local/Microsoft/WindowsApps/
45
- # then bu_gdrive_sx.ps1 .\diskonaut.exe -sRz # zipping is vital to avoid security layers and keep file metadata.
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
- import crocodile.toolbox as tb
3
- # from machineconfig.utils.utils import display_options
4
-
5
- def main():
6
- target = tb.P(input("Symlink to which target? ")).expanduser().absolute()
7
- source = input(f"symlink from which source ? [default to: CWD/{target.name}] ") or tb.P.cwd().joinpath(target.name)
8
- if type(source) is str: source = tb.P(source).expanduser().absolute()
9
- # ve_path = display_options(msg="symlin link? ", options=tb.P.home().joinpath("ve").starget.symlink_toimport crocodile.toolbox as tb; tb.P(r'$pwd').joinpath('venv').symlink_to(r'$to'); tb.P('.gitignore').modify_text('venv', 'venv', replace_line=True)"(target.symlink_to(
10
- # tb.P('.gitignore').modify_text('venv', 'venv', replace_line=True)"
11
-
12
- source.symlink_to(target, overwrite=True)
13
- return "echo 'Finished creating symlink.'"
14
-
15
-
16
- if __name__ == '__main__':
17
- pass
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,4 @@
1
+
2
+ from machineconfig.scripts.python.devops_backup_retrieve import main
3
+
4
+ program = main(direction="BACKUP", which="all")
@@ -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
- import crocodile.toolbox as tb
8
- __doc__ = """skim is a fuzzy finder in rust!"""
9
-
10
-
11
- def main(version=None):
12
- _ = version
13
- # repo_url = tb.P(r"https://github.com/lotabout/skim")
14
- # 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)
15
- pass
16
-
17
-
18
- if __name__ == '__main__':
19
- main()
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