IMAGE MAGICK

This commit is contained in:
qo-op 2021-06-30 21:22:33 +02:00
parent 56cd41cd28
commit 1169ffe6e4
3 changed files with 4 additions and 5 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

View File

@ -34,8 +34,8 @@ echo "=> ${phonehash}"
htest=$(ls /home/${YOU}/.zen/SMS/PHONE/${phonehash} 2>dev/null) htest=$(ls /home/${YOU}/.zen/SMS/PHONE/${phonehash} 2>dev/null)
if [[ $htest ]]; then if [[ $htest ]]; then
echo "$phone already registered in $htest"
xzuid=$(cat "/home/${YOU}/.zen/SMS/PHONE/${phonehash}/xzuid") xzuid=$(cat "/home/${YOU}/.zen/SMS/PHONE/${phonehash}/xzuid")
echo "$phone already registered it is $xzuid"
fi fi
mkdir -p /home/${YOU}/.zen/SMS/PHONE/${phonehash}/ mkdir -p /home/${YOU}/.zen/SMS/PHONE/${phonehash}/
@ -137,6 +137,7 @@ chmod 775 /home/${YOU}/.zen/SMS/PHONE/${phonehash}/${ts}.tosend.sh
## PRINT ID + MESSAGE ## PRINT ID + MESSAGE
# Disable power off = https://github.com/pklaus/brother_ql/issues/50 # Disable power off = https://github.com/pklaus/brother_ql/issues/50
# echo -n -e '\x1b\x69\x55\x41\x00\x00' | brother_ql -m QL-700 -p /dev/usb/lp0 send - # echo -n -e '\x1b\x69\x55\x41\x00\x00' | brother_ql -m QL-700 -p /dev/usb/lp0 send -
## IMAGE MAGICK https://legacy.imagemagick.org/Usage/layers/#append
######################################################################## ########################################################################
if [[ -e /dev/usb/lp0 ]]; then if [[ -e /dev/usb/lp0 ]]; then
convert -background White label:"$xzuid ${phone}" -append /tmp/${ts}_message.png convert -background White label:"$xzuid ${phone}" -append /tmp/${ts}_message.png

View File

@ -53,13 +53,13 @@ case "$CMD" in
A|AIDE) A|AIDE)
## ASK FOR HELP ## ASK FOR HELP
$MY_PATH/sms/AIDE.sh "$phone" & $MY_PATH/sms/AIDE.sh "$phone" &
exit 0
;; ;;
TEST) TEST)
echo "TEST: sending ___ $TEXT _to_ $phone" echo "TEST: sending ___ $TEXT _to_ $phone"
gammu-smsd-inject TEXT "$phone" -text "$TEXT" gammu-smsd-inject TEXT "$phone" -text "$TEXT"
exit 0
;; ;;
*) *)
echo "MESSAGE DE $phone POUR $CMD" echo "MESSAGE DE $phone POUR $CMD"
MESSAGE=$(echo "$TEXT" | cut -d ' ' -f 2-) MESSAGE=$(echo "$TEXT" | cut -d ' ' -f 2-)
@ -74,8 +74,6 @@ case "$CMD" in
# sudo service gammu-smsd stop # sudo service gammu-smsd stop
# sudo gammu sendsms TEXT "$phone" -text "Message pour ${CMD} bien reçu." # sudo gammu sendsms TEXT "$phone" -text "Message pour ${CMD} bien reçu."
# sudo service gammu-smsd start # sudo service gammu-smsd start
exit 0
;; ;;
esac esac