Initial Commit

This commit is contained in:
2025-01-14 22:34:50 -06:00
commit d4b7828e0d
1240 changed files with 75 additions and 0 deletions

19
pack-card.sh Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/sh
PACKNAME=${1%.*}
OUTDIR="../OUT"
mkdir -p "$OUTDIR/assets"
printf "{\"$PACKNAME\":{" > "$OUTDIR/$PACKNAME.json"
printf "\"\":{" >> "$OUTDIR/$PACKNAME.json"
OUTNAME="$(sha256sum "$1" | awk '{ print $1 }').${1##*.}"
# _IMAGE_FILE = --usercard-image css var
printf "\"\$IMAGE_FILE\":\"$OUTNAME\"" >> "$OUTDIR/$PACKNAME.json"
if [ ! -z $2 ]; then
printf ",\"--usercard-color\":\"$2\"" >> "$OUTDIR/$PACKNAME.json"
if [ ! -z $3 ]; then
printf ",\"--main-text\":\"$3\"" >> "$OUTDIR/$PACKNAME.json"
if [ ! -z $4 ]; then
printf ",\"--usercard-outline\":\"$4\"" >> "$OUTDIR/$PACKNAME.json"
fi
fi
fi
printf "}}}" >> "$OUTDIR/$PACKNAME.json"