/pfsense-voucher-printer

Simple python and Flask interface to import and print vouchers from pfsense

Primary LanguagePythonMIT LicenseMIT

Pfsence Voucher Printer

(https://syslinux.info)

This is some simple python scripts and Flask interface to importing and printing vouchers generated from pfsense

This was built to print vouchers on a thermal printer like this one and specificly to make use of this app for the printing.

Rolls from pfSense are store in a sqlite3 database. Since this uses SQLAlchemy most any databases should work since I dont use dialects.

You should secure this by running it behind a real webserver like nginx or apache which provides the means for security.

FYI, if you try to run this in a desktop web browser, it might seem like its not working. Thats because the output generated after clicking the button is meant to only be supported by Android bluetoohprint app.

Installation

Requires Python v3+ to run.

$ git clone https://github.com/hornetmadness/pfsence-voucher-printer.git
$ cd pfsence-voucher-printer

Install the dependencies

$ pip install -r requriements.txt

Import the CSV Rolls

$ python import.py --file /tmp/roll1 --minutes 60

Start the server

$ ./start.sh

Docker

This image is provided

License

MIT