machineconfig 1.92__py3-none-any.whl → 1.94__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 +0 -8
- machineconfig/cluster/__init__.py +0 -0
- machineconfig/cluster/cloud_manager.py +359 -0
- machineconfig/cluster/data_transfer.py +56 -0
- machineconfig/cluster/distribute.py +280 -0
- machineconfig/cluster/file_manager.py +238 -0
- machineconfig/cluster/job_params.py +148 -0
- machineconfig/cluster/loader_runner.py +150 -0
- machineconfig/cluster/remote_machine.py +281 -0
- machineconfig/cluster/script_execution.py +209 -0
- machineconfig/cluster/script_notify_upon_completion.py +63 -0
- machineconfig/cluster/self_ssh.py +59 -0
- machineconfig/cluster/session_managers.py +183 -0
- machineconfig/cluster/templates/__init__.py +0 -0
- machineconfig/cluster/templates/cli_click.py +104 -0
- machineconfig/cluster/templates/cli_gooey.py +119 -0
- machineconfig/cluster/templates/cli_trogon.py +21 -0
- machineconfig/cluster/templates/f.py +4 -0
- machineconfig/cluster/templates/run_cloud.py +52 -0
- machineconfig/cluster/templates/run_cluster.py +69 -0
- machineconfig/cluster/templates/run_remote.py +67 -0
- machineconfig/cluster/templates/utils.py +37 -0
- machineconfig/jobs/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/jobs/linux/msc/lid.sh +26 -0
- machineconfig/jobs/linux/msc/network.sh +39 -0
- machineconfig/jobs/python/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/jobs/python/__pycache__/check_installations.cpython-311.pyc +0 -0
- machineconfig/jobs/python/__pycache__/checkout_version.cpython-311.pyc +0 -0
- machineconfig/jobs/python/__pycache__/python_ve_symlink.cpython-311.pyc +0 -0
- machineconfig/jobs/python/archive/python_tools.txt +12 -0
- machineconfig/jobs/python/check_installations.py +26 -11
- machineconfig/jobs/python/checkout_version.py +24 -13
- machineconfig/jobs/python/create_zellij_template.py +4 -4
- machineconfig/jobs/python/python_cargo_build_share.py +13 -4
- machineconfig/jobs/python/python_ve_symlink.py +15 -4
- machineconfig/jobs/python/vscode/__pycache__/api.cpython-311.pyc +0 -0
- machineconfig/jobs/python/vscode/__pycache__/link_ve.cpython-311.pyc +0 -0
- machineconfig/jobs/python/vscode/api.py +48 -0
- machineconfig/jobs/python/vscode/link_ve.py +64 -0
- machineconfig/jobs/python/vscode/select_interpreter.py +84 -0
- machineconfig/jobs/python/vscode/sync_code.py +60 -0
- machineconfig/jobs/python_custom_installers/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/jobs/python_custom_installers/__pycache__/hx.cpython-311.pyc +0 -0
- machineconfig/jobs/python_custom_installers/archive/ngrok.py +62 -0
- machineconfig/jobs/python_custom_installers/dev/aider.py +37 -0
- machineconfig/jobs/python_custom_installers/dev/alacritty.py +72 -0
- machineconfig/jobs/python_custom_installers/dev/brave.py +67 -0
- machineconfig/jobs/python_custom_installers/dev/bypass_paywall.py +50 -0
- machineconfig/jobs/python_custom_installers/dev/code.py +62 -0
- machineconfig/jobs/python_custom_installers/dev/cursor.py +67 -0
- machineconfig/jobs/python_custom_installers/dev/docker.py +70 -0
- machineconfig/jobs/python_custom_installers/dev/docker_desktop.py +77 -0
- machineconfig/jobs/python_custom_installers/dev/espanso.py +82 -0
- machineconfig/jobs/python_custom_installers/dev/goes.py +59 -0
- machineconfig/jobs/python_custom_installers/dev/lvim.py +76 -0
- machineconfig/jobs/python_custom_installers/dev/nerdfont.py +67 -0
- machineconfig/jobs/python_custom_installers/dev/redis.py +69 -0
- machineconfig/jobs/python_custom_installers/dev/reverse_proxy.md +31 -0
- machineconfig/jobs/python_custom_installers/dev/warp-cli.py +71 -0
- machineconfig/jobs/python_custom_installers/dev/wezterm.py +71 -0
- machineconfig/jobs/python_custom_installers/gh.py +46 -4
- machineconfig/jobs/python_custom_installers/hx.py +103 -18
- machineconfig/jobs/python_custom_installers/scripts/linux/brave.sh +52 -0
- machineconfig/jobs/python_custom_installers/scripts/linux/docker.sh +140 -0
- machineconfig/jobs/python_custom_installers/scripts/linux/docker_start.sh +48 -0
- machineconfig/jobs/python_custom_installers/scripts/linux/edge.sh +47 -0
- machineconfig/jobs/python_custom_installers/scripts/linux/nerdfont.sh +64 -0
- machineconfig/jobs/python_custom_installers/scripts/linux/pgsql.sh +53 -0
- machineconfig/jobs/python_custom_installers/scripts/linux/redis.sh +76 -0
- machineconfig/jobs/python_custom_installers/scripts/linux/timescaledb.sh +91 -0
- machineconfig/jobs/python_custom_installers/scripts/linux/vscode.sh +66 -0
- machineconfig/jobs/python_custom_installers/scripts/linux/warp-cli.sh +77 -0
- machineconfig/jobs/python_custom_installers/scripts/linux/wezterm.sh +43 -0
- machineconfig/jobs/python_generic_installers/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/jobs/python_generic_installers/config.json +267 -0
- machineconfig/jobs/python_generic_installers/dev/config.archive.json +18 -0
- machineconfig/jobs/python_generic_installers/dev/config.json +394 -0
- machineconfig/jobs/python_linux_installers/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/jobs/python_linux_installers/archive/config.json +10 -0
- machineconfig/jobs/python_linux_installers/config.json +74 -0
- machineconfig/jobs/python_linux_installers/dev/config.json +138 -0
- machineconfig/jobs/python_windows_installers/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/jobs/python_windows_installers/archive/file.json +11 -0
- machineconfig/jobs/python_windows_installers/config.json +50 -0
- machineconfig/jobs/python_windows_installers/dev/config.json +3 -0
- machineconfig/jobs/windows/archive/archive_pygraphviz.ps1 +14 -0
- machineconfig/jobs/windows/archive/openssh-server_add_key.ps1 +7 -0
- machineconfig/jobs/windows/archive/openssh-server_copy-ssh-id.ps1 +14 -0
- machineconfig/jobs/windows/start_terminal.ps1 +6 -0
- machineconfig/jobs/windows/startup_file.cmd +2 -0
- machineconfig/profile/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/profile/__pycache__/create.cpython-311.pyc +0 -0
- machineconfig/profile/__pycache__/shell.cpython-311.pyc +0 -0
- machineconfig/profile/create.py +47 -13
- machineconfig/profile/create_hardlinks.py +42 -12
- machineconfig/profile/records/generic/shares.toml +5 -0
- machineconfig/profile/records/linux/apps_summary_report.csv +48 -0
- machineconfig/profile/records/linux/apps_summary_report.md +49 -0
- machineconfig/profile/records/windows/apps_summary_report.csv +1 -0
- machineconfig/profile/records/windows/apps_summary_report.md +2 -0
- machineconfig/profile/shell.py +62 -11
- machineconfig/scripts/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/scripts/cloud/init.sh +128 -0
- machineconfig/scripts/linux/activate_ve +87 -0
- machineconfig/scripts/linux/archive/tmate_conn +12 -0
- machineconfig/scripts/linux/archive/tmate_start +12 -0
- machineconfig/scripts/linux/archive/transfer_wsl_win +5 -0
- machineconfig/scripts/linux/checkout_versions +8 -0
- machineconfig/scripts/linux/choose_wezterm_theme +9 -0
- machineconfig/scripts/linux/cloud_copy +9 -0
- machineconfig/scripts/linux/cloud_manager +8 -0
- machineconfig/scripts/linux/cloud_mount +24 -0
- machineconfig/scripts/linux/cloud_repo_sync +22 -0
- machineconfig/scripts/linux/cloud_sync +24 -0
- machineconfig/scripts/linux/croshell +24 -0
- machineconfig/scripts/linux/devops +24 -0
- machineconfig/scripts/linux/fire +46 -0
- machineconfig/scripts/linux/ftpx +8 -0
- machineconfig/scripts/linux/fzf2g +21 -0
- machineconfig/scripts/linux/fzfag +17 -0
- machineconfig/scripts/linux/fzffg +25 -0
- machineconfig/scripts/linux/fzfg +23 -0
- machineconfig/scripts/linux/fzfrga +21 -0
- machineconfig/scripts/linux/gh_models +11 -0
- machineconfig/scripts/linux/kill_process +10 -0
- machineconfig/scripts/linux/mount_drive +128 -0
- machineconfig/scripts/linux/mount_nfs +62 -0
- machineconfig/scripts/linux/mount_nw_drive +72 -0
- machineconfig/scripts/linux/mount_smb +3 -0
- machineconfig/scripts/linux/programs +21 -0
- machineconfig/scripts/linux/repos +24 -0
- machineconfig/scripts/linux/scheduler +8 -0
- machineconfig/scripts/linux/share_cloud.sh +81 -0
- machineconfig/scripts/linux/share_nfs +49 -0
- machineconfig/scripts/linux/share_smb +1 -0
- machineconfig/scripts/linux/skrg +4 -0
- machineconfig/scripts/linux/start_docker +23 -0
- machineconfig/scripts/linux/start_slidev +23 -0
- machineconfig/scripts/linux/start_terminals +12 -0
- machineconfig/scripts/linux/switch_ip +20 -0
- machineconfig/scripts/linux/url2md +10 -0
- machineconfig/scripts/linux/z_ls +104 -0
- machineconfig/scripts/python/.mypy_cache/.gitignore +2 -0
- machineconfig/scripts/python/.mypy_cache/3.11/@plugins_snapshot.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/__future__.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/__future__.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/_ast.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/_ast.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/_bz2.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/_bz2.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/_codecs.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/_codecs.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/_collections_abc.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/_collections_abc.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/_compression.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/_compression.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/_decimal.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/_decimal.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/_frozen_importlib.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/_frozen_importlib.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/_frozen_importlib_external.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/_frozen_importlib_external.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/_io.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/_io.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/_locale.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/_locale.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/_stat.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/_stat.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/_struct.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/_struct.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/_thread.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/_thread.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/_typeshed/__init__.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/_typeshed/__init__.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/_typeshed/importlib.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/_typeshed/importlib.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/_warnings.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/_warnings.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/_weakref.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/_weakref.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/_weakrefset.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/_weakrefset.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/abc.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/abc.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/argparse.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/argparse.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/ast.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/ast.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/binascii.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/binascii.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/builtins.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/builtins.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/bz2.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/bz2.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/calendar.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/calendar.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/codecs.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/codecs.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/collections/__init__.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/collections/__init__.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/collections/abc.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/collections/abc.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/configparser.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/configparser.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/contextlib.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/contextlib.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/dataclasses.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/dataclasses.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/datetime.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/datetime.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/decimal.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/decimal.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/dis.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/dis.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/email/__init__.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/email/__init__.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/email/_policybase.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/email/_policybase.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/email/charset.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/email/charset.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/email/contentmanager.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/email/contentmanager.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/email/errors.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/email/errors.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/email/header.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/email/header.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/email/message.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/email/message.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/email/policy.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/email/policy.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/enum.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/enum.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/fnmatch.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/fnmatch.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/functools.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/functools.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/gc.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/gc.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/genericpath.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/genericpath.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/getpass.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/getpass.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/__init__.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/__init__.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/cmd.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/cmd.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/compat.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/compat.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/config.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/config.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/db.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/db.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/diff.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/diff.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/exc.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/exc.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/index/__init__.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/index/__init__.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/index/base.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/index/base.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/index/fun.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/index/fun.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/index/typ.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/index/typ.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/index/util.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/index/util.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/__init__.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/__init__.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/base.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/base.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/blob.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/blob.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/commit.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/commit.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/fun.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/fun.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/submodule/__init__.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/submodule/__init__.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/submodule/base.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/submodule/base.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/submodule/root.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/submodule/root.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/submodule/util.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/submodule/util.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/tag.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/tag.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/tree.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/tree.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/util.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/util.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/__init__.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/__init__.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/head.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/head.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/log.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/log.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/reference.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/reference.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/remote.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/remote.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/symbolic.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/symbolic.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/tag.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/tag.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/remote.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/remote.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/repo/__init__.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/repo/__init__.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/repo/base.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/repo/base.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/repo/fun.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/repo/fun.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/types.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/types.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/util.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/git/util.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/glob.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/glob.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/gzip.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/gzip.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/__init__.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/__init__.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/_abc.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/_abc.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/_bootstrap.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/_bootstrap.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/_bootstrap_external.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/_bootstrap_external.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/abc.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/abc.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/machinery.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/machinery.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/metadata/__init__.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/metadata/__init__.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/metadata/_meta.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/metadata/_meta.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/readers.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/readers.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/resources/__init__.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/resources/__init__.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/resources/_common.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/resources/_common.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/resources/abc.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/resources/abc.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/inspect.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/inspect.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/io.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/io.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/itertools.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/itertools.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/locale.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/locale.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/logging/__init__.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/logging/__init__.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/mimetypes.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/mimetypes.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/mmap.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/mmap.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/numbers.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/numbers.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/opcode.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/opcode.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/os/__init__.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/os/__init__.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/os/path.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/os/path.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/pathlib.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/pathlib.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/platform.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/platform.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/posixpath.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/posixpath.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/re.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/re.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/resource.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/resource.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/shlex.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/shlex.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/shutil.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/shutil.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/signal.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/signal.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/src/__init__.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/src/__init__.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/src/machineconfig/__init__.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/src/machineconfig/__init__.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/src/machineconfig/scripts/__init__.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/src/machineconfig/scripts/__init__.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/src/machineconfig/scripts/python/__init__.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/src/machineconfig/scripts/python/__init__.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/sre_compile.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/sre_compile.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/sre_constants.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/sre_constants.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/sre_parse.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/sre_parse.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/stat.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/stat.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/string.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/string.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/struct.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/struct.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/subprocess.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/subprocess.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/sys/__init__.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/sys/__init__.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/tarfile.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/tarfile.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/tempfile.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/tempfile.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/textwrap.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/textwrap.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/threading.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/threading.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/time.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/time.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/types.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/types.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/typing.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/typing.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/typing_extensions.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/typing_extensions.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/urllib/__init__.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/urllib/__init__.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/urllib/parse.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/urllib/parse.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/uuid.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/uuid.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/warnings.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/warnings.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/weakref.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/weakref.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/zipfile/__init__.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/zipfile/__init__.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/zlib.data.json +1 -0
- machineconfig/scripts/python/.mypy_cache/3.11/zlib.meta.json +1 -0
- machineconfig/scripts/python/.mypy_cache/CACHEDIR.TAG +3 -0
- machineconfig/scripts/python/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/cloud_copy.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/cloud_mount.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/cloud_repo_sync.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/cloud_sync.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/croshell.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/devops.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/devops_backup_retrieve.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/devops_devapps_install.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/devops_update_repos.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/fire_jobs.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/gh_models.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/repos.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/url2md.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/viewer.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/vscode_api.cpython-311.pyc +0 -0
- machineconfig/scripts/python/archive/im2text.py +36 -0
- machineconfig/scripts/python/archive/tmate_conn.py +44 -0
- machineconfig/scripts/python/archive/tmate_start.py +48 -0
- machineconfig/scripts/python/choose_wezterm_theme.py +23 -4
- machineconfig/scripts/python/cloud_copy.py +131 -29
- machineconfig/scripts/python/cloud_manager.py +55 -2
- machineconfig/scripts/python/cloud_mount.py +43 -4
- machineconfig/scripts/python/cloud_repo_sync.py +114 -103
- machineconfig/scripts/python/cloud_sync.py +36 -220
- machineconfig/scripts/python/croshell.py +102 -32
- machineconfig/scripts/python/devops.py +143 -42
- machineconfig/scripts/python/devops_add_identity.py +112 -9
- machineconfig/scripts/python/devops_add_ssh_key.py +170 -15
- machineconfig/scripts/python/devops_backup_retrieve.py +132 -14
- machineconfig/scripts/python/devops_devapps_install.py +33 -11
- machineconfig/scripts/python/devops_update_repos.py +36 -29
- machineconfig/scripts/python/dotfile.py +8 -3
- machineconfig/scripts/python/fire_jobs.py +145 -289
- machineconfig/scripts/python/ftpx.py +76 -18
- machineconfig/scripts/python/get_zellij_cmd.py +14 -0
- machineconfig/scripts/python/gh_models.py +72 -25
- machineconfig/scripts/python/helpers/__init__.py +0 -0
- machineconfig/scripts/python/helpers/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/scripts/python/helpers/__pycache__/cloud_helpers.cpython-311.pyc +0 -0
- machineconfig/scripts/python/helpers/__pycache__/helpers2.cpython-311.pyc +0 -0
- machineconfig/scripts/python/helpers/__pycache__/helpers4.cpython-311.pyc +0 -0
- machineconfig/scripts/python/helpers/cloud_helpers.py +134 -0
- machineconfig/scripts/python/helpers/helpers2.py +149 -0
- machineconfig/scripts/python/helpers/helpers4.py +178 -0
- machineconfig/scripts/python/helpers/helpers5.py +50 -0
- machineconfig/scripts/python/helpers/repo_sync_helpers.py +126 -0
- machineconfig/scripts/python/mount_nfs.py +46 -15
- machineconfig/scripts/python/mount_nw_drive.py +22 -10
- machineconfig/scripts/python/mount_ssh.py +28 -12
- machineconfig/scripts/python/onetimeshare.py +23 -15
- machineconfig/scripts/python/pomodoro.py +38 -24
- machineconfig/scripts/python/repos.py +29 -32
- machineconfig/scripts/python/scheduler.py +19 -18
- machineconfig/scripts/python/snapshot.py +14 -6
- machineconfig/scripts/python/start_slidev.py +24 -32
- machineconfig/scripts/python/start_terminals.py +23 -10
- machineconfig/scripts/python/viewer.py +53 -0
- machineconfig/scripts/python/viewer_template.py +140 -0
- machineconfig/scripts/python/wifi_conn.py +20 -12
- machineconfig/scripts/python/wsl_windows_transfer.py +18 -10
- machineconfig/scripts/windows/activate_ve.ps1 +54 -0
- machineconfig/scripts/windows/archive/gource2vid.ps1 +14 -0
- machineconfig/scripts/windows/archive/im2text.ps1 +27 -0
- machineconfig/scripts/windows/archive/secure_pull.ps1 +46 -0
- machineconfig/scripts/windows/archive/secure_push.ps1 +85 -0
- machineconfig/scripts/windows/archive/tmate_conn.ps1 +7 -0
- machineconfig/scripts/windows/checkout_version.ps1 +6 -0
- machineconfig/scripts/windows/choose_wezterm_theme.ps1 +20 -0
- machineconfig/scripts/windows/cloud_copy.ps1 +17 -0
- machineconfig/scripts/windows/cloud_manager.ps1 +8 -0
- machineconfig/scripts/windows/cloud_mount.ps1 +25 -0
- machineconfig/scripts/windows/cloud_repo_sync.ps1 +8 -0
- machineconfig/scripts/windows/cloud_sync.ps1 +21 -0
- machineconfig/scripts/windows/croshell.ps1 +40 -0
- machineconfig/scripts/windows/devops.ps1 +32 -0
- machineconfig/scripts/windows/dotfile.ps1 +9 -0
- machineconfig/scripts/windows/fire.ps1 +33 -0
- machineconfig/scripts/windows/ftpx.ps1 +5 -0
- machineconfig/scripts/windows/fzfb.ps1 +3 -0
- machineconfig/scripts/windows/fzfg.ps1 +2 -0
- machineconfig/scripts/windows/fzfrga.bat +20 -0
- machineconfig/scripts/windows/gpt.ps1 +23 -0
- machineconfig/scripts/windows/grep.ps1 +2 -0
- machineconfig/scripts/windows/kill_process.ps1 +8 -0
- machineconfig/scripts/windows/mount_nfs.ps1 +44 -0
- machineconfig/scripts/windows/mount_nw.ps1 +9 -0
- machineconfig/scripts/windows/mount_smb.ps1 +2 -0
- machineconfig/scripts/windows/mount_ssh.ps1 +17 -0
- machineconfig/scripts/windows/nano.ps1 +3 -0
- machineconfig/scripts/windows/neofetch.ps1 +2 -0
- machineconfig/scripts/windows/pomodoro.ps1 +8 -0
- machineconfig/scripts/windows/py2exe.ps1 +12 -0
- machineconfig/scripts/windows/reload_path.ps1 +3 -0
- machineconfig/scripts/windows/repos.ps1 +27 -0
- machineconfig/scripts/windows/scheduler.ps1 +6 -0
- machineconfig/scripts/windows/share_cloud.cmd +34 -0
- machineconfig/scripts/windows/share_nfs.ps1 +0 -0
- machineconfig/scripts/windows/share_smb.ps1 +22 -0
- machineconfig/scripts/windows/snapshot.ps1 +5 -0
- machineconfig/scripts/windows/start_slidev.ps1 +21 -0
- machineconfig/scripts/windows/start_terminals.ps1 +22 -0
- machineconfig/scripts/windows/unlock_bitlocker.ps1 +10 -0
- machineconfig/scripts/windows/utils/op_script_delete.ps1 +7 -0
- machineconfig/scripts/windows/wifi_conn.ps1 +7 -0
- machineconfig/scripts/windows/wsl_rdp_windows_port_forwarding.ps1 +46 -0
- machineconfig/scripts/windows/wsl_ssh_windows_port_forwarding.ps1 +76 -0
- machineconfig/scripts/windows/wsl_windows_transfer.ps1 +7 -0
- machineconfig/settings/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/settings/broot/br.sh +51 -0
- machineconfig/settings/broot/brootcd.ps1 +32 -0
- machineconfig/settings/broot/conf.toml +5 -0
- machineconfig/settings/glow/glow.yml +11 -0
- machineconfig/settings/gromit-mpx/gromit-mpx.cfg +34 -0
- machineconfig/settings/helix/config.toml +27 -0
- machineconfig/settings/helix/languages.toml +22 -0
- machineconfig/settings/keras/keras.json +6 -0
- machineconfig/settings/keyboard/espanso/config/default.yml +45 -0
- machineconfig/settings/keyboard/espanso/match/base.yml +57 -0
- machineconfig/settings/keyboard/kanata/kanata.kbd +0 -0
- machineconfig/settings/lf/linux/autocall/delete.sh +0 -0
- machineconfig/settings/lf/linux/autocall/on-cd.sh +0 -0
- machineconfig/settings/lf/linux/autocall/on-quit.sh +0 -0
- machineconfig/settings/lf/linux/autocall/open.sh +0 -0
- machineconfig/settings/lf/linux/autocall/paste.sh +0 -0
- machineconfig/settings/lf/linux/autocall/pre-cd.sh +0 -0
- machineconfig/settings/lf/linux/autocall/rename.sh +0 -0
- machineconfig/settings/lf/linux/colors +196 -0
- machineconfig/settings/lf/linux/exe/cleaner.sh +7 -0
- machineconfig/settings/lf/linux/exe/fzf_nano.sh +16 -0
- machineconfig/settings/lf/linux/exe/leftpane_previewer.sh +5 -0
- machineconfig/settings/lf/linux/exe/lfcd.sh +32 -0
- machineconfig/settings/lf/linux/exe/previewer.sh +37 -0
- machineconfig/settings/lf/linux/exe/previewer_archive.sh +155 -0
- machineconfig/settings/lf/linux/icons +357 -0
- machineconfig/settings/lf/linux/lfrc +226 -0
- machineconfig/settings/lf/windows/autocall/delete.ps1 +0 -0
- machineconfig/settings/lf/windows/autocall/on-cd.ps1 +0 -0
- machineconfig/settings/lf/windows/autocall/on-quit.ps1 +0 -0
- machineconfig/settings/lf/windows/autocall/open.ps1 +0 -0
- machineconfig/settings/lf/windows/autocall/paste.ps1 +0 -0
- machineconfig/settings/lf/windows/autocall/pre-cd.ps1 +0 -0
- machineconfig/settings/lf/windows/autocall/rename.ps1 +0 -0
- machineconfig/settings/lf/windows/cd_tere.ps1 +4 -0
- machineconfig/settings/lf/windows/cd_zoxide.ps1 +4 -0
- machineconfig/settings/lf/windows/cd_zoxide2.ps1 +4 -0
- machineconfig/settings/lf/windows/colors +159 -0
- machineconfig/settings/lf/windows/fzf_edit.ps1 +6 -0
- machineconfig/settings/lf/windows/icons +357 -0
- machineconfig/settings/lf/windows/leftpane_previewer.ps1 +3 -0
- machineconfig/settings/lf/windows/lfcd.ps1 +35 -0
- machineconfig/settings/lf/windows/lfrc +133 -0
- machineconfig/settings/lf/windows/mkdir.ps1 +3 -0
- machineconfig/settings/lf/windows/mkfile.ps1 +3 -0
- machineconfig/settings/lf/windows/previewer.ps1 +7 -0
- machineconfig/settings/lf/windows/tst.ps1 +1 -0
- machineconfig/settings/linters/.flake8 +24 -0
- machineconfig/settings/linters/.mypy.ini +29 -0
- machineconfig/settings/linters/.pylintrc +91 -0
- machineconfig/settings/linters/.ruff.toml +77 -0
- machineconfig/settings/linters/.ruff_cache/.gitignore +2 -0
- machineconfig/settings/linters/.ruff_cache/CACHEDIR.TAG +1 -0
- machineconfig/settings/lvim/linux/config.lua +0 -0
- machineconfig/settings/lvim/windows/archive/config_additional.lua +39 -0
- machineconfig/settings/lvim/windows/lua/user/custom_config.lua +13 -0
- machineconfig/settings/mprocs/windows/mprocs.yaml +55 -0
- machineconfig/settings/mprocs/windows/other +12 -0
- machineconfig/settings/pistol/pistol.conf +8 -0
- machineconfig/settings/presenterm/config.yaml +76 -0
- machineconfig/settings/procs/.procs.toml +142 -0
- machineconfig/settings/pudb/pudb.cfg +25 -0
- machineconfig/settings/rofi/config.rasi +4 -0
- machineconfig/settings/rofi/config_default.rasi +147 -0
- machineconfig/settings/shells/alacritty/alacritty.toml +40 -0
- machineconfig/settings/shells/alacritty/alacritty.yml +0 -0
- machineconfig/settings/shells/bash/.inputrc +3 -0
- machineconfig/settings/shells/bash/init.sh +66 -0
- machineconfig/settings/shells/hyper/.hyper.js +201 -0
- machineconfig/settings/shells/ipy/profiles/default/__init__.py +0 -0
- machineconfig/settings/shells/ipy/profiles/default/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/settings/shells/ipy/profiles/default/startup/__init__.py +0 -0
- machineconfig/settings/shells/ipy/profiles/default/startup/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/settings/shells/ipy/profiles/default/startup/__pycache__/playext.cpython-311.pyc +0 -0
- machineconfig/settings/shells/ipy/profiles/default/startup/playext.py +83 -0
- machineconfig/settings/shells/kitty/kitty.conf +1476 -0
- machineconfig/settings/shells/nushell/config.nu +36 -0
- machineconfig/settings/shells/nushell/env.nu +13 -0
- machineconfig/settings/shells/pwsh/init.ps1 +88 -0
- machineconfig/settings/shells/pwsh/profile.ps1 +0 -0
- machineconfig/settings/shells/starship/starship.toml +58 -0
- machineconfig/settings/shells/vtm/settings.xml +297 -0
- machineconfig/settings/shells/wezterm/wezterm.lua +193 -0
- machineconfig/settings/shells/wt/settings.json +526 -0
- machineconfig/settings/streamlit/config.toml +22 -0
- machineconfig/settings/svim/linux/init.toml +48 -0
- machineconfig/settings/svim/windows/init.toml +48 -0
- machineconfig/settings/tere/terecd.ps1 +8 -0
- machineconfig/settings/tere/terecd.sh +8 -0
- machineconfig/settings/tmux/.tmate.conf +3 -0
- machineconfig/settings/tmux/.tmux.conf +6 -0
- machineconfig/settings/wsl/.wslconfig +35 -0
- machineconfig/settings/yazi/keymap.toml +0 -0
- machineconfig/settings/yazi/theme.toml +0 -0
- machineconfig/settings/yazi/yazi.toml +4 -0
- machineconfig/settings/zed/settings.json +35 -0
- machineconfig/settings/zellij/commands/monitor +9 -0
- machineconfig/settings/zellij/commands/standard_panes +33 -0
- machineconfig/settings/zellij/config.kdl +295 -0
- machineconfig/settings/zellij/config.orig.kdl +295 -0
- machineconfig/settings/zellij/layouts/hist +13 -0
- machineconfig/settings/zellij/layouts/panes.kdl +20 -0
- machineconfig/settings/zellij/layouts/st.kdl +21 -0
- machineconfig/settings/zellij/layouts/st2.kdl +59 -0
- machineconfig/settings/zellij/layouts/stacked_panes.kdl +11 -0
- machineconfig/setup_linux/nix/cli_installation.sh +166 -0
- machineconfig/setup_linux/others/mint_keyboard_shortcuts.sh +30 -0
- machineconfig/setup_linux/others/openssh-server_add_pub_key.sh +60 -0
- machineconfig/setup_linux/web_shortcuts/all.sh +53 -0
- machineconfig/setup_linux/web_shortcuts/ascii_art.sh +100 -0
- machineconfig/setup_linux/web_shortcuts/croshell.sh +66 -0
- machineconfig/setup_linux/web_shortcuts/interactive.sh +241 -0
- machineconfig/setup_linux/web_shortcuts/ssh.sh +64 -0
- machineconfig/setup_linux/web_shortcuts/update_system.sh +55 -0
- machineconfig/setup_windows/others/docker.ps1 +7 -0
- machineconfig/setup_windows/others/obs.ps1 +4 -0
- machineconfig/setup_windows/web_shortcuts/all.ps1 +18 -0
- machineconfig/setup_windows/web_shortcuts/ascii_art.ps1 +36 -0
- machineconfig/setup_windows/web_shortcuts/croshell.ps1 +16 -0
- machineconfig/setup_windows/web_shortcuts/interactive.ps1 +200 -0
- machineconfig/setup_windows/web_shortcuts/ssh.ps1 +11 -0
- machineconfig/setup_windows/wt_and_pwsh/install_fonts.ps1 +27 -0
- machineconfig/setup_windows/wt_and_pwsh/set_pwsh_theme.py +12 -2
- machineconfig/setup_windows/wt_and_pwsh/set_wt_settings.py +45 -9
- machineconfig/utils/ai/__init__.py +0 -0
- machineconfig/utils/ai/browser_user_wrapper.py +51 -0
- machineconfig/utils/ai/generate_file_checklist.py +74 -0
- machineconfig/utils/ai/url2md.py +75 -0
- machineconfig/utils/installer.py +101 -253
- machineconfig/utils/installer_utils/__init__.py +0 -0
- machineconfig/utils/installer_utils/installer_abc.py +100 -0
- machineconfig/utils/installer_utils/installer_class.py +253 -0
- machineconfig/utils/procs.py +69 -16
- machineconfig/utils/scheduling.py +47 -13
- machineconfig/utils/utils.py +39 -371
- machineconfig/utils/utils_code.py +82 -0
- machineconfig/utils/utils_links.py +88 -0
- machineconfig/utils/utils_options.py +163 -0
- machineconfig/utils/utils_path.py +151 -0
- machineconfig/utils/ve.py +37 -225
- machineconfig/utils/ve_utils/ve1.py +111 -0
- machineconfig/utils/ve_utils/ve2.py +142 -0
- {machineconfig-1.92.dist-info → machineconfig-1.94.dist-info}/METADATA +25 -21
- machineconfig-1.94.dist-info/RECORD +710 -0
- {machineconfig-1.92.dist-info → machineconfig-1.94.dist-info}/WHEEL +1 -1
- machineconfig-1.92.dist-info/LICENSE +0 -201
- machineconfig-1.92.dist-info/RECORD +0 -70
- {machineconfig-1.92.dist-info → machineconfig-1.94.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
from crocodile.core import List as L
|
|
2
|
+
from crocodile.meta import Terminal
|
|
3
|
+
from crocodile.file_management import P
|
|
4
|
+
|
|
5
|
+
# import crocodile.environment as env
|
|
6
|
+
from rich.text import Text
|
|
7
|
+
from rich.panel import Panel
|
|
8
|
+
from rich.console import Console
|
|
9
|
+
import platform
|
|
10
|
+
import subprocess
|
|
11
|
+
from typing import Optional, Union, TypeVar, Iterable
|
|
12
|
+
|
|
13
|
+
T = TypeVar("T")
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def check_tool_exists(tool_name: str, install_script: Optional[str] = None) -> bool:
|
|
18
|
+
"""This is the CLI equivalent of `install_n_import` function of crocodile. """
|
|
19
|
+
if platform.system() == "Windows":
|
|
20
|
+
tool_name = tool_name.replace(".exe", "") + ".exe"
|
|
21
|
+
|
|
22
|
+
if platform.system() == "Windows": cmd = "where.exe"
|
|
23
|
+
elif platform.system() == "Linux": cmd = "which"
|
|
24
|
+
else: raise NotImplementedError(f"platform {platform.system()} not implemented")
|
|
25
|
+
|
|
26
|
+
try:
|
|
27
|
+
_tmp = subprocess.check_output([cmd, tool_name], stderr=subprocess.DEVNULL)
|
|
28
|
+
res: bool=True
|
|
29
|
+
except (subprocess.CalledProcessError, FileNotFoundError):
|
|
30
|
+
res = False
|
|
31
|
+
if res is False and install_script is not None:
|
|
32
|
+
print(f"""
|
|
33
|
+
{'=' * 60}
|
|
34
|
+
📥 INSTALLING TOOL | Installing {tool_name}...
|
|
35
|
+
{'=' * 60}
|
|
36
|
+
""")
|
|
37
|
+
Terminal().run(install_script, shell="powershell").print()
|
|
38
|
+
return check_tool_exists(tool_name=tool_name, install_script=None)
|
|
39
|
+
return res
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def choose_one_option(options: Iterable[T], header: str="", tail: str="", prompt: str="", msg: str="",
|
|
43
|
+
default: Optional[T] = None, fzf: bool=False, custom_input: bool=False) -> T:
|
|
44
|
+
choice_key = display_options(msg=msg, options=options, header=header, tail=tail, prompt=prompt,
|
|
45
|
+
default=default, fzf=fzf, multi=False, custom_input=custom_input)
|
|
46
|
+
assert not isinstance(choice_key, list)
|
|
47
|
+
return choice_key
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def choose_multiple_options(options: Iterable[T], header: str="", tail: str="", prompt: str="", msg: str="",
|
|
51
|
+
default: Optional[T] = None, custom_input: bool=False) -> list[T]:
|
|
52
|
+
choice_key = display_options(msg=msg, options=options, header=header, tail=tail, prompt=prompt,
|
|
53
|
+
default=default, fzf=True, multi=True,
|
|
54
|
+
custom_input=custom_input)
|
|
55
|
+
if isinstance(choice_key, list): return choice_key
|
|
56
|
+
return [choice_key]
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def display_options(msg: str, options: Iterable[T], header: str="", tail: str="", prompt: str="",
|
|
60
|
+
default: Optional[T] = None, fzf: bool=False, multi: bool=False, custom_input: bool=False) -> Union[T, list[T]]:
|
|
61
|
+
# TODO: replace with https://github.com/tmbo/questionary
|
|
62
|
+
# # also see https://github.com/charmbracelet/gum
|
|
63
|
+
tool_name = "fzf"
|
|
64
|
+
options_strings: list[str] = [str(x) for x in options]
|
|
65
|
+
default_string = str(default) if default is not None else None
|
|
66
|
+
if fzf and check_tool_exists(tool_name):
|
|
67
|
+
from pyfzf.pyfzf import FzfPrompt
|
|
68
|
+
fzf_prompt = FzfPrompt()
|
|
69
|
+
nl = "\n"
|
|
70
|
+
choice_string_multi: list[str] = fzf_prompt.prompt(choices=options_strings, fzf_options=("--multi" if multi else "") + f' --prompt "{prompt.replace(nl, " ")}" ') # --border-label={msg.replace(nl, ' ')}")
|
|
71
|
+
# --border=rounded doens't work on older versions of fzf installed at Ubuntu 20.04
|
|
72
|
+
if not multi:
|
|
73
|
+
try:
|
|
74
|
+
choice_one_string = choice_string_multi[0]
|
|
75
|
+
choice_idx = options_strings.index(choice_one_string)
|
|
76
|
+
return list(options)[choice_idx]
|
|
77
|
+
except IndexError as ie:
|
|
78
|
+
print(f"❌ Error: {options=}, {choice_string_multi=}")
|
|
79
|
+
print(f"🔍 Available choices: {choice_string_multi}")
|
|
80
|
+
raise ie
|
|
81
|
+
choice_idx_s = [options_strings.index(x) for x in choice_string_multi]
|
|
82
|
+
return [list(options)[x] for x in choice_idx_s]
|
|
83
|
+
else:
|
|
84
|
+
console = Console()
|
|
85
|
+
if default is not None:
|
|
86
|
+
assert default in options, f"Default `{default}` option not in options `{list(options)}`"
|
|
87
|
+
default_msg = Text(" <<<<-------- DEFAULT", style="bold red")
|
|
88
|
+
else: default_msg = Text("")
|
|
89
|
+
txt = Text("\n" + msg + "\n")
|
|
90
|
+
for idx, key in enumerate(options):
|
|
91
|
+
txt = txt + Text(f"{idx:2d} ", style="bold blue") + str(key) + (default_msg if default is not None and default == key else "") + "\n"
|
|
92
|
+
txt_panel = Panel(txt, title=header, subtitle=tail, border_style="bold red")
|
|
93
|
+
|
|
94
|
+
console.print(txt_panel)
|
|
95
|
+
if default is not None:
|
|
96
|
+
choice_string = input(f"{prompt}\nEnter option number or hit enter for default choice: ")
|
|
97
|
+
else:
|
|
98
|
+
choice_string = input(f"{prompt}\nEnter option number: ")
|
|
99
|
+
|
|
100
|
+
if choice_string == "":
|
|
101
|
+
if default_string is None:
|
|
102
|
+
print("🧨 Default option not available!")
|
|
103
|
+
return display_options(msg=msg, options=options, header=header, tail=tail, prompt=prompt, default=default, fzf=fzf, multi=multi, custom_input=custom_input)
|
|
104
|
+
choice_idx = options_strings.index(default_string)
|
|
105
|
+
assert default is not None, "🧨 Default option not available!"
|
|
106
|
+
choice_one: T = default
|
|
107
|
+
else:
|
|
108
|
+
try:
|
|
109
|
+
choice_idx = int(choice_string, base=10)
|
|
110
|
+
choice_one = list(options)[choice_idx]
|
|
111
|
+
except IndexError as ie: # i.e. converting to integer was successful but indexing failed.
|
|
112
|
+
if choice_string in options_strings: # string input
|
|
113
|
+
choice_idx = options_strings.index(choice_one) # type: ignore
|
|
114
|
+
choice_one = list(options)[choice_idx]
|
|
115
|
+
elif custom_input: return str(choice_string) # type: ignore
|
|
116
|
+
else:
|
|
117
|
+
_ = ie
|
|
118
|
+
# raise ValueError(f"Unknown choice. {choice_string}") from ie
|
|
119
|
+
print(f"❓ Unknown choice: '{choice_string}'")
|
|
120
|
+
return display_options(msg=msg, options=options, header=header, tail=tail, prompt=prompt, default=default, fzf=fzf, multi=multi, custom_input=custom_input)
|
|
121
|
+
except TypeError as te: # int(choice_string) failed due to # either the number is invalid, or the input is custom.
|
|
122
|
+
if choice_string in options_strings: # string input
|
|
123
|
+
choice_idx = options_strings.index(choice_one) # type: ignore
|
|
124
|
+
choice_one = list(options)[choice_idx]
|
|
125
|
+
elif custom_input:
|
|
126
|
+
return choice_string # type: ignore
|
|
127
|
+
else:
|
|
128
|
+
_ = te
|
|
129
|
+
# raise ValueError(f"Unknown choice. {choice_string}") from te
|
|
130
|
+
print(f"❓ Unknown choice: '{choice_string}'")
|
|
131
|
+
return display_options(msg=msg, options=options, header=header, tail=tail, prompt=prompt, default=default, fzf=fzf, multi=multi, custom_input=custom_input)
|
|
132
|
+
print(f"✅ Selected option {choice_idx}: {choice_one}")
|
|
133
|
+
if multi: return [choice_one]
|
|
134
|
+
return choice_one
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
def choose_cloud_interactively() -> str:
|
|
138
|
+
print(f"""
|
|
139
|
+
{'=' * 60}
|
|
140
|
+
🔍 LISTING CLOUD REMOTES | Fetching available cloud remotes...
|
|
141
|
+
{'=' * 60}
|
|
142
|
+
""")
|
|
143
|
+
tmp = Terminal().run("rclone listremotes").op_if_successfull_or_default(strict_returcode=False)
|
|
144
|
+
# consider this: remotes = Read.ini(P.home().joinpath(".config/rclone/rclone.conf")).sections()
|
|
145
|
+
if isinstance(tmp, str):
|
|
146
|
+
remotes: list[str] = L(tmp.splitlines()).apply(lambda x: x.replace(":", "")).list
|
|
147
|
+
|
|
148
|
+
else: raise ValueError(f"Got {tmp} from rclone listremotes")
|
|
149
|
+
if len(remotes) == 0:
|
|
150
|
+
raise RuntimeError("You don't have remotes. Configure your rclone first to get cloud services access.")
|
|
151
|
+
cloud: str = choose_one_option(msg="WHICH CLOUD?", options=list(remotes), default=remotes[0], fzf=True)
|
|
152
|
+
print(f"""
|
|
153
|
+
✅ SELECTED CLOUD | {cloud}
|
|
154
|
+
{'=' * 60}
|
|
155
|
+
""")
|
|
156
|
+
return cloud
|
|
157
|
+
|
|
158
|
+
def get_ssh_hosts() -> list[str]:
|
|
159
|
+
from paramiko import SSHConfig
|
|
160
|
+
c = SSHConfig()
|
|
161
|
+
c.parse(open(P.home().joinpath(".ssh/config").to_str(), encoding="utf-8"))
|
|
162
|
+
return list(c.get_hostnames())
|
|
163
|
+
def choose_ssh_host(multi: bool=True): return display_options(msg="", options=get_ssh_hosts(), multi=multi, fzf=True)
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
from crocodile.core import List as L
|
|
2
|
+
from crocodile.file_management import P
|
|
3
|
+
import platform
|
|
4
|
+
import subprocess
|
|
5
|
+
from typing import Optional, TypeVar
|
|
6
|
+
from machineconfig.utils.utils_options import check_tool_exists, choose_one_option
|
|
7
|
+
|
|
8
|
+
T = TypeVar("T")
|
|
9
|
+
|
|
10
|
+
def sanitize_path(a_path: P) -> P:
|
|
11
|
+
path = P(a_path)
|
|
12
|
+
if path.as_posix().startswith("/home"):
|
|
13
|
+
if platform.system() == "Windows": # path copied from Linux to Windows
|
|
14
|
+
path = P.home().joinpath(*path.parts[3:]) # exclude /home/username
|
|
15
|
+
assert path.exists(), f"File not found: {path}"
|
|
16
|
+
print(f"""
|
|
17
|
+
{'=' * 60}
|
|
18
|
+
🔗 PATH MAPPING | Linux → Windows: `{a_path}` ➡️ `{path}`
|
|
19
|
+
{'=' * 60}
|
|
20
|
+
""")
|
|
21
|
+
elif platform.system() == "Linux" and P.home().as_posix() not in path.as_posix(): # copied from Linux to Linux with different username
|
|
22
|
+
path = P.home().joinpath(*path.parts[3:]) # exclude /home/username (three parts: /, home, username)
|
|
23
|
+
assert path.exists(), f"File not found: {path}"
|
|
24
|
+
print(f"""
|
|
25
|
+
{'=' * 60}
|
|
26
|
+
🔗 PATH MAPPING | Linux → Linux: `{a_path}` ➡️ `{path}`
|
|
27
|
+
{'=' * 60}
|
|
28
|
+
""")
|
|
29
|
+
elif path.as_posix().startswith("C:"):
|
|
30
|
+
if platform.system() == "Linux": # path copied from Windows to Linux
|
|
31
|
+
xx = str(a_path).replace("\\", "/")
|
|
32
|
+
path = P.home().joinpath(*P(xx).parts[3:]) # exclude C:\Users\username
|
|
33
|
+
assert path.exists(), f"File not found: {path}"
|
|
34
|
+
print(f"""
|
|
35
|
+
{'=' * 60}
|
|
36
|
+
🔗 PATH MAPPING | Windows → Linux: `{a_path}` ➡️ `{path}`
|
|
37
|
+
{'=' * 60}
|
|
38
|
+
""")
|
|
39
|
+
elif platform.system() == "Windows" and P.home().as_posix() not in path.as_posix(): # copied from Windows to Windows with different username
|
|
40
|
+
path = P.home().joinpath(*path.parts[2:])
|
|
41
|
+
assert path.exists(), f"File not found: {path}"
|
|
42
|
+
print(f"""
|
|
43
|
+
{'=' * 60}
|
|
44
|
+
🔗 PATH MAPPING | Windows → Windows: `{a_path}` ➡️ `{path}`
|
|
45
|
+
{'=' * 60}
|
|
46
|
+
""")
|
|
47
|
+
return path.expanduser().absolute()
|
|
48
|
+
|
|
49
|
+
def match_file_name(sub_string: str, search_root: Optional[P] = None) -> P:
|
|
50
|
+
"""Look up current directory for file name that matches the passed substring."""
|
|
51
|
+
search_root_obj = search_root if search_root is not None else P.cwd()
|
|
52
|
+
search_root_obj = search_root_obj.absolute()
|
|
53
|
+
print(f"""
|
|
54
|
+
{'=' * 60}
|
|
55
|
+
🔍 SEARCH | Looking for '{sub_string}' in {search_root_obj}
|
|
56
|
+
{'=' * 60}
|
|
57
|
+
""")
|
|
58
|
+
|
|
59
|
+
search_root_objects = search_root_obj.search("*", not_in=["links", ".venv", ".git", ".idea", ".vscode", "node_modules", "__pycache__"])
|
|
60
|
+
search_results: L[P] = L([a_search_root_obj.search(f"*{sub_string}*", r=True) for a_search_root_obj in search_root_objects]).reduce(lambda x, y: x + y) # type: ignore
|
|
61
|
+
search_results = search_results.filter(lambda x: x.suffix in (".py", ".sh", ".ps1"))
|
|
62
|
+
|
|
63
|
+
if len(search_results) == 1:
|
|
64
|
+
path_obj = search_results.list[0]
|
|
65
|
+
elif len(search_results) > 1:
|
|
66
|
+
msg = "Search results are ambiguous or non-existent, choose manually:"
|
|
67
|
+
print(f"""
|
|
68
|
+
⚠️ WARNING | {msg}
|
|
69
|
+
{'=' * 60}
|
|
70
|
+
""")
|
|
71
|
+
choice = choose_one_option(msg=msg, options=search_results.list, fzf=True)
|
|
72
|
+
path_obj = P(choice)
|
|
73
|
+
else:
|
|
74
|
+
# let's do a final retry with sub_string.small()
|
|
75
|
+
sub_string_small = sub_string.lower()
|
|
76
|
+
if sub_string_small != sub_string:
|
|
77
|
+
print(f"""
|
|
78
|
+
🔄 RETRY | Searching with lowercase letters
|
|
79
|
+
{'=' * 60}
|
|
80
|
+
""")
|
|
81
|
+
return match_file_name(sub_string=sub_string_small)
|
|
82
|
+
from git.repo import Repo
|
|
83
|
+
from git.exc import InvalidGitRepositoryError
|
|
84
|
+
try:
|
|
85
|
+
repo = Repo(search_root_obj, search_parent_directories=True)
|
|
86
|
+
repo_root_dir = P(repo.working_dir)
|
|
87
|
+
if repo_root_dir != search_root_obj: # may be user is in a subdirectory of the repo root, try with root dir.
|
|
88
|
+
print(f"""
|
|
89
|
+
🔄 RETRY | Searching from repository root instead of current directory
|
|
90
|
+
{'=' * 60}
|
|
91
|
+
""")
|
|
92
|
+
return match_file_name(sub_string=sub_string, search_root=repo_root_dir)
|
|
93
|
+
else:
|
|
94
|
+
search_root_obj = repo_root_dir
|
|
95
|
+
except InvalidGitRepositoryError:
|
|
96
|
+
pass
|
|
97
|
+
|
|
98
|
+
if check_tool_exists(tool_name="fzf"):
|
|
99
|
+
try:
|
|
100
|
+
print(f"""
|
|
101
|
+
🔍 SEARCH STRATEGY | Using fd to search for '{sub_string}' in '{search_root_obj}' ...
|
|
102
|
+
{'=' * 60}
|
|
103
|
+
""")
|
|
104
|
+
fzf_cmd = f"cd '{search_root_obj}'; fd --type f --strip-cwd-prefix | fzf --filter={sub_string}"
|
|
105
|
+
search_res = subprocess.run(fzf_cmd, stdout=subprocess.PIPE, text=True, check=True, shell=True).stdout.split("\n")[:-1]
|
|
106
|
+
except subprocess.CalledProcessError as cpe:
|
|
107
|
+
print(f"""
|
|
108
|
+
❌ ERROR | FZF search failed with '{sub_string}' in '{search_root_obj}'.
|
|
109
|
+
{cpe}
|
|
110
|
+
{'=' * 60}
|
|
111
|
+
""")
|
|
112
|
+
msg = f"""
|
|
113
|
+
{'=' * 60}
|
|
114
|
+
💥 FILE NOT FOUND | Path {sub_string} does not exist. No search results
|
|
115
|
+
{'=' * 60}
|
|
116
|
+
"""
|
|
117
|
+
raise FileNotFoundError(msg) from cpe
|
|
118
|
+
|
|
119
|
+
if len(search_res) == 1: return search_root_obj.joinpath(search_res[0])
|
|
120
|
+
else:
|
|
121
|
+
print(f"""
|
|
122
|
+
🔍 SEARCH STRATEGY | Trying with raw fzf search ...
|
|
123
|
+
{'=' * 60}
|
|
124
|
+
""")
|
|
125
|
+
try:
|
|
126
|
+
res = subprocess.run(f"cd '{search_root_obj}'; fd | fzf --query={sub_string}", check=True, stdout=subprocess.PIPE, text=True, shell=True).stdout.strip()
|
|
127
|
+
except subprocess.CalledProcessError as cpe:
|
|
128
|
+
print(f"""
|
|
129
|
+
❌ ERROR | FZF search failed with '{sub_string}' in '{search_root_obj}'. {cpe}
|
|
130
|
+
{'=' * 60}
|
|
131
|
+
""")
|
|
132
|
+
msg = f"""
|
|
133
|
+
{'=' * 60}
|
|
134
|
+
💥 FILE NOT FOUND | Path {sub_string} does not exist. No search results
|
|
135
|
+
{'=' * 60}
|
|
136
|
+
"""
|
|
137
|
+
raise FileNotFoundError(msg) from cpe
|
|
138
|
+
return search_root_obj.joinpath(res)
|
|
139
|
+
|
|
140
|
+
msg = f"""
|
|
141
|
+
{'=' * 60}
|
|
142
|
+
💥 FILE NOT FOUND | Path {sub_string} does not exist. No search results
|
|
143
|
+
{'=' * 60}
|
|
144
|
+
"""
|
|
145
|
+
raise FileNotFoundError(msg)
|
|
146
|
+
print(f"""
|
|
147
|
+
{'=' * 60}
|
|
148
|
+
✅ MATCH FOUND | `{sub_string}` ➡️ `{path_obj}`
|
|
149
|
+
{'=' * 60}
|
|
150
|
+
""")
|
|
151
|
+
return path_obj
|
machineconfig/utils/ve.py
CHANGED
|
@@ -1,15 +1,23 @@
|
|
|
1
|
-
|
|
2
1
|
"""python and ve installation related utils
|
|
3
2
|
"""
|
|
4
3
|
|
|
5
|
-
from crocodile.core import Struct,
|
|
6
|
-
from crocodile.file_management import P
|
|
4
|
+
from crocodile.core import Struct, List
|
|
5
|
+
from crocodile.file_management import P
|
|
7
6
|
|
|
8
|
-
from machineconfig.utils.utils import LIBRARY_ROOT
|
|
9
7
|
import platform
|
|
10
|
-
from dataclasses import dataclass
|
|
8
|
+
from dataclasses import dataclass
|
|
11
9
|
from typing import Optional, Literal
|
|
12
10
|
|
|
11
|
+
from machineconfig.utils.ve_utils.ve1 import get_installed_interpreters
|
|
12
|
+
from machineconfig.utils.ve_utils.ve1 import get_ve_specs
|
|
13
|
+
from machineconfig.utils.ve_utils.ve2 import get_bash_repos_install_script
|
|
14
|
+
from machineconfig.utils.ve_utils.ve2 import get_ps1_repos_install_script
|
|
15
|
+
from machineconfig.utils.ve_utils.ve2 import get_bash_ve_install_script
|
|
16
|
+
from machineconfig.utils.ve_utils.ve2 import get_ps1_ve_install_script
|
|
17
|
+
from machineconfig.utils.ve_utils.ve2 import create_symlinks
|
|
18
|
+
from machineconfig.utils.ve_utils.ve2 import make_installation_recipe
|
|
19
|
+
|
|
20
|
+
|
|
13
21
|
|
|
14
22
|
@dataclass
|
|
15
23
|
class VE_Specs:
|
|
@@ -24,124 +32,60 @@ class VE_INI:
|
|
|
24
32
|
specs: VE_Specs
|
|
25
33
|
|
|
26
34
|
|
|
27
|
-
def get_ipython_profile(init_path: P):
|
|
28
|
-
"""Relies on .ipy_profile"""
|
|
29
|
-
a_path = init_path
|
|
30
|
-
ipy_profile: str="default"
|
|
31
|
-
idx = len(a_path.parts)
|
|
32
|
-
while idx >= 0:
|
|
33
|
-
if a_path.joinpath(".ipy_profile").exists():
|
|
34
|
-
ipy_profile = a_path.joinpath(".ipy_profile").read_text().rstrip()
|
|
35
|
-
print(f"✅ Using IPython profile: {ipy_profile}")
|
|
36
|
-
break
|
|
37
|
-
idx -= 1
|
|
38
|
-
a_path = a_path.parent
|
|
39
|
-
else:
|
|
40
|
-
print(f"⚠️ Using default IPython: {ipy_profile}")
|
|
41
|
-
return ipy_profile
|
|
42
|
-
def get_ve_profile(init_path: P, strict: bool=False):
|
|
43
|
-
"""Relies on .ve_path"""
|
|
44
|
-
ve = ""
|
|
45
|
-
tmp = init_path
|
|
46
|
-
for _ in init_path.parents:
|
|
47
|
-
if tmp.joinpath(".ve_path").exists():
|
|
48
|
-
ve = P(tmp.joinpath(".ve_path").read_text().rstrip().replace("\n", "")).name
|
|
49
|
-
print(f"✅ Using Virtual Environment: {ve}")
|
|
50
|
-
break
|
|
51
|
-
tmp = tmp.parent
|
|
52
|
-
if ve == "" and strict: raise ValueError("❌ No virtual environment found.")
|
|
53
|
-
return ve
|
|
54
|
-
def get_ve_name_and_ipython_profile(init_path: P):
|
|
55
|
-
ve_name = "ve"
|
|
56
|
-
ipy_profile = "default"
|
|
57
|
-
tmp = init_path
|
|
58
|
-
for _ in init_path.parents:
|
|
59
|
-
if tmp.joinpath(".ve.ini").exists():
|
|
60
|
-
ini = Read.ini(tmp.joinpath(".ve.ini"))
|
|
61
|
-
ve_name = ini["specs"]["ve_name"]
|
|
62
|
-
# py_version = ini["specs"]["py_version"]
|
|
63
|
-
ipy_profile = ini["specs"]["ipy_profile"]
|
|
64
|
-
print(f"✅ Using Virtual Environment: {ve_name}")
|
|
65
|
-
print(f"✅ Using IPython profile: {ipy_profile}")
|
|
66
|
-
break
|
|
67
|
-
tmp = tmp.parent
|
|
68
|
-
return ve_name, ipy_profile
|
|
69
|
-
def get_current_ve():
|
|
70
|
-
import sys
|
|
71
|
-
path = P(sys.executable) # something like ~\\venvs\\ve\\Scripts\\python.exe'
|
|
72
|
-
if str(P.home().joinpath("venvs")) in str(path): return path.parent.parent.stem
|
|
73
|
-
else: raise NotImplementedError("Not a kind of virtual enviroment that I expected.")
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
def get_installed_interpreters() -> list[P]:
|
|
77
|
-
system = platform.system()
|
|
78
|
-
if system == "Windows":
|
|
79
|
-
tmp: list[P] = P.get_env().PATH.search("python.exe").reduce(func=lambda x, y: x+y).list[1:]
|
|
80
|
-
else:
|
|
81
|
-
items: List[P] = P.get_env().PATH.search("python3*").reduce(lambda x, y: x+y)
|
|
82
|
-
tmp = list(set(items.filter(lambda x: not x.is_symlink() and "-" not in x)))
|
|
83
|
-
List(tmp).print()
|
|
84
|
-
return list(set([P(x) for x in tmp]))
|
|
85
|
-
def get_ve_specs(ve_path: P) -> dict[str, str]:
|
|
86
|
-
ini = r"[mysection]\n" + ve_path.joinpath("pyvenv.cfg").read_text()
|
|
87
|
-
import configparser
|
|
88
|
-
config = configparser.ConfigParser()
|
|
89
|
-
config.read_string(ini)
|
|
90
|
-
res = dict(config['mysection'])
|
|
91
|
-
# try:
|
|
92
|
-
# res['version_major_minor'] = ".".join(res['version'].split(".")[0:2])
|
|
93
|
-
# except KeyError:
|
|
94
|
-
# # res['version_major_minor'] = ".".join(res['version_info'].split(".")[0:2])
|
|
95
|
-
return res
|
|
96
|
-
|
|
97
|
-
|
|
98
35
|
def get_ve_install_script(ve_name: Optional[str] = None, py_version: Optional[str] = None,
|
|
99
36
|
install_crocodile_and_machineconfig: Optional[bool] = None,
|
|
100
37
|
delete_if_exists: bool=True,
|
|
101
|
-
# system: Optional[Literal["Windows", "Linux"]] = None
|
|
102
38
|
) -> str:
|
|
103
39
|
from rich.console import Console
|
|
104
40
|
console = Console()
|
|
105
41
|
if py_version is None:
|
|
106
|
-
print("
|
|
107
|
-
|
|
42
|
+
print("""
|
|
43
|
+
{'=' * 60}
|
|
44
|
+
🔍 AVAILABLE PYTHON VERSIONS
|
|
45
|
+
{'=' * 60}
|
|
46
|
+
""")
|
|
108
47
|
res = get_installed_interpreters()
|
|
109
48
|
List(res).print()
|
|
110
|
-
print("
|
|
111
|
-
|
|
49
|
+
print("""
|
|
50
|
+
{'=' * 60}
|
|
51
|
+
""")
|
|
52
|
+
dotted_py_version = input("🔢 Enter python version (3.11): ") or "3.11"
|
|
112
53
|
else:
|
|
113
54
|
dotted_py_version = py_version
|
|
114
55
|
|
|
115
56
|
if ve_name is None:
|
|
116
|
-
console.rule("Existing
|
|
57
|
+
console.rule("📦 Existing Virtual Environments")
|
|
117
58
|
for ve_path in P.home().joinpath("venvs").search("*", files=False):
|
|
118
59
|
try:
|
|
119
60
|
ve_specs = get_ve_specs(ve_path)
|
|
120
61
|
except Exception as _e:
|
|
121
62
|
continue
|
|
122
63
|
Struct(ve_specs).print(title=ve_path.stem, as_config=True)
|
|
123
|
-
|
|
64
|
+
default_ve_name = P.cwd().name
|
|
65
|
+
ve_name = input(f"📝 Enter virtual environment name ({default_ve_name}): ") or default_ve_name
|
|
124
66
|
|
|
125
67
|
if install_crocodile_and_machineconfig is None:
|
|
126
|
-
essential_repos = input("Install essential repos? (y/[n]): ") == "y"
|
|
127
|
-
other_repos = input("Input space separated other packages: ")
|
|
68
|
+
essential_repos = input("🔄 Install essential repos? (y/[n]): ") == "y"
|
|
69
|
+
other_repos = input("📦 Input space separated other packages: ")
|
|
128
70
|
else:
|
|
129
71
|
essential_repos = install_crocodile_and_machineconfig
|
|
130
72
|
other_repos = ""
|
|
131
73
|
|
|
132
74
|
env_path = P.home().joinpath("venvs", ve_name)
|
|
133
75
|
if delete_if_exists and env_path.exists():
|
|
134
|
-
sure = input(f"An existing environment found. Are you sure you want to delete {env_path} before making new one? (y/[n]): ") == "y"
|
|
135
|
-
console.rule("Deleting existing
|
|
76
|
+
sure = input(f"⚠️ An existing environment found. Are you sure you want to delete {env_path} before making new one? (y/[n]): ") == "y"
|
|
77
|
+
console.rule("🗑️ Deleting existing environment with similar name")
|
|
136
78
|
env_path.delete(sure=sure)
|
|
137
79
|
|
|
138
|
-
system
|
|
139
|
-
if system == "Windows":
|
|
80
|
+
system: Literal["Windows", "Linux"]
|
|
81
|
+
if platform.system() == "Windows":
|
|
82
|
+
system = "Windows"
|
|
140
83
|
script = get_ps1_ve_install_script(ve_name=ve_name, py_version=dotted_py_version, use_web=False, system=system)
|
|
141
|
-
elif system == "Linux":
|
|
84
|
+
elif platform.system() == "Linux":
|
|
85
|
+
system = "Linux"
|
|
142
86
|
script = get_bash_ve_install_script(ve_name=ve_name, py_version=dotted_py_version, use_web=False, system=system)
|
|
143
87
|
else:
|
|
144
|
-
raise NotImplementedError(f"System {system} not supported.")
|
|
88
|
+
raise NotImplementedError(f"❌ System {platform.system()} not supported.")
|
|
145
89
|
|
|
146
90
|
if essential_repos:
|
|
147
91
|
if system == "Windows":
|
|
@@ -149,145 +93,13 @@ def get_ve_install_script(ve_name: Optional[str] = None, py_version: Optional[st
|
|
|
149
93
|
elif system == "Linux":
|
|
150
94
|
script += "\n" + get_bash_repos_install_script(ve_name=ve_name, use_web=False, system=system)
|
|
151
95
|
else:
|
|
152
|
-
raise NotImplementedError(f"System {system} not supported.")
|
|
96
|
+
raise NotImplementedError(f"❌ System {system} not supported.")
|
|
153
97
|
|
|
154
98
|
if other_repos != "":
|
|
155
|
-
# TODO: check the quivalent full path of uv on windows $HOME/.local/bin/
|
|
156
99
|
script += "\nuv pip install " + other_repos
|
|
157
|
-
# target = repo_root.joinpath(".venv")
|
|
158
|
-
# source = P.home().joinpath("venvs", ve_name)
|
|
159
|
-
# if system == "Windows": cmd = f'New-Item -ItemType SymbolicLink -Path "{target}" -Target "{source}"'
|
|
160
|
-
# elif system == "Linux": cmd = f'ln -s "{source}" "{target}"'
|
|
161
|
-
# else: raise NotImplementedError(f"System {system} not supported.")
|
|
162
|
-
# script += f"\n{cmd}"
|
|
163
100
|
|
|
164
|
-
link_ve:
|
|
101
|
+
link_ve: bool = input("🔗 Create symlinks? [y/[n]] ") == "y"
|
|
165
102
|
if link_ve: create_symlinks(repo_root=P.cwd(), ve_name=ve_name, dotted_py_version=dotted_py_version, system=system, ipy_profile="default")
|
|
166
103
|
make_installation_recipe(repo_root=P.cwd(), ve_name=ve_name, py_version=dotted_py_version)
|
|
167
104
|
return script
|
|
168
105
|
|
|
169
|
-
|
|
170
|
-
def create_symlinks(repo_root: P, ve_name: str, dotted_py_version: str, system: Literal["Windows", "Linux"], ipy_profile: str):
|
|
171
|
-
from machineconfig.utils.utils import symlink_func
|
|
172
|
-
source = repo_root.joinpath(".venv")
|
|
173
|
-
target = P.home().joinpath("venvs", ve_name)
|
|
174
|
-
target.mkdir(exist_ok=True, parents=True) # if ve not created yet, make up a folder at least, so that symlink can be created, then this folder is either populated or recreated by ve creation script.
|
|
175
|
-
symlink_func(this=source, to_this=target)
|
|
176
|
-
|
|
177
|
-
# for backward compatibility:
|
|
178
|
-
repo_root.joinpath(".ve_path").write_text(f"~/venvs/{ve_name}")
|
|
179
|
-
repo_root.joinpath(".ipy_profile").write_text(ipy_profile)
|
|
180
|
-
|
|
181
|
-
ve_ini_specs = VE_Specs(ve_name=ve_name, py_version=dotted_py_version, ipy_profile="default", os=system)
|
|
182
|
-
ve_ini = VE_INI(specs=ve_ini_specs)
|
|
183
|
-
Save.ini(obj=asdict(ve_ini), path=repo_root.joinpath(".ve.ini"))
|
|
184
|
-
vscode = repo_root.joinpath(".vscode/settings.json")
|
|
185
|
-
if vscode.exists():
|
|
186
|
-
settings = Read.json(vscode)
|
|
187
|
-
else:
|
|
188
|
-
settings = {}
|
|
189
|
-
if system == "Windows":
|
|
190
|
-
settings["python.defaultInterpreterPath"] = P.home().joinpath("venvs", ve_name, "Scripts", "python.exe").as_posix()
|
|
191
|
-
elif system == "Linux":
|
|
192
|
-
settings["python.defaultInterpreterPath"] = P.home().joinpath("venvs", ve_name, "bin", "python").as_posix()
|
|
193
|
-
else:
|
|
194
|
-
raise NotImplementedError(f"System {system} not supported.")
|
|
195
|
-
Save.json(obj=settings, path=vscode, indent=4)
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
def make_installation_recipe(repo_root: str, ve_name: str, py_version: str):
|
|
199
|
-
subpath = "versions/init"
|
|
200
|
-
base_path = P(repo_root).joinpath(subpath).create()
|
|
201
|
-
|
|
202
|
-
system = "Windows"
|
|
203
|
-
path3 = base_path.joinpath("install_requirements.ps1")
|
|
204
|
-
if path3.exists(): print(f"❌ File already exists @ {path3}, skipping.")
|
|
205
|
-
else:
|
|
206
|
-
install_ve_script = get_ps1_ve_install_script(ve_name=ve_name, py_version=py_version, use_web=True, system=system)
|
|
207
|
-
install_req_script = get_install_requirements_template(repo_root=P(repo_root), requirements_subpath=subpath, ve_name=ve_name, system=system)
|
|
208
|
-
path3.write_text(install_ve_script + "\n" + install_req_script)
|
|
209
|
-
|
|
210
|
-
system= "Linux"
|
|
211
|
-
path4 = base_path.joinpath("install_requirements.sh")
|
|
212
|
-
if path4.exists(): print(f"❌ File already exists @ {path4}, skipping.")
|
|
213
|
-
else:
|
|
214
|
-
install_ve_script = get_bash_ve_install_script(ve_name=ve_name, py_version=py_version, use_web=True, system=system)
|
|
215
|
-
install_req_script = get_install_requirements_template(repo_root=P(repo_root), requirements_subpath=subpath, ve_name=ve_name, system=system)
|
|
216
|
-
path4.write_text(install_ve_script + "\n" + install_req_script)
|
|
217
|
-
return None
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
def get_ps1_ve_install_script(ve_name: str, py_version: str, use_web: bool, system: Literal["Windows", "Linux"]):
|
|
221
|
-
if use_web:
|
|
222
|
-
install_line = """(Invoke-WebRequest https://bit.ly/cfgvewindows).Content | Invoke-Expression"""
|
|
223
|
-
else:
|
|
224
|
-
install_line = LIBRARY_ROOT.joinpath(f"setup_{system.lower()}/ve.{'ps1' if system == 'Windows' else 'sh'}").read_text()
|
|
225
|
-
template = f"""
|
|
226
|
-
$ve_name = '{ve_name}'
|
|
227
|
-
$py_version = '{py_version}' # type: ignore
|
|
228
|
-
{install_line}
|
|
229
|
-
. $HOME/scripts/activate_ve $ve_name
|
|
230
|
-
"""
|
|
231
|
-
return template
|
|
232
|
-
def get_bash_ve_install_script(ve_name: str, py_version: str, use_web: bool, system: Literal["Windows", "Linux"]):
|
|
233
|
-
if use_web: install_line = """curl -L https://bit.ly/cfgvelinux | bash"""
|
|
234
|
-
else:
|
|
235
|
-
install_line = LIBRARY_ROOT.joinpath(f"setup_{system.lower()}/ve.{'ps1' if system == 'Windows' else 'sh'}").read_text()
|
|
236
|
-
template = f"""
|
|
237
|
-
export ve_name='{ve_name}'
|
|
238
|
-
export py_version='{py_version}' # type: ignore
|
|
239
|
-
{install_line}
|
|
240
|
-
. $HOME/scripts/activate_ve $ve_name
|
|
241
|
-
"""
|
|
242
|
-
return template
|
|
243
|
-
def get_ps1_repos_install_script(ve_name: str, use_web: bool, system: Literal["Windows", "Linux"]):
|
|
244
|
-
if use_web: install_line = """(Invoke-WebRequest https://bit.ly/cfgreposwindows).Content | Invoke-Expression"""
|
|
245
|
-
else:
|
|
246
|
-
install_line = LIBRARY_ROOT.joinpath(f"setup_{system.lower()}/repos.{'ps1' if system == 'Windows' else 'sh'}").read_text()
|
|
247
|
-
template = f"""
|
|
248
|
-
$ve_name = '{ve_name}'
|
|
249
|
-
. $HOME/scripts/activate_ve $ve_name
|
|
250
|
-
{install_line}
|
|
251
|
-
"""
|
|
252
|
-
return template
|
|
253
|
-
|
|
254
|
-
def get_bash_repos_install_script(ve_name: str, use_web: bool, system: Literal["Windows", "Linux"]):
|
|
255
|
-
if use_web: install_line = """curl -L https://bit.ly/cfgreposlinux | bash"""
|
|
256
|
-
else:
|
|
257
|
-
install_line = LIBRARY_ROOT.joinpath(f"setup_{system.lower()}/repos.{'ps1' if system == 'Windows' else 'sh'}").read_text()
|
|
258
|
-
template = f"""
|
|
259
|
-
export ve_name='{ve_name}'
|
|
260
|
-
. $HOME/scripts/activate_ve $ve_name
|
|
261
|
-
{install_line}
|
|
262
|
-
"""
|
|
263
|
-
return template
|
|
264
|
-
def get_install_requirements_template(repo_root: P, requirements_subpath: str, ve_name: str, system: Literal["Windows", "Linux"]):
|
|
265
|
-
if system == 'Windows':
|
|
266
|
-
set_e_equivalent = 'Set-StrictMode -Version Latest' # PowerShell equivalent
|
|
267
|
-
install_line = """(Invoke-WebRequest https://bit.ly/cfgreposwindows).Content | Invoke-Expression"""
|
|
268
|
-
activate_ve = fr"""$HOME\venvs\{ve_name}\Scripts\Activate.ps1 -ErrorAction Stop """
|
|
269
|
-
elif system == 'Linux':
|
|
270
|
-
set_e_equivalent = 'set -e' # Bash equivalent
|
|
271
|
-
install_line = """curl -L https://bit.ly/cfgreposlinux | bash"""
|
|
272
|
-
activate_ve = fr""". $HOME/venvs/{ve_name}/bin/activate """
|
|
273
|
-
else: raise NotImplementedError(f"System {system} not supported.")
|
|
274
|
-
return f"""
|
|
275
|
-
|
|
276
|
-
# This is a template that is meant to be modified manually to install requirements.txt and editable packages.
|
|
277
|
-
# one can dispense with this and install libraries manually and on adhoc-basis and then use version_checkout utility.
|
|
278
|
-
|
|
279
|
-
# mkdir -p $HOME/{repo_root.rel2home().as_posix()}
|
|
280
|
-
# cd $HOME/{repo_root.rel2home().as_posix()}
|
|
281
|
-
# git clone URL --depth 2
|
|
282
|
-
|
|
283
|
-
{set_e_equivalent}
|
|
284
|
-
|
|
285
|
-
cd $HOME/{repo_root.rel2home().as_posix()}
|
|
286
|
-
|
|
287
|
-
{activate_ve}
|
|
288
|
-
|
|
289
|
-
# {install_line}
|
|
290
|
-
pip install -r {requirements_subpath}/requirements.txt
|
|
291
|
-
# pip install -e .
|
|
292
|
-
|
|
293
|
-
"""
|