From 77608c5403aafe3a334199851ecd9f83172e3422 Mon Sep 17 00:00:00 2001 From: mozdi <39409442+mozdi@users.noreply.github.com> Date: Thu, 10 Aug 2023 12:07:47 +0200 Subject: [PATCH 1/2] Added size-Option See https://github.com/pibooth/pibooth-qrcode/issues/20 --- pibooth_qrcode.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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, From 77be5ffbddcff463df494320c673bbb8298123ab Mon Sep 17 00:00:00 2001 From: mozdi <39409442+mozdi@users.noreply.github.com> Date: Thu, 10 Aug 2023 12:11:21 +0200 Subject: [PATCH 2/2] Update README.rst with size-Option --- README.rst | 3 +++ 1 file changed, 3 insertions(+) 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