Commit Graph

865 Commits

Author SHA1 Message Date
Patrick Kanzler 910f2fbf2f add with-statement
* 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
2016-06-17 23:34:51 +02:00
Patrick Kanzler 16569067c2 Merge pull request #135 from python-escpos/doc/mention-binary-printing
DOC add example on printing commands from binary files
2016-05-02 11:16:49 +02:00
Patrick Kanzler a0dc993f2f
DOC add example on printing commands from binary files 2016-05-01 15:27:15 +02:00
Patrick Kanzler 1b00477144 Merge pull request #133 from mike42/bugfix/readthedocs
Converted references to readthedocs.org -> readthedocs.io
2016-05-01 14:56:44 +02:00
Michael Billington ddaf126c20 Converted references to readthedocs.org -> readthedocs.io. Resolves python-escpos/python-escpos#132
grep -irl --exclude-dir='.*' "readthedocs\." | xargs sed -i 's/python-escpos.readthedocs.org/python-escpos.readthedocs.io/g'
2016-04-30 23:22:14 +10:00
Patrick Kanzler 6a2673d01d
DOC extend image-docstring 2016-04-28 21:57:57 +02:00
Patrick Kanzler f6ae109bb9 Merge branch 'TheWaWaR-development' into development 2016-04-28 14:06:06 +02:00
Qian Linfeng 0a8057414c Fix upper method forgot brackets bug 2016-04-28 14:32:00 +08:00
Patrick Kanzler a34e306ea8 Merge pull request #122 from python-escpos/doc/contributing
DOC improve CONTRIBUTING.rst
2016-04-24 19:18:25 +02:00
Patrick Kanzler 2588406831 Merge pull request #124 from python-escpos/improve/packaging
Improve packaging
2016-04-15 01:22:51 +02:00
Patrick Kanzler b6ada13f9b PCKG updated package-configuration
* author/maintainer
* trove-classifiers
* keywords
* supported platforms and versions
2016-04-14 00:41:45 +02:00
Patrick Kanzler eadd9f7583
DOC improve CONTRIBUTING
based on the feedback by @mike42 and @DavisGoglin
2016-04-14 00:16:06 +02:00
Patrick Kanzler 471222eda9 Merge pull request #127 from python-escpos/fix/abstractbaseclass-metaclass
FIX abstractbaseclass in Escpos not properly loaded
2016-04-14 00:02:28 +02:00
Patrick Kanzler c6cc28254e Merge pull request #128 from mike42/feature/rewrite-image-handling
Rewrite image handling
2016-04-14 00:00:52 +02:00
Michael Billington f903af6730 fix: horizontal/vertical density settings were backwards for bitImageRaster 2016-04-13 22:19:50 +10:00
Michael Billington a0d8689141 apply fixes, mainly to whitespace ( patch by @patkan in #128 ) 2016-04-13 21:27:51 +10:00
Michael Billington 44c79eaf11 Remove trailing semicolons
sed -i 's/;$//' escpos/*.py
2016-04-07 22:06:14 +10:00
Michael Billington 4584e3138a switch default image format to bitImageRaster
Printers which don't have native QR rendering are less likely to support the newer GS ( L graphics command.
2016-04-06 21:39:46 +10:00
Michael Billington 6b445b3fb1 update docstrings per QuantifiedCode suggestions 2016-04-06 21:05:32 +10:00
Michael Billington ba03538c50 remove pypy3 from allowed failures 2016-04-06 07:35:40 +10:00
Michael Billington b45afbb297 add implementation of GS v 0, GS ( L and GS *.
- 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
2016-04-06 07:34:19 +10:00
Michael Billington 59afcf778f remove image handling support 2016-04-06 07:26:00 +10:00
Patrick Kanzler 36debff72c
FIX abstractbaseclass in Escpos not properly loaded
* fixes #126
* adds a test to verify the patch
* uses a helperfunction of six in order to properly load ABCMeta in Python 2 and 3
2016-04-03 22:36:57 +02:00
Patrick Kanzler 2aa0878f54 Merge pull request #123 from python-escpos/refactor/misc-issues
Refactor misc issues
2016-04-03 21:46:15 +02:00
Patrick Kanzler 7b18afec75 Merge pull request #125 from mike42/feature/native-qr-update
Implement ESC/POS QR code rendering
2016-04-03 11:37:44 +02:00
Michael Billington f39c4227ec Implement printer-side rendering of QR codes for printers that support it.
Expand settings on escpos.qr to include ec, size,
model and 'native' (send image or send esc/pos QR command).

Default is set as native=False, so existing code will continue to
render QR codes as images.
2016-04-03 13:55:52 +10:00
Patrick Kanzler 481285625b
REFACTOR simplify out-of-bounds-check in control() 2016-04-02 16:02:04 +02:00
Patrick Kanzler 1ee657a750
REFACTOR remove wildcard-import from escpos in printer 2016-04-02 15:33:24 +02:00
Patrick Kanzler 0121aa0bfb
REFACTOR add PEP8-newlines 2016-04-02 15:29:51 +02:00
Patrick Kanzler 7547bfddd2
DOC fix underline length in doc 2016-04-02 15:27:47 +02:00
Patrick Kanzler f6e0edc7c7
REFACTOR variables to be lower case 2016-04-02 15:26:00 +02:00
Patrick Kanzler df77b7dec3
DOC improve CONTRIBUTING.rst
fixes #114
2016-04-02 15:19:45 +02:00
Patrick Kanzler bf3012b882 DOC fix example in readme
Example in readme would print only nonsense, because a newline was missing at the end of text
2016-04-02 10:44:28 +02:00
Patrick Kanzler 68b3ec4d89 Merge pull request #121 from python-escpos/autofix/wrapped2_to3_fix
Fix "Prefer `format()` over string interpolation operator" issue
2016-04-01 21:32:36 +02:00
Cody a236ccebe9 Migrated `%` string formating 2016-04-01 19:19:38 +00:00
Patrick Kanzler 1a1c032d6a Merge pull request #118 from python-escpos/improve/warning-for-image-functions
DOC add warning to the new functions in the image-API
2016-04-01 21:10:39 +02:00
Patrick Kanzler f5a7d681eb DOC add warning to the new functions in the image-API
This part is still in flux and one should not yet rely on it.
2016-04-01 20:59:27 +02:00
Patrick Kanzler abebf7eb99 Merge pull request #107 from DavisGoglin/improve-cli
Improve cli.py
Complete rewrite of cli.py with configurable printer
2016-04-01 20:58:07 +02:00
Davis Goglin fca363119c Fix converting of passed bool values properly 2016-04-01 10:31:28 -07:00
Davis Goglin 8ed1441c4c Clairify config loading comments 2016-03-30 17:13:59 -07:00
Davis Goglin 062282bf47 Fix Spelling 2016-03-30 17:13:20 -07:00
Davis Goglin 3fe4589b8b Add the reset of configurations between loads 2016-03-30 17:11:05 -07:00
Davis Goglin b9c9189ca7 Add an exception for missing configuration sections 2016-03-30 17:10:21 -07:00
Davis Goglin 5ecae9d585 Add more testing directories to .gitignore 2016-03-30 13:50:57 -07:00
Davis Goglin 39da32ca85 Define class vars first in __init__ 2016-03-30 13:38:27 -07:00
Davis Goglin e545999aa2 Convert class methods to static 2016-03-30 13:38:03 -07:00
Davis Goglin 3017c14df2 Add future imports 2016-03-30 13:31:21 -07:00
Davis Goglin 3831665da4 Fix pylint messages 2016-03-30 13:30:44 -07:00
Davis Goglin b6b30d7c82 Add future imports 2016-03-30 13:29:28 -07:00
Davis Goglin 39165fcb41 Fix tests I just wrote then broke 2016-03-28 15:21:16 -07:00