9 Commits

Author SHA1 Message Date
Michael Elsdörfer
c7864fd785 Largely rewrite the magic text encoding feature. 2016-08-27 11:28:52 +02:00
Michael Elsdörfer
f6ce7e45da Merge branch 'capabilities' into text-encoding 2016-08-26 15:29:31 +02:00
Michael Elsdörfer
214aa0d363 Fix issue with manually setting the encoding. 2016-08-26 15:14:02 +02:00
Michael Elsdörfer
8b5bc9cf8a Make the Escpos class accept a profile.
This is now used for the block_text function.
2016-08-26 10:41:01 +02:00
Patrick Kanzler
798893caee
refactor access of private member _img of qrcode
Since version 2.5 python-qrcode allows the direct access of the
PIL-functions. (We require version 4 and above).
Thus, we can simply call qr_img.convert() without accessing the private
member.
This refactoring is identical in functionality.
2016-08-15 23:24:06 +02:00
Patrick Kanzler
e8d91a6735
test add type-check for the qr-printing 2016-08-15 23:23:07 +02:00
Patrick Kanzler
0cfedb5706 add automatic codepage-changing
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
2016-08-02 04:42:21 +02:00
Patrick Kanzler
2ecf73074c
improve large image printing
images longer than 1024 pixels will be split into multiple fragments.
2016-08-02 00:04:43 +02:00
Patrick Kanzler
87438f9efa
SETUP move code to src
This way we can ensure that the packaged code is tested.
See https://hynek.me/articles/testing-packaging/ or c62a78c015

+ DOC adapt doc to new structure and test doc with travis
2016-06-20 17:48:14 +02:00