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,24 +0,0 @@
1
-
2
- from machineconfig.utils.utils import get_latest_release
3
- from platform import system
4
- import crocodile.toolbox as tb
5
-
6
- """
7
- VSCode and Pycharm have their own extensions from marketplace, but for other editors, we need to install this LSP manually.
8
- """
9
-
10
- repo_url = tb.P(r"https://github.com/rust-lang/rust-analyzer")
11
- __doc__ = f"""Rust Language Server (LSP)"""
12
-
13
- def main(version=None):
14
- url = get_latest_release(repo_url.as_url_str(), download_n_extract=False, version=version)
15
- if system() == "Windows":
16
- url.joinpath(f"rust-analyzer-x86_64-pc-windows-msvc.gz").download().ungz(inplace=True).with_name("rust-analyzer.exe", inplace=True).move(folder="~/.cargo/bin", overwrite=True)
17
- else:
18
- url.joinpath(f"rust-analyzer-x86_64-unknown-linux-gnu.gz").download().ungz(inplace=True).with_name("rust-analyzer", inplace=True).move(folder="~/.cargo/bin", overwrite=True)
19
- # downloaded.move(folder=r"/usr/local/bin", overwrite=False)
20
-
21
-
22
- if __name__ == '__main__':
23
- pass
24
-
@@ -1,23 +0,0 @@
1
-
2
- # a TUI like winscp
3
-
4
- from machineconfig.utils.utils import get_latest_release
5
- from platform import system
6
- import crocodile.toolbox as tb
7
-
8
-
9
- repo_url = tb.P(r"https://github.com/veeso/termscp")
10
- __doc__ = """A TUI like winscp"""
11
-
12
- def main(version=None):
13
- if system() == 'Windows':
14
- suffix = "x86_64-pc-windows-msvc"
15
- exe = get_latest_release(repo_url.as_url_str(), suffix=suffix, download_n_extract=True, delete=False, version=version)
16
- else:
17
- suffix = "x86_64-unknown-linux-gnu"
18
- release = get_latest_release(repo_url.as_url_str(), download_n_extract=True, delete=True, suffix=suffix, compression="tar.gz", linux=True, version=version)
19
- return ""
20
-
21
-
22
- if __name__ == '__main__':
23
- main()
@@ -1,25 +0,0 @@
1
-
2
- # gives examples of how to use a command, its halfway between `man tool` and `tool --help`
3
- from machineconfig.utils.utils import get_latest_release, find_move_delete_linux
4
- import crocodile.toolbox as tb
5
- from platform import system
6
-
7
-
8
- url = r'https://github.com/dbrgn/tealdeer'
9
- __doc__ = "Too long, didn't read, but for cli tools."
10
-
11
-
12
- def main(version=None):
13
- if system() == 'Windows':
14
- f = get_latest_release(url, version=version).joinpath('tealdeer-windows-x86_64-msvc.exe').download().rename('tldr.exe')
15
- f.move(folder=f.get_env().WindowsApps, overwrite=True)
16
- elif system() == 'Linux':
17
- f = get_latest_release(url, version=version).joinpath('tealdeer-linux-x86_64-musl').download().rename('tldr')
18
- find_move_delete_linux(f, 'tldr', delete=True)
19
- tb.Terminal().run("tldr --update")
20
- else:
21
- raise NotImplementedError(f"System {system()} not supported")
22
-
23
-
24
- if __name__ == '__main__':
25
- main()
@@ -1,24 +0,0 @@
1
-
2
- from platform import system
3
- from machineconfig.utils.utils import get_latest_release
4
- import crocodile.toolbox as tb
5
-
6
-
7
- __doc__ = """Counts the number of lines of code, comments, and blanks in a project."""
8
-
9
-
10
- def main(version=None):
11
- url = get_latest_release('https://github.com/XAMPPRocky/tokei', download_n_extract=False, version=version)
12
-
13
- if system() == 'Windows':
14
- url.joinpath('tokei-x86_64-pc-windows-msvc.exe').download().move(folder=tb.get_env().WindowsApps, name='tokei.exe', overwrite=True)
15
- else:
16
- link = url.joinpath('tokei-x86_64-unknown-linux-gnu.tar.gz').download().ungz_untar(inplace=True)
17
- exe = link.joinpath('tokei')
18
- exe.chmod(0o777)
19
- # exe.move(folder=r"/usr/local/bin", overwrite=False)
20
- tb.Terminal().run(f"sudo mv {exe} /usr/local/bin/").print_if_unsuccessful(desc="MOVING executable to /usr/local/bin", strict_err=True, strict_returncode=True)
21
-
22
-
23
- if __name__ == '__main__':
24
- main()
@@ -1,26 +0,0 @@
1
-
2
- import crocodile.toolbox as tb
3
- from machineconfig.utils.utils import get_latest_release
4
- from rich.console import Console
5
- from platform import system
6
-
7
-
8
- __doc__ = """diskonaut is a terminal disk space navigator."""
9
-
10
-
11
- def main(version=None):
12
- if system() == "Windows":
13
- console = Console()
14
- console.rule("Installing diskonaut")
15
- url = r'https://drive.google.com/uc?id=1MsDaW6JXmS1LVyfThtUuJy4WRxODEjZB&export=download'
16
- dir_ = tb.P(url).download(name='diskonaut.zip').unzip(inplace=True)
17
- dir_.search()[0].move(folder=tb.get_env().WindowsApps, overwrite=True)
18
- dir_.delete(sure=True)
19
- console.rule("Completed Installation")
20
- else:
21
- url = r'https://github.com/imsnif/diskonaut'
22
- url = get_latest_release(url, download_n_extract=True, suffix="unknown-linux-musl", compression="tar.gz", linux=True, version=version)
23
-
24
-
25
- if __name__ == '__main__':
26
- main()
@@ -1,21 +0,0 @@
1
-
2
-
3
- from machineconfig.utils.utils import get_latest_release
4
- from platform import system
5
-
6
-
7
- url = "https://github.com/Byron/dua-cli"
8
- __doc__ = """Rust-based cli tool to get a quick overview of disk usage."""
9
-
10
- def main(version=None):
11
- if system() == 'Windows':
12
- suffix = "x86_64-pc-windows-msvc"
13
- _ = get_latest_release(url, tool_name="dua", suffix=suffix, download_n_extract=True, delete=False, strip_v=False, compression="zip", version=version)
14
- else:
15
- suffix = "x86_64-unknown-linux-musl"
16
- _ = get_latest_release(url, tool_name="dua", download_n_extract=True, delete=True, suffix=suffix, compression="tar.gz", linux=True, version=version)
17
- return ""
18
-
19
-
20
- if __name__ == '__main__':
21
- main()
@@ -1,21 +0,0 @@
1
-
2
-
3
- from machineconfig.utils.utils import get_latest_release
4
- from platform import system
5
-
6
-
7
- url = "https://github.com/evcxr/evcxr"
8
-
9
-
10
- def main(version=None):
11
- if system() == 'Windows':
12
- suffix = "x86_64-pc-windows-msvc"
13
- _ = get_latest_release(url, tool_name="evcxr", suffix=suffix, download_n_extract=True, delete=True, strip_v=False, compression="zip", version=version)
14
- else:
15
- suffix = "x86_64-unknown-linux-gnu"
16
- _ = get_latest_release(url, tool_name="evcxr", download_n_extract=True, delete=True, suffix=suffix, compression="tar.gz", linux=True, version=version)
17
- return ""
18
-
19
-
20
- if __name__ == '__main__':
21
- main()
@@ -1,23 +0,0 @@
1
-
2
-
3
- from machineconfig.utils.utils import get_latest_release, find_move_delete_linux, find_move_delete_windows
4
- # import crocodile.toolbox as tb
5
- import platform
6
-
7
-
8
- __doc__ = """gitui is a terminal ui for git written in rust."""
9
-
10
- def main(version=None):
11
- url = get_latest_release("https://github.com/extrawurst/gitui", version=version)
12
- if platform.system() == "Linux":
13
- download = url.joinpath(f"gitui-linux-musl.tar.gz").download().ungz_untar(inplace=True)
14
- find_move_delete_linux(downloaded=download, tool_name="gitui")
15
- elif platform.system() == "Windows":
16
- download = url.joinpath(f"gitui-win.tar.gz").download().ungz_untar(inplace=True)
17
- find_move_delete_windows(downloaded=download, tool_name="gitui.exe")
18
- else:
19
- raise Exception(f"Not supported OS for gitui {platform.system()}")
20
-
21
-
22
- if __name__ == '__main__':
23
- main()
@@ -1,19 +0,0 @@
1
-
2
- from machineconfig.utils.utils import get_latest_release
3
- from platform import system
4
- # import crocodile.toolbox as tb
5
-
6
-
7
- url = r"https://github.com/gopasspw/gopass"
8
- __doc__ = """cli password manager"""
9
-
10
- def main(version=None):
11
- if system() == "Windows":
12
- get_latest_release(url, suffix="windows-amd64", download_n_extract=True, strip_v=True, tool_name="gopass", delete=False, version=version)
13
- elif system() == "Linux":
14
- get_latest_release(url, suffix="linux-amd64", download_n_extract=True, linux=True, compression="tar.gz", strip_v=True, tool_name="gopass", delete=False, version=version)
15
- else: raise NotImplementedError(f"System {system()} is not supported")
16
-
17
-
18
- if __name__ == '__main__':
19
- main()
@@ -1,45 +0,0 @@
1
-
2
- from machineconfig.utils.utils import get_latest_release
3
- from platform import system
4
- import crocodile.toolbox as tb
5
-
6
- repo_url = tb.P(r"https://github.com/helix-editor/helix")
7
- __doc__ = f"""Rust-based TUI editor"""
8
-
9
- def main(version=None):
10
- if system() == 'Windows':
11
- from crocodile.environment import AppData
12
- target = AppData
13
- suffix = "x86_64-windows"
14
- compression = "zip"
15
- exe = get_latest_release(repo_url.as_url_str(), download_n_extract=True, suffix=suffix, delete=False, exe_name="hx", version=version)
16
- else:
17
- target = tb.P.home().joinpath(".config")
18
- suffix = "x86_64-linux"
19
- compression = 'tar.xz'
20
- exe = get_latest_release(repo_url.as_url_str(), download_n_extract=False, suffix=suffix, version=version)
21
- name = f'{repo_url[-1]}-{exe[-1]}-{suffix}.tar.xz'
22
- exe = exe.joinpath(name).download().unxz_untar(inplace=True)
23
- exe = exe.search()[0].joinpath("hx")
24
- exe.chmod(0o777)
25
- # exe.move(folder=r"/usr/local/bin", overwrite=True)
26
- tb.Terminal().run(f"sudo mv {exe} /usr/local/bin/").print_if_unsuccessful(desc="MOVING executable to /usr/local/bin", strict_err=True, strict_returncode=True)
27
-
28
- exe.parent.joinpath("runtime").move(folder=target.joinpath("helix"), overwrite=True)
29
- exe.parent.joinpath("contrib").move(folder=target.joinpath("helix"), overwrite=True)
30
- exe.parent.parent.delete(sure=True)
31
-
32
- # as per https://github.com/helix-editor/helix/wiki/How-to-install-the-default-language-servers
33
- # and https://spacevim.org/use-vim-as-a-python-ide/
34
-
35
-
36
- """
37
- #cd ~; mkdir "tmp_asdf"; cd tmp_asdf
38
- #latest=$(get_latest_release "helix-editor/helix")
39
- #wget https://github.com/helix-editor/helix/releases/download/$latest/helix-$latest-x86_64-linux.tar.xz
40
- #tar -xf *; chmod +x ./nu; sudo mv ./nu /usr/local/bin/; cd ~; rm -rdf tmp_asdf
41
- """
42
-
43
-
44
- if __name__ == '__main__':
45
- main()
@@ -1,20 +0,0 @@
1
-
2
- from machineconfig.utils.utils import get_latest_release, find_move_delete_linux
3
- from platform import system
4
-
5
-
6
- url = 'https://github.com/tbillington/kondo'
7
-
8
-
9
- def main(version=None):
10
- if system() == 'Windows':
11
- get_latest_release(url, download_n_extract=True, file_name='kondo-x86_64-pc-windows-msvc.zip', version=version)
12
- elif system() == 'Linux':
13
- downloaded = get_latest_release(url, download_n_extract=False, version=version).joinpath("kondo-x86_64-unknown-linux-gnu.tar.gz").download().ungz_untar(inplace=True)
14
- find_move_delete_linux(downloaded=downloaded, tool_name="kondo")
15
- else:
16
- raise NotImplementedError(f"System {system()} not supported")
17
-
18
-
19
- if __name__ == '__main__':
20
- main()
@@ -1,25 +0,0 @@
1
-
2
- # LF (golang)
3
- from machineconfig.utils.utils import get_latest_release
4
- import crocodile.toolbox as tb
5
- import platform
6
-
7
- url = 'https://github.com/gokcehan/lf'
8
- __doc__ = """lf is a terminal file manager written in go."""
9
-
10
- def main(version=None):
11
-
12
- if platform.system() == 'Windows':
13
- # tb.Terminal().run("nu -c 'ps | where name == lf.exe | each { |it| kill $it.pid --force}'", shell="pwsh").print()
14
- tb.L(tb.install_n_import("psutil").process_iter()).filter(lambda x: x.name() == 'lf.exe').apply(lambda x: x.kill())
15
- get_latest_release(url, file_name='lf-windows-amd64.zip', download_n_extract=True, version=version)
16
- elif platform.system() == 'Linux':
17
- tb.Terminal().run("killall lf")
18
- get_latest_release(url, file_name='lf-linux-amd64.tar.gz', download_n_extract=True, linux=True, compression="tar.gz", version=version)
19
- else: raise NotImplementedError(f"Platform {platform.system()} not supported.")
20
-
21
- return f""
22
-
23
-
24
- if __name__ == '__main__':
25
- main()
@@ -1,34 +0,0 @@
1
-
2
- import crocodile.toolbox as tb
3
- from platform import system
4
- import machineconfig
5
-
6
- # https://github.com/LunarVim/LunarVim
7
-
8
-
9
- def main(version=None):
10
- _ = version
11
- if system() == "Windows":
12
- tb.P.home().joinpath(r"AppData/Local/lvim").delete(sure=True)
13
- # tb.P.home().joinpath("AppData/Roaming/lunarvim").delete(sure=True)
14
- install_script = "$LV_BRANCH='release-1.2/neovim-0.8'; Invoke-WebRequest https://raw.githubusercontent.com/LunarVim/LunarVim/master/utils/installer/install.ps1 -UseBasicParsing | Invoke-Expression"
15
- # install_script = "Invoke-WebRequest https://raw.githubusercontent.com/LunarVim/LunarVim/master/utils/installer/install.ps1 -UseBasicParsing | Invoke-Expression"
16
- uninstall_script = "Invoke-WebRequest https://raw.githubusercontent.com/LunarVim/LunarVim/master/utils/installer/uninstall.ps1 -UseBasicParsing | Invoke-Expression"
17
- script = f"""{uninstall_script} ; {install_script}
18
- cd ~/AppData/Local
19
- git clone https://github.com/ChristianChiarulli/lvim
20
- """
21
- # tb.T().run(script, shell="pwsh")
22
- # tb.P(r"AppData/Local/lvim").joinpath("config.lua").append_text(tb.P(machineconfig.__file__).joinpath("src/machineconfig/settings/lvim_windows/config_additional.lua").read_text())
23
- return script
24
- else:
25
- tb.P.home().joinpath(".config/lvim").delete(sure=True)
26
- install_script = "LV_BRANCH='release-1.2/neovim-0.8' bash <(curl -s https://raw.githubusercontent.com/lunarvim/lunarvim/master/utils/installer/install.sh)"
27
- # install_script = r"bash <(curl -s https://raw.githubusercontent.com/LunarVim/LunarVim/rolling/utils/installer/install-neovim-from-release)"
28
- # script = install_script
29
- # tb.T().run(script, shell="pwsh")
30
- return install_script
31
-
32
-
33
- if __name__ == '__main__':
34
- main()
@@ -1,20 +0,0 @@
1
-
2
-
3
- from machineconfig.utils.utils import get_latest_release
4
- import platform
5
-
6
-
7
- url = "https://github.com/pvolok/mprocs"
8
- __doc__ = """Windows/Linux poorman's zellij"""
9
-
10
- def main(version=None):
11
- if platform.system() == "Windows":
12
- get_latest_release(url, suffix="win64", download_n_extract=True, version=version, strip_v=True)
13
- elif platform.system() == "Linux":
14
- get_latest_release(url, suffix="linux64", download_n_extract=True, linux=True, compression="tar.gz", version=version, strip_v=True)
15
- else:
16
- raise NotImplementedError(f"Platform {platform.system()} not supported.")
17
-
18
-
19
- if __name__ == '__main__':
20
- main()
@@ -1,20 +0,0 @@
1
-
2
- from machineconfig.utils.utils import get_latest_release
3
- import platform
4
-
5
-
6
- url = "https://github.com/denisidoro/navi"
7
- __doc__ = """Interactive cheatsheet tool for the command-line"""
8
-
9
-
10
- def main(version=None):
11
- if platform.system() == "Windows":
12
- get_latest_release(url, suffix="x86_64-pc-windows-gnu", download_n_extract=True, version=version)
13
- elif platform.system() == "Linux":
14
- get_latest_release(url, suffix="x86_64-unknown-linux-musl", download_n_extract=True, linux=True, compression="tar.gz", version=version)
15
- else:
16
- raise NotImplementedError(f"Platform {platform.system()} not supported.")
17
-
18
-
19
- if __name__ == '__main__':
20
- main()
@@ -1,26 +0,0 @@
1
-
2
-
3
- from machineconfig.utils.utils import get_latest_release, find_move_delete_windows, find_move_delete_linux
4
- import crocodile.toolbox as tb
5
- import platform
6
-
7
-
8
- url = "https://github.com/sniptt-official/ots"
9
- __doc__ = """A command line tool for generating and verifying one-time secrets."""
10
-
11
-
12
- def main(version=None):
13
- if platform.system() == "Windows":
14
- latest = get_latest_release(url, download_n_extract=False, version=version)
15
- downloaded = latest.joinpath(f'ots_{latest[-1].str.replace("v", "")}_windows_amd64.zip').download()
16
- find_move_delete_windows(downloaded=downloaded.unzip(inplace=True), tool_name="ots", delete=True)
17
- elif platform.system() == "Linux":
18
- latest = get_latest_release(url, suffix="x86_64-linux", download_n_extract=True, linux=True, compression="zip", version=version)
19
- downloaded = latest.joinpath(f'ots_{latest[-1].str.replace("v", "")}_linux_amd64.tar.gz').download()
20
- find_move_delete_linux(downloaded=downloaded.ungz_untar(inplace=True), tool_name="ots", delete=True)
21
- else:
22
- raise NotImplementedError(f"Platform {platform.system()} not supported.")
23
-
24
-
25
- if __name__ == '__main__':
26
- main()
@@ -1,25 +0,0 @@
1
-
2
-
3
- from machineconfig.utils.utils import get_latest_release, find_move_delete_windows, find_move_delete_linux
4
- import crocodile.toolbox as tb
5
- import platform
6
-
7
-
8
- url = "https://github.com/ouch-org/ouch"
9
- __doc__ = """A cli for extracting and creating archives in unified way."""
10
-
11
-
12
- def main(version=None):
13
- dl = get_latest_release(url, download_n_extract=False, version=version)
14
- if platform.system() == "Windows":
15
- res = dl.joinpath(f"ouch-x86_64-pc-windows-msvc.zip").download().unzip(inplace=True)
16
- find_move_delete_windows(downloaded=res, tool_name="ouch", delete=True)
17
- elif platform.system() == "Linux":
18
- res = dl.joinpath("ouch-x86_64-unknown-linux-gnu.tar.gz").download().ungz_untar(inplace=True)
19
- find_move_delete_linux(downloaded=res, tool_name="ouch", delete=True)
20
- else:
21
- raise NotImplementedError(f"Platform {platform.system()} not supported.")
22
-
23
-
24
- if __name__ == '__main__':
25
- main()
@@ -1,19 +0,0 @@
1
-
2
- from machineconfig.utils.utils import get_latest_release
3
- import platform
4
-
5
-
6
- url = "https://github.com/open-pomodoro/openpomodoro-cli"
7
- __doc__ = """Pomodoro timer for the command-line"""
8
-
9
- def main(version=None):
10
- if platform.system() == "Windows":
11
- get_latest_release(url, suffix="windows_amd64", download_n_extract=True, version=version, strip_v=True, compression="tar.gz", sep="_")
12
- elif platform.system() == "Linux":
13
- get_latest_release(url, suffix="linux_amd64", download_n_extract=True, linux=True, compression="tar.gz", version=version, strip_v=True, sep="_", exe_name="pomodoro")
14
- else:
15
- raise NotImplementedError(f"Platform {platform.system()} not supported.")
16
-
17
-
18
- if __name__ == '__main__':
19
- main()
@@ -1,20 +0,0 @@
1
-
2
- from machineconfig.utils.utils import get_latest_release
3
- import crocodile.toolbox as tb
4
- import platform
5
-
6
-
7
- url = "https://github.com/dalance/procs/"
8
- __doc__ = """procs is a modern replacement for ps written in Rust."""
9
-
10
- def main(version=None):
11
- if platform.system() == "Windows":
12
- get_latest_release(url, suffix="x86_64-windows", download_n_extract=True, version=version)
13
- elif platform.system() == "Linux":
14
- get_latest_release(url, suffix="x86_64-linux", download_n_extract=True, linux=True, compression="zip", version=version)
15
- else:
16
- raise NotImplementedError(f"Platform {platform.system()} not supported.")
17
-
18
-
19
- if __name__ == '__main__':
20
- main()
@@ -1,22 +0,0 @@
1
-
2
- from platform import system
3
- from machineconfig.utils.utils import get_latest_release, find_move_delete_linux, find_move_delete_windows
4
- import crocodile.toolbox as tb
5
-
6
-
7
- def main(version=None):
8
- # =================================================== python's qr code to create qrcode on terminal from simple text.
9
- tb.Terminal().run("pip install qrcode", shell="pwsh")
10
-
11
- # =================================================== Go's qrcp to allow file transfer between computer and phone.
12
- url = get_latest_release("https://github.com/claudiodangelis/qrcp", download_n_extract=False, version=version)
13
- if system() == "Windows":
14
- downloaded = url.joinpath(f"qrcp_{url[-1].str.replace('v', '')}_Windows_x86_64.tar.gz").download().ungz_untar(inplace=True)
15
- find_move_delete_windows(downloaded, "qrcp")
16
- else:
17
- downloaded = url.joinpath(f"qrcp_{url[-1].str.replace('v', '')}_linux_x86_64.tar.gz").download().ungz_untar(inplace=True)
18
- find_move_delete_linux(downloaded, "qrcp")
19
-
20
-
21
- if __name__ == '__main__':
22
- main()
@@ -1,14 +0,0 @@
1
-
2
- from platform import system
3
- from machineconfig.utils.utils import get_latest_release, find_move_delete_linux, find_move_delete_windows
4
- import crocodile.toolbox as tb
5
-
6
-
7
- def main(version=None):
8
- # =================================================== Rust's qrscan to allow computers to scan qr code from webcam.
9
- if system() == 'Windows': _ = get_latest_release('https://github.com/sayanarijit/qrscan', download_n_extract=True, strip_v=True, version=version)
10
- else: _ = get_latest_release(repo_url='https://github.com/sayanarijit/qrscan', download_n_extract=True, linux=True, strip_v=True, version=version, suffix="x86_64-unknown-linux-gnu", compression="tar.gz")
11
-
12
-
13
- if __name__ == '__main__':
14
- main()
@@ -1,21 +0,0 @@
1
-
2
-
3
- from machineconfig.utils.utils import get_latest_release
4
- # import crocodile.toolbox as tb
5
- import platform
6
-
7
-
8
- url = r"https://github.com/rclone/rclone"
9
- __doc__ = """cli to sync to cloud storage providers."""
10
-
11
- def main(version=None):
12
- if platform.system() == "Windows":
13
- get_latest_release(url, suffix="windows-amd64", download_n_extract=True, version=version)
14
- elif platform.system() == "Linux":
15
- get_latest_release(url, suffix="linux-amd64", download_n_extract=True, linux=True, compression="zip", version=version)
16
- else:
17
- raise NotImplementedError(f"Platform {platform.system()} not supported.")
18
-
19
-
20
- if __name__ == '__main__':
21
- main()
@@ -1,24 +0,0 @@
1
-
2
- from machineconfig.utils.utils import get_latest_release
3
- from platform import system
4
- import crocodile.toolbox as tb
5
-
6
- """
7
- VSCode and Pycharm have their own extensions from marketplace, but for other editors, we need to install this LSP manually.
8
- """
9
-
10
- repo_url = tb.P(r"https://github.com/rust-lang/rust-analyzer")
11
-
12
-
13
- def main(version=None):
14
- url = get_latest_release(repo_url.as_url_str(), download_n_extract=False, version=version)
15
- if system() == "Windows":
16
- url.joinpath(f"rust-analyzer-x86_64-pc-windows-msvc.gz").download().ungz(inplace=True).with_name("rust-analyzer.exe", inplace=True).move(folder="~/.cargo/bin", overwrite=True)
17
- else:
18
- url.joinpath(f"rust-analyzer-x86_64-unknown-linux-gnu.gz").download().ungz(inplace=True).with_name("rust-analyzer", inplace=True).move(folder="~/.cargo/bin", overwrite=True)
19
- # downloaded.move(folder=r"/usr/local/bin", overwrite=False)
20
-
21
-
22
- if __name__ == '__main__':
23
- pass
24
-
@@ -1,26 +0,0 @@
1
-
2
-
3
- from machineconfig.utils.utils import get_latest_release
4
- from platform import system
5
- import crocodile.toolbox as tb
6
-
7
- repo_url = tb.P(r"https://github.com/mgunyho/tere")
8
- __doc__ = """Tere is a terminal file explorer written in Rust. No more ls + cd"""
9
-
10
- def main(version=None):
11
- if system() == 'Windows':
12
- from crocodile.environment import AppData
13
- target = AppData
14
- suffix = "x86_64-pc-windows-gnu"
15
- exe = get_latest_release(repo_url.as_url_str(), suffix=suffix, download_n_extract=True, delete=False, strip_v=True, version=version)
16
- else:
17
- release = get_latest_release(repo_url.as_url_str(), version=version)
18
- path = release.joinpath(f"tere-{str(release[-1]).replace('v', '')}-x86_64-unknown-linux-gnu.zip").download()
19
- exe = path.unzip(inplace=True).joinpath("tere")
20
- exe.chmod(0o777)
21
- # exe.move(folder=r"/usr/local/bin", overwrite=False)
22
- tb.Terminal().run(f"sudo mv {exe} /usr/local/bin/").print_if_unsuccessful(desc="MOVING executable to /usr/local/bin", strict_err=True, strict_returncode=True)
23
-
24
-
25
- if __name__ == '__main__':
26
- main()
@@ -1,23 +0,0 @@
1
-
2
- # a TUI like winscp
3
-
4
- from machineconfig.utils.utils import get_latest_release
5
- from platform import system
6
- import crocodile.toolbox as tb
7
-
8
-
9
- repo_url = tb.P(r"https://github.com/veeso/termscp")
10
-
11
-
12
- def main(version=None):
13
- if system() == 'Windows':
14
- suffix = "x86_64-pc-windows-msvc"
15
- exe = get_latest_release(repo_url.as_url_str(), suffix=suffix, download_n_extract=True, delete=False, version=version)
16
- else:
17
- suffix = "x86_64-unknown-linux-gnu"
18
- release = get_latest_release(repo_url.as_url_str(), download_n_extract=True, delete=True, suffix=suffix, compression="tar.gz", linux=True, version=version)
19
- return ""
20
-
21
-
22
- if __name__ == '__main__':
23
- main()
@@ -1,24 +0,0 @@
1
-
2
- # gives examples of how to use a command, its halfway between `man tool` and `tool --help`
3
- from machineconfig.utils.utils import get_latest_release, find_move_delete_linux
4
- import crocodile.toolbox as tb
5
- from platform import system
6
-
7
-
8
- url = r'https://github.com/dbrgn/tealdeer'
9
-
10
-
11
- def main(version=None):
12
- if system() == 'Windows':
13
- f = get_latest_release(url, version=version).joinpath('tealdeer-windows-x86_64-msvc.exe').download().rename('tldr.exe')
14
- f.move(folder=f.get_env().WindowsApps, overwrite=True)
15
- elif system() == 'Linux':
16
- f = get_latest_release(url, version=version).joinpath('tealdeer-linux-x86_64-musl').download().rename('tldr')
17
- find_move_delete_linux(f, 'tldr', delete=True)
18
- tb.Terminal().run("tldr --update")
19
- else:
20
- raise NotImplementedError(f"System {system()} not supported")
21
-
22
-
23
- if __name__ == '__main__':
24
- main()