A tool for writing banners using a thermal printer
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1.8 KiB


A tool for writing banners on cash receipts.
Works on mac, linux* and *bsd
CC4r license
___________________________________________________
/ |) _, _| _ _. _ |\ _ , |) * \
\ |/\_/ | /|/| / | |/ / | / \_|/ |/ / \_|/\ /
/ /\/ \/|_/ | |_/\/|_/|_/ |/\_/ |_/|_/o \/ | |/ \
\____________________________* banner, streamer ____/


We use the -label flag of the image magick convert command to
generate the text contained in the MESSAGE variable on a white background.
The image is saved as a png and is named according to the number of
seconds passed since January 1, 1970. (see: Posix time)
Then, we calculate a cross product of the image obtained to have the
length of the ticket in millimeters to print.
We send this image to the printer via the lp command of the utility
cups, specifying the dimensions calculated in millimeters.

Dependencies
* image magick (Licence ImageMagick →
https://imagemagick.org/script/license.php): software to generate
and process one or more images → https://imagemagick.org/
* cups (Apache 2.0): an interface to communicate with
printers → https://openprinting.github.io/cups

_______________________________________________________________________
/!\ important /!\
banderole.sh is supplied WITHOUT a thermal printer. It is necessary
to have access to such a tool to print a banner. I use a
Epson TM-T20II which prints up to 80mm wide and connects via USB,
there are plenty of others, you have to hunt around...
_______________________________________________________________________

Written at erg during the winterschool of 2024
contact@martinlemaire.fr