Skip to content

🖨️ Printer daemon interface for Zebra printer

License

Notifications You must be signed in to change notification settings

Sprtch/victoria

Repository files navigation

Victoria

Victoria is the barcode printing daemon handling the barcode generation and the connection with the network connected printer.

It act as the gateway for the other process to physically print the barcodes they send through redis. Victoria also handle the data dispatching to printers and serve as an abstraction for the different printers and the printing dialect.

Usage

This package run as a daemon in the buildroot firmware with file logging and pid file.

During development process the script launch the program with the following command to output the log in the console.

> source venv/bin/activate
> venv/bin/python victoria --no-daemon --debug

Utils

A set of utility script are available in the /utils directory.

gen.py

Generate a template with the title passed with --title argument, and the barcode info with --barcode argument.

print.py

Send a print request through redis to the running victoria script.

Configure

The configuration serve to map the printers to a set of data.

  • The communication medium to the printer
  • The mandatory data to communicate with the printer depending on the medium
  • The redis channel to listen to
  • The available templates to print

This is an exemple configuration file loaded with the -c <path> arugment.

despinassy:
    uri: "postgresql://postgres@localhost/<db_name>" | "sqlite://"

victoria:
    redis: 'victoria' # Default redis channel to listen to
    printers:
        - main: # Name of the printer
            type: "static" # The method of communication
            address: "192.168.8.8" # The 'static' method need an address
            port: 9100  # The 'static' method need a port
            width: 100 # Print output width
            height: 150 # Print output height
            dialect: "zpl" # Dialect used by the printer
            redis: "victoria" # The redis channel this specific printer listen to

Useful links

About

🖨️ Printer daemon interface for Zebra printer

Resources

License

Stars

Watchers

Forks

Packages

No packages published