Commit Graph

161 Commits

Author SHA1 Message Date
Patrick Kanzler f0bdbc4322 doc changelog and todos updated 2016-08-02 04:42:21 +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 b0af9e9652 improve restructure charcode-table
restructured the charcode table in order to be more accessible to
programmatic usage
2016-08-02 04:42:21 +02:00
Patrick Kanzler 3546e0c4bb improve the exceptions
also adds a stump for the tests for MagicEncode
2016-08-02 04:42:21 +02:00
Patrick Kanzler 3d98eb8b9c fix file-printer did not flush
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
2016-08-02 04:25:54 +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
Renato.Lorenzi bef1a9cccf Change the interface param to timeout 2016-08-01 09:36:48 -03:00
Patrick Kanzler 80b714fdae
add basic argcomplete support 2016-07-23 10:39:40 +02:00
Patrick Kanzler a5cae3adb7 fix inconsistent behaviour of argparse-code
this affected certain versions of argparse in python3
2016-07-17 19:39:51 +02:00
Patrick Kanzler 9f5eed0020
add version-strings into the module
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
2016-07-17 19:39:42 +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