From 676a730b677cbeba3144fdd21e2b8dd8610d6c1d Mon Sep 17 00:00:00 2001 From: clemtre Date: Thu, 25 Jan 2024 17:26:29 +0100 Subject: [PATCH] init --- banderole.sh | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 banderole.sh diff --git a/banderole.sh b/banderole.sh new file mode 100755 index 0000000..9ea66cc --- /dev/null +++ b/banderole.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +H_px=256 +H_mm=68.5 + +imprimer() +{ +OUT=$(date +%s).png +convert -background white -fill black \ + -size x$H_px \ + -font Junicode-CondLight.ttf label:"$1" \ + -rotate -180 \ + $OUT +# produit en croix +L_px=$(identify -format "%[fx:w]" $OUT) +L_mm=$(bc -l <<< "$L_px * $H_mm / $H_px") + +lp $OUT -s \ + -o PageSize=Custom."$H_mm"x"$L_mm"mm \ + -o TmtSpeed=1 +} + +#while true; do + #read -n1 MESSAGE + #read MESSAGE + MESSAGE="Un outil pour écrire des banderoles sur ticket de caisse → https://git.vvvvvvaria.org/clemtre/banderole.sh · fonctionne sur mac, linux* & *bsd · license CC4r" + #MESSAGE=" (fonctionne sur mac, linux* & *bsd)" + imprimer "$MESSAGE" +#done +