This (experimental) Segno plugin changes the default SVG output in different ways (i.e. applying SVG filters).
Tested under PyPy, Python 2.7 and Python 3.4. Unlike Segno itself, this package does not work with Python 2.6.
Use pip
to install this quark from PyPI:
$ pip install segno-quark
Once installed, the quark is automatically detected as Segno plugin and therefore available via qrcode.to_XXX(...)
.
All converters use the same keyword parameters as Segno's SVG serializer, see segno.QRCode.save() for details.
Creates a SVG QR Code and returns the SVG document as xml.etree.ElementTree
.
Usage: to_etree
This converter provides no additional keyword arguments.
Creates a QR Code with a smiley (and optional ghosts).
Usage: to_pacman
Keyword | Description |
---|---|
pacman_color | Color of the smiley, default: #fc0 |
dot_color |
Color of the dots which the smiley should eat, default: |
ghosts |
Number of ghosts, default: |
ghost_colors |
A tuple of colors which the ghosts may get. Default: |
Example:
>>> import segno
>>> qr = segno.make_qr('Ob-La-Di, Ob-La-Da')
>>> qr.to_pacman('obladioblada.svg', scale=10, ghosts=7)
Result:
Creates a QR Code with a "glow" effect.
Usage: to_glow
Keyword | Description |
---|---|
filter_id | Indicates the id of the filter, default: segno-glow |
deviation |
Indicates the standard deviation for the blur operation, default: |
Example:
>>> import segno
>>> qr = segno.make_qr('Ob-La-Di, Ob-La-Da')
>>> qr.to_glow('obladioblada.svg', scale=10, color='darkblue')
Result:
Creates a QR Code with a "blur" effect.
Usage: to_blur
Keyword | Description |
---|---|
filter_id | Indicates the id of the filter, default: segno-blur |
deviation |
Indicates the standard deviation for the blur operation, default: |
Example:
>>> import segno
>>> qr = segno.make_qr('Ob-La-Di, Ob-La-Da')
>>> qr.to_blur('obladioblada.svg', scale=10, color='darkred')
Result: