diff --git a/docs/onboardme/screenshots/help_text.svg b/docs/onboardme/screenshots/help_text.svg index 6b20187..d9c91f5 100644 --- a/docs/onboardme/screenshots/help_text.svg +++ b/docs/onboardme/screenshots/help_text.svg @@ -19,237 +19,237 @@ font-weight: 700; } - .terminal-3137399125-matrix { + .terminal-3137530197-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-3137399125-title { + .terminal-3137530197-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-3137399125-r1 { fill: #c5c8c6 } -.terminal-3137399125-r2 { fill: #5f87ff } -.terminal-3137399125-r3 { fill: #5f87ff;font-style: italic; } -.terminal-3137399125-r4 { fill: #5f87af } -.terminal-3137399125-r5 { fill: #5f87af;font-weight: bold } -.terminal-3137399125-r6 { fill: #5f87af;font-style: italic; } -.terminal-3137399125-r7 { fill: #c5c8c6;font-weight: bold } -.terminal-3137399125-r8 { fill: #5f5fff } -.terminal-3137399125-r9 { fill: #7979a9 } -.terminal-3137399125-r10 { fill: #00afff } -.terminal-3137399125-r11 { fill: #afafff } -.terminal-3137399125-r12 { fill: #868887 } -.terminal-3137399125-r13 { fill: #1079a9 } -.terminal-3137399125-r14 { fill: #4961a9 } -.terminal-3137399125-r15 { fill: #868887;font-style: italic; } + .terminal-3137530197-r1 { fill: #c5c8c6 } +.terminal-3137530197-r2 { fill: #5f87ff } +.terminal-3137530197-r3 { fill: #5f87ff;font-style: italic; } +.terminal-3137530197-r4 { fill: #5f87af } +.terminal-3137530197-r5 { fill: #5f87af;font-weight: bold } +.terminal-3137530197-r6 { fill: #5f87af;font-style: italic; } +.terminal-3137530197-r7 { fill: #c5c8c6;font-weight: bold } +.terminal-3137530197-r8 { fill: #5f5fff } +.terminal-3137530197-r9 { fill: #7979a9 } +.terminal-3137530197-r10 { fill: #00afff } +.terminal-3137530197-r11 { fill: #afafff } +.terminal-3137530197-r12 { fill: #868887 } +.terminal-3137530197-r13 { fill: #1079a9 } +.terminal-3137530197-r14 { fill: #4961a9 } +.terminal-3137530197-r15 { fill: #868887;font-style: italic; } - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - term + term - + - -                                                  ☁️  OnBoardMe 💻 -Get your daily driver just the way you like it, from textformatting, and dot files to opensource package -installation, onboardme intends to save you time with initializing or upgrading your environment. - -Usage:  onboardme[OPTIONS] - -╭─ ⌥  Options ───────────────────────────────────────────────────────────────────────────────────────────────────╮ - --l--log_level LOGLEVELLogging level. Choices: debuginfowarnerror -Default: warn - --o--log_file LOGFILEFull path to file to log to, if set.                                            - --s--steps STEPOnly run STEP in the script.                                                    -Choices: dot_filespackagescronfont_setupneovim_setupgroup_setup,      -sudo_setup -Example: -sdot_files-spackages - --u--git_url URLA git repo URL for your dot files. Default:                                     -https://github.com/jessebot/dot_files - --b--git_branch BRANCHBranch to use for the git repo url. Default: main                               - --d--git_config_dir PATHDirectory to store the git configuration for your dot files. Default:           -~/.config/dot_files                                                             - --O--overwriteOverwrites existing dot files with files from configured --git_url repo. If     -you've set overwrite: true in your config, then --overwrite on the command line -will act as a toggle, so it will NOT overwrite your dot files.                  - --p--pkg_managers PKG_MANAGERSpecific PKG_MANAGER to run. Choices: brewpip3.12pip3.11pipx -Example: -pbrew-ppip3.12 - --g--pkg_groups PKG_GROUPPackage groups to install.                                                      -Choices: defaultdata_sciencedevopsgamingguimailmusicwork -Example: -gdevops-ggaming - --f--firewallSetup iptables (on linux only).                                                 - --r--remote_host IP_ADDRSetup SSH on a random port & add IP_ADDR to firewall                            - --n--no_upgradeDo not upgrade the existing brew or apt packages.                               - ---versionPrint the version of onboardme (1.10.1)                                         - ---helpShow this message and exit.                                                     -╰────────────────────────────────────────────────────────────────────────  ♥ docs: jessebot.github.io/onboardme─╯ + +                                                  ☁️  OnBoardMe 💻 +Get your daily driver just the way you like it, from textformatting, and dot files to opensource package +installation, onboardme intends to save you time with initializing or upgrading your environment. + +Usage:  onboardme[OPTIONS] + +╭─ ⌥  Options ───────────────────────────────────────────────────────────────────────────────────────────────────╮ + +-l--log_level LOGLEVELLogging level. Choices: debuginfowarnerror +Default: warn + +-o--log_file LOGFILEFull path to file to log to, if set.                                            + +-s--steps STEPOnly run STEP in the script.                                                    +Choices: dot_filespackagescronfont_setupneovim_setupgroup_setup,      +sudo_setup +Example: -sdot_files-spackages + +-u--git_url URLA git repo URL for your dot files. Default:                                     +https://github.com/jessebot/dot_files + +-b--git_branch BRANCHBranch to use for the git repo url. Default: main                               + +-d--git_config_dir PATHDirectory to store the git configuration for your dot files. Default:           +~/.config/dot_files                                                             + +-O--overwriteOverwrites existing dot files with files from configured --git_url repo. If     +you've set overwrite: true in your config, then --overwrite on the command line +will act as a toggle, so it will NOT overwrite your dot files.                  + +-p--pkg_managers PKG_MANAGERSpecific PKG_MANAGER to run. Choices: brewpip3.12pip3.11pipx +Example: -pbrew-ppip3.12 + +-g--pkg_groups PKG_GROUPPackage groups to install.                                                      +Choices: defaultdata_sciencedevopsgamingguimailmusicwork +Example: -gdevops-ggaming + +-f--firewallSetup iptables (on linux only).                                                 + +-r--remote_host IP_ADDRSetup SSH on a random port & add IP_ADDR to firewall                            + +-n--no_upgradeDo not upgrade the existing brew or apt packages.                               + +--versionPrint the version of onboardme (1.11.0)                                         + +--helpShow this message and exit.                                                     +╰────────────────────────────────────────────────────────────────────────  ♥ docs: jessebot.github.io/onboardme─╯ diff --git a/onboardme/help_text.py b/onboardme/help_text.py index aefbb0c..5389e63 100755 --- a/onboardme/help_text.py +++ b/onboardme/help_text.py @@ -9,6 +9,7 @@ from rich.table import Table from rich.text import Text from rich.theme import Theme +from os import environ # custom local module from .constants import (DEFAULT_PKG_GROUPS, OPT_PKG_GROUPS, PKG_MNGRS, STEPS, @@ -16,7 +17,7 @@ # this is for creating new help text svgs for the READMEs -RECORD = False +RECORD = environ.get("OBM_SCREENSHOT", False) def pretty_choices(default_list: list) -> str: diff --git a/poetry.lock b/poetry.lock index 9d8ff5d..0524236 100644 --- a/poetry.lock +++ b/poetry.lock @@ -267,13 +267,13 @@ files = [ [[package]] name = "rich" -version = "13.9.2" +version = "13.9.4" description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" optional = false python-versions = ">=3.8.0" files = [ - {file = "rich-13.9.2-py3-none-any.whl", hash = "sha256:8c82a3d3f8dcfe9e734771313e606b39d8247bb6b826e196f4914b333b743cf1"}, - {file = "rich-13.9.2.tar.gz", hash = "sha256:51a2c62057461aaf7152b4d611168f93a9fc73068f8ded2790f29fe2b5366d0c"}, + {file = "rich-13.9.4-py3-none-any.whl", hash = "sha256:6049d5e6ec054bf2779ab3358186963bac2ea89175919d699e378b99738c2a90"}, + {file = "rich-13.9.4.tar.gz", hash = "sha256:439594978a49a09530cff7ebc4b5c7103ef57baf48d5ea3184f21d9a2befa098"}, ] [package.dependencies] @@ -296,13 +296,13 @@ files = [ [[package]] name = "virtualenv" -version = "20.27.0" +version = "20.27.1" description = "Virtual Python Environment builder" optional = false python-versions = ">=3.8" files = [ - {file = "virtualenv-20.27.0-py3-none-any.whl", hash = "sha256:44a72c29cceb0ee08f300b314848c86e57bf8d1f13107a5e671fb9274138d655"}, - {file = "virtualenv-20.27.0.tar.gz", hash = "sha256:2ca56a68ed615b8fe4326d11a0dca5dfbe8fd68510fb6c6349163bed3c15f2b2"}, + {file = "virtualenv-20.27.1-py3-none-any.whl", hash = "sha256:f11f1b8a29525562925f745563bfd48b189450f61fb34c4f9cc79dd5aa32a1f4"}, + {file = "virtualenv-20.27.1.tar.gz", hash = "sha256:142c6be10212543b32c6c45d3d3893dff89112cc588b7d0879ae5a1ec03a47ba"}, ] [package.dependencies] @@ -338,4 +338,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = ">=3.11,<3.13" -content-hash = "fdf2266dfc7b6282981fd8d2d5b0dc03cec97403f10da58045dcc441f06b6b83" +content-hash = "d09f58b573dd5ada9a17fbd6edd136f0ee367142f59810a4f97c3dd4b49c17e7" diff --git a/pyproject.toml b/pyproject.toml index 47aac84..db25d05 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "onboardme" -version = "1.10.1" +version = "1.11.0" description = "Install dot files and packages, including a base mode with sensible defaults to run on most computers running Debian based distros or macOS." authors = [ "Jesse Hitch ", @@ -25,7 +25,7 @@ include = ["onboardme/scripts/update_apt_sources.sh"] [tool.poetry.dependencies] python = ">=3.11,<3.13" click = "^8.1" -rich = "^13.6" +rich = "^13.9" PyYAML = "^6.0" GitPython = "^3.1" wget = "^3.2" diff --git a/setup.sh b/setup.sh index 8b4cb7a..9b7b977 100755 --- a/setup.sh +++ b/setup.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # just a quick script to install some reqs for onboardme # works on Debian (Bookworm) based distros and macOS (13.0.1 and later) -# Checks for: brew, git, and python3.11 +# Checks for: brew, git, and python3.12 export XDG_CONFIG_HOME="$HOME/.config" export XDG_CACHE_HOME="$HOME/.cache" @@ -92,7 +92,20 @@ echo -e "\n-------------------------------- \033[94m 🎬 Beginning Setup \033[0 echo "" if [[ "$OS" == *"Linux"* ]]; then echo -e "---------------------------- \033[94m Updating existing apt packages \033[00m --------------------" - DEBIAN_FRONTEND=noninteractive sudo apt-get update; sudo apt-get -y upgrade + + DEBIAN_FRONTEND=noninteractive sudo cat << EOF > /etc/apt/sources.list + deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware + deb-src http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware + + deb http://deb.debian.org/debian-security/ bookworm-security main contrib non-free + deb-src http://deb.debian.org/debian-security/ bookworm-security main contrib non-free + + deb http://deb.debian.org/debian bookworm-updates main contrib non-free + deb-src http://deb.debian.org/debian bookworm-updates main contrib non-free + + deb http://deb.debian.org/debian bookworm-backports main + deb http://deb.debian.org/debian bullseye-backports main + EOF; sudo apt-get update; sudo apt-get -y upgrade; sudo apt-get -y full-upgrade echo -e "\033[92m apt updated/upgraded :3 \033[00m" fi @@ -206,48 +219,49 @@ if [[ "$OS" == *"Linux"* ]]; then fi # check to make sure we have python3 and pip3 installed -which python3.11 > /dev/null +which python3.12 > /dev/null py_return_code=$? if [ $py_return_code -ne 0 ]; then if [ "$OS" == "Darwin" ]; then - echo "Installing Python3.11 via brew..." - brew install python@3.11 - echo -e "\033[92mPython3.11 installed :3 \033[00m" + echo "Installing Python3.12 via brew..." + brew install python@3.12 + echo -e "\033[92mPython3.12 installed :3 \033[00m" else - echo "Installing Python3.11 via apt..." - DEBIAN_FRONTEND=noninteractive && \ + echo "Installing Python3.12 via apt..." + DEBIAN_FRONTEND=noninteractive && \ sudo apt-get install -y software-properties-common && \ sudo add-apt-repository -y ppa:deadsnakes/ppa && \ - sudo apt install -y python3.11 && \ - curl -sS https://bootstrap.pypa.io/get-pip.py | python3.11 - echo 'export PATH="$PATH:/home/friend/.local/bin/"' >> ~/.bashrc + sudo apt install -y python3.12 && \ + curl -sS https://bootstrap.pypa.io/get-pip.py | python3.12 + echo 'export PATH="$PATH:$HOME/.local/bin/"' >> ~/.bashrc . ~/.bashrc - echo -e "\033[92mPython3.11 installed :3 \033[00m" + echo -e "\033[92mPython3.12 installed :3 \033[00m" fi else - echo -e "\033[92mPython3.11 already installed :3 \033[00m" - which pip3.11 > /dev/null + echo -e "\033[92mPython3.12 already installed :3 \033[00m" + which pip3.12 > /dev/null pip_return_code=$? if [ $pip_return_code -ne 0 ]; then echo -e "\033[92mInstalling pip via apt... \033[00m" DEBIAN_FRONTEND=noninteractive && \ sudo apt-get update && \ sudo apt-get install -y python3-pip python3-venv && \ - curl -sS https://bootstrap.pypa.io/get-pip.py | python3.11 - echo 'export PATH="$PATH:/home/friend/.local/bin/"' >> ~/.bashrc + curl -sS https://bootstrap.pypa.io/get-pip.py | python3.12 + echo 'export PATH="$PATH:$HOME/.local/bin/"' >> ~/.bashrc . ~/.bashrc - echo -e "\033[92mPip3.11 installed :3 \033[00m" + echo -e "\033[92mPip3.12 installed :3 \033[00m" fi fi echo -e "--------------------------\033[94m Installing OnBoardMe :D \033[00m -------------------------" -pip3.11 install --upgrade --user onboardme -pip_install_return_code=$? +pip3.12 install --upgrade --user pipx +pipx install onboardme +pipx_install_return_code=$? -if [ $pip_install_return_code -ne 0 ]; then +if [ $pipx_install_return_code -ne 0 ]; then echo "Something went wrong with the installation of onboardme. :(" else echo ""