* Ensure QR codes have a border large enough
(The QR code spec requires a border at least 4*box_size thick but we can't
just set border=16 because that results in a QR code more than 255px tall
and I'm not yet ready to use fullimage() as a backend for it)
This fix was originally commited by Stephan Sokolow on 2014-05-22
* Let the user print stuff using qr example
* fix tests
jaconv is available for more Python-versions and seems to be more
professional. Apart from that I added jaconv to the test-requirements
but not the requirements. (If the katakana-stuff really works we can
later add it as a real dependency)
This code is adapted from the works by Frédéric Van der Essen in
pyxmlescpos.
I had to adapt the code completely in order to make it compatible with
modern unicode-handling
Further changes:
* improve text unittests in CLI and MagicEncode with hypothesis
* add feature force_encoding in order to enable old behaviour
* disable cli_text_test (for now)
* fix charcode(): it does now cooperate with the new structure
* remove redundant variable codepage from class Escpos
The file-printer did not automatically flush and thus behaved
differently to the other printer-classes.
Now the default behaviour is to flush after every call of _raw(). This
can be disabled by calling the file-printer with auto_flush=False.
fixes#106
The version string is in the module as __version__ available.
In the doc the version will be automatically parsed. The version comes
from the installed module if on read the docs or directly from
setuptools_scm if you are working locally.
The CLI will issue the version string if you call it with the option
'version'. The CLI does not accept commands like '--version', since this
would not be conform with the rest of the interface (and argparse).
The configuration for loading the version-string is adapted from
pimutils/vdirsyncer. It autogenerates a version string setuptools_scm at
install-time and then adds it to the __version__ member in __init__.py
I adapted the GitHub-template with a fitting comment and bumped the
changelog.
closes#141
* with imported from mosquito (adaption of the code in 86a3e8dfb257e3af0ec141ee5d97717501d6e945 by @mosquito)
* encoding of file to utf-8
* added rudimentary test for with
* implement close function for all printers
- ported test cases for EscposImage class, copied over 1px and 2px test images from escpos-php
- added test cases over image print function
- updated QR tests to also include image output check
- updated CLI to match new image function options