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,73 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import crocodile.toolbox as tb
|
|
3
|
-
import platform
|
|
4
|
-
import machineconfig
|
|
5
|
-
from machineconfig.utils.utils import write_shell_script
|
|
6
|
-
from rich.panel import Panel
|
|
7
|
-
from rich.console import Console
|
|
8
|
-
# from rich.text import Text
|
|
9
|
-
|
|
10
|
-
system = platform.system()
|
|
11
|
-
lib_root = tb.P(machineconfig.__file__).parent
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
def main():
|
|
15
|
-
console = Console()
|
|
16
|
-
print("\n\n")
|
|
17
|
-
console.rule("Existing Python versions", style="bold red")
|
|
18
|
-
if system == "Windows":
|
|
19
|
-
tb.P.get_env().Path.search("python.exe").reduce()[1:].print()
|
|
20
|
-
else:
|
|
21
|
-
tb.L(set(tb.P.get_env().Path.search("python3*").reduce().filter(lambda x: not x.is_symlink() and "-" not in x))).print()
|
|
22
|
-
print("\n\n")
|
|
23
|
-
console.rule(f"Existing virtual environments")
|
|
24
|
-
ves = tb.P.home().joinpath("venvs").search("*", files=False).apply(lambda a_ve: (a_ve.name, a_ve.joinpath("pyvenv.cfg").read_text()))
|
|
25
|
-
ves.apply(lambda a_ve: console.print(Panel(a_ve[1], title=a_ve[0], style="bold blue")))
|
|
26
|
-
# ves.apply(lambda a_ve: tb.S(a_ve[1]).print(as_config=True, title=a_ve[0]))
|
|
27
|
-
|
|
28
|
-
dotted_py_version = input("Enter python version (3.9): ") or "3.9"
|
|
29
|
-
env_name = input("Enter virtual environment name (tst): ") or "tst"
|
|
30
|
-
repos = input("Install essential repos? (y/[n]): ") or "n"
|
|
31
|
-
|
|
32
|
-
env_path = tb.P.home().joinpath("venvs", env_name)
|
|
33
|
-
if env_path.exists():
|
|
34
|
-
console.rule(f"Deleting existing enviroment with similar name")
|
|
35
|
-
env_path.delete(sure=True)
|
|
36
|
-
|
|
37
|
-
scripts = lib_root.joinpath(f"setup_{system.lower()}/ve.{'ps1' if system == 'Windows' else 'sh'}").read_text()
|
|
38
|
-
variable_prefix = "$" if system == "Windows" else ""
|
|
39
|
-
line1 = f"{variable_prefix}ve_name='{env_name}'"
|
|
40
|
-
line2 = f"{variable_prefix}py_version='{dotted_py_version.replace('.', '') if system == 'Windows' else dotted_py_version}'"
|
|
41
|
-
lines = f"{line1}\n{line2}\n"
|
|
42
|
-
predef_script = """
|
|
43
|
-
if (-not (Test-Path variable:ve_name)) {
|
|
44
|
-
$ve_name='ve'
|
|
45
|
-
} else { Write-Host "ve_name is already defined as $ve_name" }
|
|
46
|
-
|
|
47
|
-
if (-not (Test-Path variable:py_vesrion)) {
|
|
48
|
-
$py_version=39
|
|
49
|
-
} else { Write-Host "py_version is already defined as $py_version" }
|
|
50
|
-
""" if system == "Windows" else f"""
|
|
51
|
-
if [ -z "$ve_name" ]; then
|
|
52
|
-
ve_name="ve"
|
|
53
|
-
fi
|
|
54
|
-
|
|
55
|
-
if [ -z "$py_version" ]; then
|
|
56
|
-
py_version=3.9
|
|
57
|
-
fi
|
|
58
|
-
"""
|
|
59
|
-
assert predef_script in scripts
|
|
60
|
-
scripts = scripts.replace(predef_script, lines)
|
|
61
|
-
|
|
62
|
-
if repos == "y":
|
|
63
|
-
text = lib_root.joinpath(f"setup_{system.lower()}/repos.{'ps1' if system == 'Windows' else 'sh'}").read_text()
|
|
64
|
-
text = tb.modify_text(txt_raw=text, txt_search="ve_name=", txt_alt=f"{variable_prefix}ve_name='{env_name}'", replace_line=True)
|
|
65
|
-
scripts += text
|
|
66
|
-
|
|
67
|
-
# write_shell_script(scripts, desc="Script to create ve environment")
|
|
68
|
-
return scripts
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
if __name__ == '__main__':
|
|
72
|
-
pass
|
|
73
|
-
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import crocodile.toolbox as tb
|
|
3
|
-
import machineconfig.jobs.python_windows_installers as inst
|
|
4
|
-
import machineconfig.jobs.python_generic_installers as gens
|
|
5
|
-
from machineconfig.jobs.python.python_linux_installers_all import main as linux_main
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
def get_cli_py_installers(dev=False):
|
|
9
|
-
path = tb.P(inst.__file__).parent
|
|
10
|
-
gens_path = tb.P(gens.__file__).parent
|
|
11
|
-
if dev:
|
|
12
|
-
path = path.joinpath("dev")
|
|
13
|
-
gens_path = gens_path.joinpath("dev")
|
|
14
|
-
return path.search("*.py", filters=[lambda x: "__init__" not in str(x)]) + gens_path.search("*.py", filters=[lambda x: "__init__" not in str(x)])
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
def main(dev=False):
|
|
18
|
-
installers = tb.L(get_cli_py_installers(dev=dev))
|
|
19
|
-
linux_main(installers=installers)
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
if __name__ == '__main__':
|
|
23
|
-
main(dev=False)
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
from machineconfig.utils.utils import get_latest_release, find_move_delete_linux
|
|
3
|
-
from platform import system
|
|
4
|
-
import crocodile.toolbox as tb
|
|
5
|
-
|
|
6
|
-
repo_url = tb.P(r"https://github.com/neovim/neovim")
|
|
7
|
-
release = get_latest_release(repo_url.as_url_str(), download_n_extract=False)
|
|
8
|
-
|
|
9
|
-
if system() == 'Windows':
|
|
10
|
-
release.joinpath("nvim-win64.msi").download()()
|
|
11
|
-
else:
|
|
12
|
-
release.joinpath("nvim-linux64.tar.gz").download().ungz_untar(inplace=True)
|
|
13
|
-
|
|
14
|
-
if __name__ == '__main__':
|
|
15
|
-
pass
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
"""
|
|
3
|
-
The executable of this program is suspicious according to virustotal.
|
|
4
|
-
"""
|
|
5
|
-
|
|
6
|
-
from machineconfig.utils.utils import get_latest_release, find_move_delete_linux
|
|
7
|
-
import crocodile.toolbox as tb
|
|
8
|
-
from platform import system
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
url = r'https://github.com/uw-labs/strongbox'
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
def main():
|
|
15
|
-
d_url = get_latest_release(url)
|
|
16
|
-
v = d_url.name.replace("v", "")
|
|
17
|
-
if system() == 'Linux':
|
|
18
|
-
f = d_url.joinpath(f"strongbox_{v}_linux_amd64").download().with_name("strongbox", inplace=True)
|
|
19
|
-
find_move_delete_linux(f, 'tldr', delete=True)
|
|
20
|
-
tb.Terminal().run("tldr --update")
|
|
21
|
-
|
|
22
|
-
elif system() == 'Windows':
|
|
23
|
-
f = d_url.joinpath(f"strongbox_{v}_windows_amd64.exe").download().with_name("strongbox.exe", inplace=True)
|
|
24
|
-
f.move(folder=f.get_env().WindowsApps, overwrite=True)
|
|
25
|
-
|
|
26
|
-
else:
|
|
27
|
-
raise NotImplementedError(f"System {system()} not supported")
|
|
28
|
-
tb.Terminal().run("strongbox -git-config", shell="powershell").print()
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
if __name__ == '__main__':
|
|
32
|
-
main()
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
"""
|
|
3
|
-
doesn't have --version
|
|
4
|
-
"""
|
|
5
|
-
|
|
6
|
-
from machineconfig.utils.utils import get_latest_release, find_move_delete_linux, find_move_delete_windows
|
|
7
|
-
from platform import system
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
url = "https://github.com/netxs-group/vtm"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
def main():
|
|
14
|
-
link = get_latest_release(url, download_n_extract=False)
|
|
15
|
-
if system() == 'Windows':
|
|
16
|
-
downloaded = link.joinpath("vtm_windows_amd64.zip").download().unzip(inplace=True)
|
|
17
|
-
find_move_delete_windows(downloaded, "vtm", delete=True)
|
|
18
|
-
else:
|
|
19
|
-
downloaded = link.joinpath("vtm_linux_amd64.tar.gz").download().ungz_untar(inplace=True)
|
|
20
|
-
find_move_delete_linux(downloaded, tool_name="vtm")
|
|
21
|
-
return ""
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
if __name__ == '__main__':
|
|
25
|
-
main()
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import crocodile.toolbox as tb
|
|
4
|
-
from rich.console import Console
|
|
5
|
-
from platform import system
|
|
6
|
-
from machineconfig.utils.utils import get_latest_release
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
__doc__ = """broot is an fzf variant for folder structure and layered search."""
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
if system() == 'Linux':
|
|
13
|
-
url = r'https://dystroy.org/broot/download/x86_64-linux/broot'
|
|
14
|
-
elif system() == 'Windows':
|
|
15
|
-
url = r'https://dystroy.org/broot/download/x86_64-pc-windows-gnu/broot.exe'
|
|
16
|
-
else:
|
|
17
|
-
raise Exception(f"Unsupported OS: {system()}")
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
def main(version=None):
|
|
21
|
-
print("\n\n\n")
|
|
22
|
-
console = Console()
|
|
23
|
-
console.rule("Installing Broot")
|
|
24
|
-
_ = get_latest_release("https://github.com/Canop/broot", version=version)
|
|
25
|
-
|
|
26
|
-
if system() == "Windows":
|
|
27
|
-
p = tb.P(url).download()
|
|
28
|
-
p.move(folder=tb.get_env().WindowsApps, overwrite=True)
|
|
29
|
-
else:
|
|
30
|
-
p = tb.P(url).download()
|
|
31
|
-
p.chmod(0o777) # p.move(folder=r'/usr/local/bin/', overwrite=True) Permission Error
|
|
32
|
-
tb.Terminal().run(f"sudo mv {p} /usr/local/bin/").print_if_unsuccessful(desc="MOVING executable to /usr/local/bin", strict_err=True, strict_returncode=True)
|
|
33
|
-
|
|
34
|
-
console.rule("Completed Installation")
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
if __name__ == '__main__':
|
|
38
|
-
main()
|
|
39
|
-
|
|
@@ -1,25 +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__ = """cpufetch is a small yet fancy CPU architecture fetching tool, like neofetch but for CPUs."""
|
|
9
|
-
|
|
10
|
-
def main(version=None):
|
|
11
|
-
url = get_latest_release("https://github.com/browsh-org/browsh", version=version)
|
|
12
|
-
if platform.system() == "Linux":
|
|
13
|
-
download = url.joinpath(f"browsh_{str(url[-1]).replace('v', '')}_linux_amd64").download().with_name("cpufetch", inplace=True, overwrite=True)
|
|
14
|
-
find_move_delete_linux(downloaded=download, tool_name="cpufetch")
|
|
15
|
-
elif platform.system() == "Windows":
|
|
16
|
-
url = url.joinpath(f"browsh_{str(url[-1]).replace('v', '')}_windows_amd64.exe")
|
|
17
|
-
print(f"Downloading {url}")
|
|
18
|
-
downloaded = url.download().with_name("browsh.exe", overwrite=True, inplace=True)
|
|
19
|
-
find_move_delete_windows(downloaded=downloaded, tool_name="browsh.exe")
|
|
20
|
-
else:
|
|
21
|
-
raise Exception(f"Not supported OS for gitui {platform.system()}")
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
if __name__ == '__main__':
|
|
25
|
-
main()
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import crocodile.toolbox as tb
|
|
4
|
-
from machineconfig.utils.utils import find_move_delete_linux
|
|
5
|
-
from rich.console import Console
|
|
6
|
-
from platform import system
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
def main(version=None):
|
|
10
|
-
_ = version
|
|
11
|
-
if system() == "Windows":
|
|
12
|
-
console = Console()
|
|
13
|
-
console.rule("Installing bitwarden")
|
|
14
|
-
url = r'https://vault.bitwarden.com/download/?app=cli&platform=windows'
|
|
15
|
-
dir_ = tb.P(url).download(name="file.zip").unzip(inplace=True)
|
|
16
|
-
dir_.search(f"bw.exe", r=True)[0].move(folder=tb.get_env().WindowsApps, overwrite=True)
|
|
17
|
-
dir_.delete(sure=True)
|
|
18
|
-
console.rule("Completed Installation")
|
|
19
|
-
else:
|
|
20
|
-
url = r'https://vault.bitwarden.com/download/?app=cli&platform=linux'
|
|
21
|
-
dir_ = tb.P(url).download(name="file.zip").unzip(inplace=True)
|
|
22
|
-
find_move_delete_linux(dir_, "bw", delete=True)
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
if __name__ == '__main__':
|
|
26
|
-
main()
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
from crocodile.meta import sys
|
|
3
|
-
from machineconfig.utils.utils import get_latest_release, find_move_delete_linux, find_move_delete_windows
|
|
4
|
-
from platform import system
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
url = "https://github.com/j178/chatgpt"
|
|
8
|
-
# see also: https://github.com/marcolardera/chatgpt-cli & https://github.com/kharvd/gpt-cli
|
|
9
|
-
# https://github.com/acheong08/ChatGPT
|
|
10
|
-
|
|
11
|
-
def main(version=None):
|
|
12
|
-
_ = version
|
|
13
|
-
latest = get_latest_release(url, download_n_extract=False)
|
|
14
|
-
if system() == "Windows":
|
|
15
|
-
downloaded = latest.joinpath("chatgpt_Windows_x86_64.zip").download().unzip()
|
|
16
|
-
find_move_delete_windows(downloaded=downloaded)
|
|
17
|
-
elif system() == "Linux":
|
|
18
|
-
downloaded = latest.joinpath("chatgpt_Linux_x86_64.tar.gz").download().ungz_untar()
|
|
19
|
-
find_move_delete_linux(downloaded=downloaded)
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
if __name__ == "__main__":
|
|
23
|
-
main()
|
|
24
|
-
|
|
@@ -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__ = """cpufetch is a small yet fancy CPU architecture fetching tool, like neofetch but for CPUs."""
|
|
9
|
-
|
|
10
|
-
def main(version=None):
|
|
11
|
-
url = get_latest_release("https://github.com/Dr-Noob/cpufetch", version=version)
|
|
12
|
-
if platform.system() == "Linux":
|
|
13
|
-
download = url.joinpath(f"cpufetch_x86_linux").download().rename("cpufetch")
|
|
14
|
-
find_move_delete_linux(downloaded=download, tool_name="cpufetch")
|
|
15
|
-
elif platform.system() == "Windows":
|
|
16
|
-
download = url.joinpath(f"cpufetch_x86-64_windows.exe").download().rename("cpufetch.exe")
|
|
17
|
-
find_move_delete_windows(downloaded=download, tool_name="cpufetch.exe")
|
|
18
|
-
else:
|
|
19
|
-
raise Exception(f"Not supported OS for gitui {platform.system()}")
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
if __name__ == '__main__':
|
|
23
|
-
main()
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
from machineconfig.utils.utils import get_latest_release, find_move_delete_linux
|
|
3
|
-
from platform import system
|
|
4
|
-
import crocodile.toolbox as tb
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
__doc__ = """delta is a viewer for git and diff output"""
|
|
8
|
-
repo_url = tb.P(r"https://github.com/dandavison/delta")
|
|
9
|
-
# from https://github.com/dandavison/delta#configuration
|
|
10
|
-
config_patch = """
|
|
11
|
-
[core]
|
|
12
|
-
pager = delta
|
|
13
|
-
|
|
14
|
-
[interactive]
|
|
15
|
-
diffFilter = delta --color-only --features=interactive
|
|
16
|
-
|
|
17
|
-
[delta]
|
|
18
|
-
features = decorations
|
|
19
|
-
side-by-side = true
|
|
20
|
-
|
|
21
|
-
[delta "interactive"]
|
|
22
|
-
keep-plus-minus-markers = false
|
|
23
|
-
|
|
24
|
-
[delta "decorations"]
|
|
25
|
-
commit-decoration-style = blue ol
|
|
26
|
-
commit-style = raw
|
|
27
|
-
file-style = omit
|
|
28
|
-
hunk-header-decoration-style = blue box
|
|
29
|
-
hunk-header-file-style = red
|
|
30
|
-
hunk-header-line-number-style = "#067a00"
|
|
31
|
-
hunk-header-style = file line-number syntax
|
|
32
|
-
"""
|
|
33
|
-
|
|
34
|
-
def main(version=None):
|
|
35
|
-
if system() == 'Windows':
|
|
36
|
-
# from crocodile.environment import AppData
|
|
37
|
-
# target = AppData
|
|
38
|
-
suffix = "x86_64-pc-windows-msvc"
|
|
39
|
-
_ = get_latest_release(repo_url.as_url_str(), suffix=suffix, download_n_extract=True, delete=True, strip_v=True, version=version)
|
|
40
|
-
else:
|
|
41
|
-
release = get_latest_release(repo_url.as_url_str(), version=version)
|
|
42
|
-
path = release.joinpath(f"delta-{str(release[-1]).replace('v', '')}-x86_64-unknown-linux-gnu.tar.gz").download()
|
|
43
|
-
downloaded = path.ungz_untar(inplace=True)
|
|
44
|
-
_ = find_move_delete_linux(downloaded, "delta", delete=True)
|
|
45
|
-
|
|
46
|
-
config_path = tb.P.home().joinpath(".gitconfig")
|
|
47
|
-
if config_path.exists():
|
|
48
|
-
config = config_path.read_text()
|
|
49
|
-
if config_patch in config: pass
|
|
50
|
-
else: config_path.write_text(config + "\n" + config_patch)
|
|
51
|
-
else:
|
|
52
|
-
config_path.delete(sure=True) # delete a bad symlink if any
|
|
53
|
-
config_path.write_text(config_patch)
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
if __name__ == '__main__':
|
|
57
|
-
main()
|
|
58
|
-
# pass
|
|
59
|
-
|
|
File without changes
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
from machineconfig.utils.utils import get_latest_release
|
|
3
|
-
import crocodile.toolbox as tb
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
url = "https://github.com/Significant-Gravitas/Auto-GPT"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
def main(version=None):
|
|
10
|
-
# _ = version
|
|
11
|
-
# latest = get_latest_release(url)
|
|
12
|
-
dest = tb.P.home().joinpath("code/foreign/Auto-GPT").delete(sure=True)
|
|
13
|
-
# download = tb.P(f"https://github.com/Significant-Gravitas/Auto-GPT/archive/refs/tags/{latest[-1]}.zip").download(name="Auto-GPT.zip").unzip().search()[0].move(folder=dest)
|
|
14
|
-
program = """
|
|
15
|
-
|
|
16
|
-
activate_ve latest
|
|
17
|
-
cd ~/code/foreign
|
|
18
|
-
git clone -b stable https://github.com/Significant-Gravitas/Auto-GPT.git
|
|
19
|
-
cd Auto-GPT
|
|
20
|
-
pip install -r requirements.txt
|
|
21
|
-
cp .env.template .env
|
|
22
|
-
|
|
23
|
-
"""
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
if __name__ == "__main__":
|
|
27
|
-
main()
|
|
28
|
-
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import crocodile.toolbox as tb
|
|
4
|
-
from machineconfig.utils.utils import find_move_delete_linux
|
|
5
|
-
from rich.console import Console
|
|
6
|
-
from platform import system
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
__doc__ = """Bitwarden (password manager) cli"""
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
def main(version=None):
|
|
13
|
-
_ = version
|
|
14
|
-
if system() == "Windows":
|
|
15
|
-
console = Console()
|
|
16
|
-
console.rule("Installing bitwarden")
|
|
17
|
-
url = r'https://vault.bitwarden.com/download/?app=cli&platform=windows'
|
|
18
|
-
dir_ = tb.P(url).download(name="file.zip").unzip(inplace=True)
|
|
19
|
-
dir_.search(f"bw.exe", r=True)[0].move(folder=tb.get_env().WindowsApps, overwrite=True)
|
|
20
|
-
dir_.delete(sure=True)
|
|
21
|
-
console.rule("Completed Installation")
|
|
22
|
-
else:
|
|
23
|
-
url = r'https://vault.bitwarden.com/download/?app=cli&platform=linux'
|
|
24
|
-
dir_ = tb.P(url).download(name="file.zip").unzip(inplace=True)
|
|
25
|
-
find_move_delete_linux(dir_, "bw", delete=True)
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
if __name__ == '__main__':
|
|
29
|
-
main()
|
|
@@ -1,22 +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
|
-
__doc__ = """An evaluation context for Rust."""
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
def main(version=None):
|
|
12
|
-
if system() == 'Windows':
|
|
13
|
-
suffix = "x86_64-pc-windows-msvc"
|
|
14
|
-
_ = get_latest_release(url, tool_name="evcxr", suffix=suffix, download_n_extract=True, delete=True, strip_v=False, compression="zip", version=version)
|
|
15
|
-
else:
|
|
16
|
-
suffix = "x86_64-unknown-linux-gnu"
|
|
17
|
-
_ = get_latest_release(url, tool_name="evcxr", download_n_extract=True, delete=True, suffix=suffix, compression="tar.gz", linux=True, version=version)
|
|
18
|
-
return ""
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
if __name__ == '__main__':
|
|
22
|
-
main()
|
|
@@ -1,21 +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
|
-
__doc__ = """cleans projects from litter files."""
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
def main(version=None):
|
|
11
|
-
if system() == 'Windows':
|
|
12
|
-
get_latest_release(url, download_n_extract=True, file_name='kondo-x86_64-pc-windows-msvc.zip', version=version)
|
|
13
|
-
elif system() == 'Linux':
|
|
14
|
-
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)
|
|
15
|
-
find_move_delete_linux(downloaded=downloaded, tool_name="kondo")
|
|
16
|
-
else:
|
|
17
|
-
raise NotImplementedError(f"System {system()} not supported")
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
if __name__ == '__main__':
|
|
21
|
-
main()
|
|
@@ -1,60 +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
|
-
__doc__ = "Terminal text editor based on neovim"
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
def main(version=None):
|
|
11
|
-
_ = version
|
|
12
|
-
if system() == "Windows":
|
|
13
|
-
tb.P.home().joinpath(r"AppData/Local/lvim").delete(sure=True)
|
|
14
|
-
# tb.P.home().joinpath("AppData/Roaming/lunarvim").delete(sure=True)
|
|
15
|
-
install_script = """pwsh -c "`$LV_BRANCH='release-1.3/neovim-0.9'; iwr https://raw.githubusercontent.com/LunarVim/LunarVim/release-1.3/neovim-0.9/utils/installer/install.ps1 -UseBasicParsing | iex" """
|
|
16
|
-
# install_script = "Invoke-WebRequest https://raw.githubusercontent.com/LunarVim/LunarVim/master/utils/installer/install.ps1 -UseBasicParsing | Invoke-Expression"
|
|
17
|
-
uninstall_script = "Invoke-WebRequest https://raw.githubusercontent.com/LunarVim/LunarVim/master/utils/installer/uninstall.ps1 -UseBasicParsing | Invoke-Expression"
|
|
18
|
-
script = f"""
|
|
19
|
-
# uninstall then install latest stable release as per https://www.lunarvim.org/docs/installation
|
|
20
|
-
{uninstall_script}
|
|
21
|
-
{install_script}
|
|
22
|
-
cd ~/AppData/Local
|
|
23
|
-
rm lvim -Force # kill bad symlinks there
|
|
24
|
-
git clone https://github.com/ChristianChiarulli/lvim
|
|
25
|
-
pip install pynvim
|
|
26
|
-
pip install flake8
|
|
27
|
-
pip install black
|
|
28
|
-
"""
|
|
29
|
-
# 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())
|
|
30
|
-
return script
|
|
31
|
-
else:
|
|
32
|
-
tb.P.home().joinpath(".config/lvim").delete(sure=True)
|
|
33
|
-
install_script = f"""
|
|
34
|
-
|
|
35
|
-
# uninstall then install latest stable release:
|
|
36
|
-
# from https://www.lunarvim.org/docs/installation
|
|
37
|
-
bash <(curl -s https://raw.githubusercontent.com/lunarvim/lunarvim/master/utils/installer/uninstall.sh)
|
|
38
|
-
sudo rm -rdf ~/.config/lvim || true # kill bad symlinks there
|
|
39
|
-
LV_BRANCH='release-1.3/neovim-0.9' bash <(curl -s https://raw.githubusercontent.com/LunarVim/LunarVim/release-1.3/neovim-0.9/utils/installer/install.sh)
|
|
40
|
-
export lvim="$HOME/.local/bin/lvim"
|
|
41
|
-
|
|
42
|
-
# config from Chris
|
|
43
|
-
sudo rm -rdf ~/.config/lvim || true # kill bad symlinks there
|
|
44
|
-
cd ~/.config
|
|
45
|
-
git clone https://github.com/ChristianChiarulli/lvim
|
|
46
|
-
sudo apt install xsel
|
|
47
|
-
|
|
48
|
-
pip install pynvim
|
|
49
|
-
pip install flake8
|
|
50
|
-
|
|
51
|
-
#lvim --headless + 'autocmd User PackerComplete quitall' +PackerSync
|
|
52
|
-
# :PackerSync
|
|
53
|
-
# :Copilot setup
|
|
54
|
-
|
|
55
|
-
"""
|
|
56
|
-
return install_script
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
if __name__ == '__main__':
|
|
60
|
-
main()
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import platform
|
|
3
|
-
import crocodile.toolbox as tb
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
__doc__ = """expose a local server behind a NAT or firewall to the internet"""
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
def main(version=None):
|
|
10
|
-
file = tb.P.home().joinpath("dotfiles/creds/tokens/ngrok")
|
|
11
|
-
if file.exists():
|
|
12
|
-
auth_token = file.read_text()
|
|
13
|
-
else:
|
|
14
|
-
auth_token = input("Enter your ngrok auth token: ")
|
|
15
|
-
file.write_text(auth_token)
|
|
16
|
-
_ = version
|
|
17
|
-
if platform.system() == 'Windows':
|
|
18
|
-
program = f"""
|
|
19
|
-
winget install --Id Ngrok.Ngrok
|
|
20
|
-
ngrok config add-authtoken {auth_token}
|
|
21
|
-
"""
|
|
22
|
-
elif platform.system() == 'Linux':
|
|
23
|
-
program = f"""
|
|
24
|
-
# get the latest from here: https://ngrok.com/download
|
|
25
|
-
curl https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-linux-amd64.tgz --output ~/Downloads/ngrok-v3-stable-linux-amd64.tgz
|
|
26
|
-
sudo tar xvzf ~/Downloads/ngrok-v3-stable-linux-amd64.tgz -C /usr/local/bin
|
|
27
|
-
ngrok config add-authtoken {auth_token}
|
|
28
|
-
"""
|
|
29
|
-
else:
|
|
30
|
-
raise NotImplementedError(f"Platform {platform.system()} not implemented")
|
|
31
|
-
return program
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
if __name__ == '__main__':
|
|
35
|
-
pass
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
# from machineconfig.utils.utils import write_shell_script
|
|
3
|
-
import crocodile.toolbox as tb
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
def main(version=None):
|
|
7
|
-
_ = version
|
|
8
|
-
token = input("Enter your OpenAI API key: ")
|
|
9
|
-
program = f"""
|
|
10
|
-
# as per: https://github.com/di-sukharev/opencommit
|
|
11
|
-
npm install -g opencommit
|
|
12
|
-
cd ~
|
|
13
|
-
echo "OPENAI_API_KEY={token}" > .opencommit
|
|
14
|
-
"""
|
|
15
|
-
# tb.Terminal().run(program, shell="powershell").print()
|
|
16
|
-
return program
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
if __name__ == '__main__':
|
|
20
|
-
pass
|
|
21
|
-
|
|
@@ -1,25 +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
|
-
__doc__ = """qr code file transfer"""
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
def main(version=None):
|
|
11
|
-
# =================================================== python's qr code to create qrcode on terminal from simple text.
|
|
12
|
-
tb.Terminal().run("pip install qrcode", shell="pwsh")
|
|
13
|
-
|
|
14
|
-
# =================================================== Go's qrcp to allow file transfer between computer and phone.
|
|
15
|
-
url = get_latest_release("https://github.com/claudiodangelis/qrcp", download_n_extract=False, version=version)
|
|
16
|
-
if system() == "Windows":
|
|
17
|
-
downloaded = url.joinpath(f"qrcp_{url[-1].str.replace('v', '')}_Windows_x86_64.tar.gz").download().ungz_untar(inplace=True)
|
|
18
|
-
find_move_delete_windows(downloaded, "qrcp")
|
|
19
|
-
else:
|
|
20
|
-
downloaded = url.joinpath(f"qrcp_{url[-1].str.replace('v', '')}_linux_x86_64.tar.gz").download().ungz_untar(inplace=True)
|
|
21
|
-
find_move_delete_linux(downloaded, "qrcp")
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
if __name__ == '__main__':
|
|
25
|
-
main()
|
|
@@ -1,16 +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
|
-
__doc__ = """qr code scanner"""
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
def main(version=None):
|
|
10
|
-
# =================================================== Rust's qrscan to allow computers to scan qr code from webcam.
|
|
11
|
-
if system() == 'Windows': _ = get_latest_release('https://github.com/sayanarijit/qrscan', download_n_extract=True, strip_v=True, version=version)
|
|
12
|
-
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")
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
if __name__ == '__main__':
|
|
16
|
-
main()
|