X-Git-Url: https://git.plutz.net/?p=confetti;a=blobdiff_plain;f=actions%2Fupdate_therapy.sh;h=e7dcae2def0196465dbc5b599c32abb1a5f37f6f;hp=52daa11ba0e042f921a66738edee62c7c21e16d7;hb=33a8e0e8967077bb2aa63b4bea706dc61d3e42d8;hpb=9f2501bc748fa3ef47a6c1870dc462e403ee5d55 diff --git a/actions/update_therapy.sh b/actions/update_therapy.sh index 52daa11..e7dcae2 100755 --- a/actions/update_therapy.sh +++ b/actions/update_therapy.sh @@ -52,24 +52,16 @@ elif [ -n "$_POST[new_session]" ]; then printf '%s:exists\n' "$sid" >>"$tempfile" printf '%s_open:checked\n' "$sid" >>"$tempfile" -elif [ -n "$_POST[dotmark.x]" -a -n "$_POST[dotmark.y]" ]; then - sed -rn 's;^(session[0-9]+)_open:checked$;\1;p' "$tempfile" \ - | sort -n \ - | tail -n1 \ - | read sid - - x="$_POST[dotmark.x]" - y="$_POST[dotmark.y]" - - convert "${tpyfile%.tpy}_${sid}.png" -draw "fill $_POST[color] circle $x,$y $(($x+5)),$y" "${tpyfile%.tpy}_${sid}.png" - elif [ -n "$_POST[imagedata]" ]; then sed -rn 's;^(session[0-9]+)_open:checked$;\1;p' "$tempfile" \ | sort -n \ | tail -n1 \ | read sid - convert "${tpyfile%.tpy}_${sid}.png" -draw "${_POST[imagedata]}" -transparent white "${tpyfile%.tpy}_${sid}.png" + convert "${tpyfile%.tpy}_${sid}.png" \ + -strokewidth 2 -fill '#00000000' \ + -draw "${_POST[imagedata]}" -transparent white \ + "${tpyfile%.tpy}_${sid}.png" sync fi