pibooth-qr-server
is a plugin for the pibooth application.
It adds an automatic server upload functionality that integrates with the pibooth-qrcode
plugin to display the generated link as a QR code and uses the Pibooth Photo Server
as a backend.
-
Clone the repository:
git clone https://github.com/your_username/pibooth-qr-server.git
-
Navigate to the project directory:
cd pibooth-qr-server
-
Install the required dependencies:
pip3 install -r requirements.txt
-
Install pibooth-qrcode if you haven't done so:
pip3 install pibooth-qrcode
-
Deploy the
Pibooth Photo Server
and generate an access token:node server.js -k [Name of the token] [Expiration time in days]
Note: These sections should be automatically added to the pibooth.cfg
upon running pibooth --configure
once.
To use the Pibooth QR Server Plugin, you need to define the following parameters in the pibooth.cfg
file under the [DOWNLOAD_SERVER]
section:
Note: The URL should be defined without the last "/"
[DOWNLOAD_SERVER]
# Server URL to download the picture.
# Required by 'qr_server' plugin
server_url = <https://yourserver.example.net>
# Duration the image is available in hours for download.
# Required by 'qr_server' plugin
upload_available_hours = 24
# Token to authenticate the download server.
# Required by 'qr_server' plugin
token = <your token>
Additionally, you need to configure the prefix_url
parameter under the [QRCODE]
section in the pibooth.cfg
file by changing it to {url}
:
[QRCODE]
# URL which may be composed of variables: {picture}, {count}
# Required by 'qrcode' plugin
prefix_url = {url}
If pip
can't install the plugin properly you can also import it as a path in the pibooth.cfg
:
[GENERAL]
...
# Path to custom plugin(s) not installed with pip (list of quoted paths accepted)
plugins = /path/to/plugin/pibooth_qr_server.py
...