BastliPOSPrinter

git clone git://xatko.vsos.ethz.ch/BastliPOSPrinter.git
Log | Files | Refs | README

README.md (1104B)


      1 RabbitMQ POS UNIX Service for Labelprinting (RaPOUNSeL)
      2 ======================================================
      3 
      4 This program takes JSON-Messages from an AMQP Queue, and prints them to an ASCII printer
      5 
      6 Requirements
      7 ------------
      8 
      9 * amqp-tools
     10 * lua
     11 * luajson
     12 * ansifilter
     13 * bash
     14 * groff
     15 
     16 Operation
     17 ---------
     18 
     19 The `./daemon.sh` script is just a wrapper around `amqp-consume`
     20 Whenever a message gets sent to the queue, the `./start_pipeline.sh` script is executed.
     21 This script (and `./pipeline.sh`) execute all executable files inside ./pipeline/ in lexical
     22 order, and connects them to each other via stdout←→stdin.
     23 
     24 Pipeline
     25 --------
     26 
     27 The pipeline does the following:
     28 
     29 1. The JSON is parsed and applied to a groff template (a neat typesetting system historically used for man-pages)
     30 2. This groff-file is then converted from UTF8 to ASCII
     31 3. It is fed into the groff processor, which outputs an ascii file but with escape sequences for a VT100-terminal
     32 4. These ANSI-Sequences are removed with `ansifilter`
     33 5. Empty lines at the beginning of the file are removed
     34 6. The file is sent off to the printer