extract ${PLAYER} Tiddler image

This commit is contained in:
fred 2024-03-08 15:40:26 +01:00
parent d05759045a
commit 84b841941a
1 changed files with 1 additions and 1 deletions

View File

@ -57,7 +57,7 @@ if [[ ! -d $img_dir ]]; then
if [[ -s ${INDEX} ]]; then
# EXTRACT [tag[moa]] : ~/.zen/game/players/${PLAYER}/moa.jpg
tiddlywiki --load ${INDEX} --output ~/.zen/tmp --render '.' "${PLAYER}.moa.json" 'text/plain' '$:/core/templates/exporters/JsonFile' 'exportFilter' '[tag[moa]]'
tiddlywiki --load ${INDEX} --output ~/.zen/tmp --render '.' "${PLAYER}.moa.json" 'text/plain' '$:/core/templates/exporters/JsonFile' 'exportFilter' "${PLAYER}"
cat ~/.zen/tmp/${PLAYER}.moa.json | jq -r '.[].text' | base64 -d > ~/.zen/game/players/${PLAYER}/moa.jpg
echo "DESSIN DE MOA : ~/.zen/game/players/${PLAYER}/moa.jpg"
[[ $(file -b ~/.zen/game/players/${PLAYER}/moa.jpg | cut -d ' ' -f 1) == "JPEG" ]] \