diff --git a/README.rst b/README.rst index 534ddea..5fc910d 100644 --- a/README.rst +++ b/README.rst @@ -46,6 +46,9 @@ Here below the new configuration options available in the `pibooth`_ configurati # Location on 'print' state: topleft, topright, bottomleft, bottomright, midtop-left, midtop-right, midbottom-left, midbottom-right print_location = bottomright + # Size of the QR-Code in nummeric steps (Default = 4) + size = 4 + .. note:: Edit the configuration by running the command ``pibooth --config``. QR code URL diff --git a/pibooth_qrcode.py b/pibooth_qrcode.py index 24e85e6..82ebea0 100644 --- a/pibooth_qrcode.py +++ b/pibooth_qrcode.py @@ -43,7 +43,8 @@ def pibooth_configure(cfg): cfg.add_option(SECTION, 'print_location', "bottomright", "Location on 'print' state: {}".format(', '.join(LOCATIONS)), "Location on print screen", LOCATIONS) - + cfg.add_option(SECTION, 'size', "4", + "Size of QR code", "Size", "4") def get_qrcode_rect(win_rect, qrcode_image, location, offset): sublocation = '' @@ -139,8 +140,8 @@ def state_processing_exit(cfg, app): raise ModuleNotFoundError("No module named 'qrcode'") qr = qrcode.QRCode(version=1, error_correction=qrcode.constants.ERROR_CORRECT_L, - box_size=3, - border=1) + box_size=cfg.gettyped("QRCODE", 'size'), + border=4) url_vars = {'picture': app.picture_filename, 'count': app.count,