From 3e5d47ac18809f25c8c419bdd80dbfb75a1fdca8 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Mon, 1 May 2017 14:22:28 +0200 Subject: [PATCH] Update doc and don't print face --- README.md | 13 +++++++++---- sirius/web/printer_print.py | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 856b986..8806158 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,10 @@ Differences with the original project : * Update requirements.txt to fix some bugs * Improve documentation - + * Add links from the community + * Add a guide for Debian + * Recommend PhantomJS 2.1.1 to support pictures + * Deactivate face printing by default (will add a switch soon) ## Using it @@ -35,15 +38,17 @@ cd sirius pip install -r requirements.txt -wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-linux-x86_64.tar.bz2 -tar jxf phantomjs-1.9.8-linux-x86_64.tar.bz2 -sudo mv phantomjs-1.9.8-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs +wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 +tar jxf phantomjs-2.1.1-linux-x86_64.tar.bz2 +sudo mv phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs ./manage.py db upgrade head ~/.local/bin/gunicorn -k flask_sockets.worker manage:app -b 0.0.0.0:5002 -w 1 ``` +*With PhantomJS 1.9.8 I can't print pictures but version 2.1.1 seems to fix the problem*. + Navigate browser to http://127.0.0.1:5002/ You should configure your BergCloud Bridge to point to your Sirius instance. diff --git a/sirius/web/printer_print.py b/sirius/web/printer_print.py index 69bcc64..2c2eeaa 100644 --- a/sirius/web/printer_print.py +++ b/sirius/web/printer_print.py @@ -70,7 +70,7 @@ def printer_print(printer_id): # TODO: use templating to avoid injection attacks pixels = image_encoding.default_pipeline( templating.default_template(form.message.data)) - hardware_message = messages.SetDeliveryAndPrint( + hardware_message = messages.SetDeliveryAndPrintNoFace( device_address=printer.device_address, pixels=pixels, ) -- 2.47.3