justfiles for automating various tasks on my workstation

Refactor

+4
README.md
···
# justfiles
justfiles for automating various tasks in my homelab
## Expected workflow
···
```shell
just fetch-os-specific
```
···
# justfiles
+
<<<<<<< Updated upstream
justfiles for automating various tasks in my homelab
## Expected workflow
···
```shell
just fetch-os-specific
```
+
=======
+
justfiles for automating various tasks on my workstation
+
>>>>>>> Stashed changes
+1 -1
install.just
···
pipx install black
pipx install isort
pipx install nginxfmt
-
sudo pacman -S shellcheck shfmt jq
# Install todo.txt
[group('install')]
···
pipx install black
pipx install isort
pipx install nginxfmt
+
echo "Install shellcheck shfmt jq with your distro's package manager"
# Install todo.txt
[group('install')]
+1 -2
notes.just
···
YEAR={{ year }}
if [ ! -f "${MEM_DIR}/${YEAR}.md" ]; then
cat <<EOF >"${MEM_DIR}/${YEAR}.md"
-
$YEAR
-
========================
EOF
···
YEAR={{ year }}
if [ ! -f "${MEM_DIR}/${YEAR}.md" ]; then
cat <<EOF >"${MEM_DIR}/${YEAR}.md"
+
# $YEAR
EOF
+1
setup.just
···
services=(
"atop.service"
"atopacct.service"
"firewalld.service"
"prometheus-node-exporter.service"
"snapper-cleanup.timer"
···
services=(
"atop.service"
"atopacct.service"
+
"atop-rotate.timer"
"firewalld.service"
"prometheus-node-exporter.service"
"snapper-cleanup.timer"
+22 -29
utilities.just
···
[group('utilities')]
copy-screenshots:
#!/usr/bin/env bash
-
GAME=$(ugum choose eso starfield bg3)
-
case "$GAME" in
-
"eso")
-
find "${HOME}/.steam/steam/steamapps/compatdata/306130/pfx/drive_c/users/steamuser/Documents/Elder Scrolls Online/live/Screenshots" \
-
-maxdepth 1 \
-
-mindepth 1 \
-
-exec cp -fv {} "${HOME}/nextcloud/pictures/eso_screenshots" \;
-
;;
-
"starfield")
-
find "${HOME}/.steam/steam/steamapps/compatdata/1716740/pfx/drive_c/users/steamuser/My Documents/My Games/Starfield/Data/Textures/Photos" \
-
-maxdepth 1 \
-
-mindepth 1 \
-
-not -name "*-thumbnail.png" \
-
-exec cp -fv {} "${HOME}/nextcloud/pictures/starfield_screenshots" \;
-
;;
-
"bg3")
-
find "${HOME}/games/gog/baldurs-gate-3/drive_c/users/steamuser/My Documents/Larian Studios/Baldur's Gate 3/Screenshots" \
-
-maxdepth 1 \
-
-mindepth 1 \
-
-exec cp -fv {} "${HOME}/nextcloud/pictures/bg3_screenshots" \;
-
;;
-
*)
-
echo "Unknown game"
-
;;
-
esac
# Create a .tar.gz archive from {{dir}}
[group('utilities')]
···
# "requests",
# ]
# ///
-
-
"""
-
myip - Fetch and display public IP information from ipinfo.io
-
"""
import json
import requests
···
[group('utilities')]
copy-screenshots:
#!/usr/bin/env bash
+
GAME=$(gum choose eso starfield bg3)
+
if [ "$GAME" = "bg3" ]; then
+
find "${HOME}/games/gog/baldurs-gate-3/drive_c/users/steamuser/My Documents/Larian Studios/Baldur's Gate 3/Screenshots" \
+
-maxdepth 1 \
+
-mindepth 1 \
+
-exec cp -fv {} "${HOME}/nextcloud/pictures/bg3_screenshots" \;
+
fi
+
+
if [ "$GAME" = "eso" ]; then
+
find "${HOME}/.steam/steam/steamapps/compatdata/306130/pfx/drive_c/users/steamuser/Documents/Elder Scrolls Online/live/Screenshots" \
+
-maxdepth 1 \
+
-mindepth 1 \
+
-exec cp -fv {} "${HOME}/nextcloud/pictures/eso_screenshots" \;
+
fi
+
+
if [ "$GAME" = "starfield" ]; then
+
find "${HOME}/.steam/steamapps/compatdata/1716740/pfx/drive_c/users/steamuser/My Documents/My Games/Starfield/Data/Textures/Photos" \
+
-maxdepth 1 \
+
-mindepth 1 \
+
-not -name "*-thumbnail.png" \
+
-exec cp -fv {} "${HOME}/nextcloud/pictures/starfield_screenshots" \;
+
fi
# Create a .tar.gz archive from {{dir}}
[group('utilities')]
···
# "requests",
# ]
# ///
import json
import requests