Update script

This commit is contained in:
2026-02-05 10:14:52 -05:00
parent 86bee105e7
commit e1598963da
2 changed files with 23 additions and 2 deletions

View File

@@ -53,16 +53,37 @@ case "$IMAGE_NAME" in
ENCODED_IMAGE_NAME="olympics%2Folympics.png"
FONT_SIZE="750"
FONT_PATH="%2Fusr%2Fshare%2Ffonts%2Ftruetype%2Fgoogle-fonts%2FRoboto-Black.ttf"
POSITION="right"
CUSTOM_TEXT_COLOR=""
;;
olympics_2026.png)
ENCODED_IMAGE_NAME="olympics%2Folympics_2026.png"
FONT_SIZE="500"
FONT_PATH="%2Fusr%2Fshare%2Ffonts%2Ftruetype%2Fnoto%2FNotoSans-Bold.ttf"
POSITION="bottom"
CUSTOM_TEXT_COLOR="%23a1b0b8"
;;
*)
echo "Error: Unknown image name: $IMAGE_NAME"
echo "Supported images: espn-plus-light.png, espn-plus-dark.png, sportsnet-plus-light.png, sportsnet-plus-dark.png, tsn-plus-light.png, tsn-plus-dark.png"
echo "Supported images: espn-plus-light.png, espn-plus-dark.png, sportsnet-plus-light.png, sportsnet-plus-dark.png, tsn-plus-light.png, tsn-plus-dark.png, olympics.png, olympics_2026.png"
exit 1
;;
esac
# Determine text color to use
if [ -n "$CUSTOM_TEXT_COLOR" ]; then
FINAL_TEXT_COLOR="$CUSTOM_TEXT_COLOR"
else
FINAL_TEXT_COLOR="$TEXT_COLOR"
fi
# Determine position to use
if [ -z "$POSITION" ]; then
POSITION="right"
fi
# Base URL template
BASE_URL="http://nymeria.swvn.local:5123/api/image?url=https%3A%2F%2Fgit.seth.services%2Fseth-public%2Fscripts%2Fraw%2Fbranch%2Fmain%2F${ENCODED_IMAGE_NAME}&text=NUMBER&position=right&font_size=${FONT_SIZE}&padding=auto&text_color=${TEXT_COLOR}&bg_color=transparent&font_path=${FONT_PATH}"
BASE_URL="http://nymeria.swvn.local:5123/api/image?url=https%3A%2F%2Fgit.seth.services%2Fseth-public%2Fscripts%2Fraw%2Fbranch%2Fmain%2F${ENCODED_IMAGE_NAME}&text=NUMBER&position=${POSITION}&font_size=${FONT_SIZE}&padding=auto&text_color=${FINAL_TEXT_COLOR}&bg_color=transparent&font_path=${FONT_PATH}"
# Create output directory if it doesn't exist
mkdir -p "$OUTPUT_PATH"

BIN
olympics/olympics_2026.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 451 KiB