726 Commits

Author SHA1 Message Date
Patrick Kanzler
6fb23d6826
remove test from setup.py (#297)
fixes #294
2018-05-15 00:34:43 +02:00
Patrick Kanzler
f649814091
Fix travis-builds and tests in general (#295)
* add explicit location of capabilities.json for travis
* pass on env variables in tox builds
* drop support for python 3.3 and remove python3.3 from supported versions list
2018-05-14 18:06:31 +02:00
Patrick Kanzler
47b4d41b28
use package for tempdir
cherry-picked from 8494cca526af7ae86af6ed1303224bbb229054ac in #274
2018-05-13 18:52:39 +02:00
Patrick Kanzler
599f4f3ca5
add new authors 2018-05-13 18:44:47 +02:00
primax79
d085e5c467 parameter for implementation of nonnative qrcode (#289) 2018-05-13 18:42:41 +02:00
kennedy
b418302311 Modified submodule to always pull from master branch (#283) 2018-05-13 18:42:07 +02:00
Patrick Kanzler
f6acb72bbe
Merge branch 'fix-travis-builds' into development 2018-05-13 18:40:57 +02:00
Patrick Kanzler
0c9856c1f6
disable QR test for image 2018-05-13 18:26:48 +02:00
Patrick Kanzler
a748563395
blacklist hypothesis version 2018-05-13 18:04:48 +02:00
Patrick Kanzler
b84e280efb
disable broken tests 2018-05-13 17:32:52 +02:00
Thijs Triemstra
4390dc4a9c fix is_online() (#282)
* fix is_online

* fix sphinx formatting

* reword
2018-05-02 09:25:04 +02:00
Thijs Triemstra
6e09fd1e97 fix typo 2018-04-26 07:22:37 +02:00
Thijs Triemstra
100c6b5e89 fix typo (#279) 2018-02-07 22:17:18 +01:00
Christoph Heuel
26d72a69f0 Feature/clear content in dummy printer (#271)
Add Function to Dummy Printer for Clearing Buffer

If you are using the dummy printer, you may want to use the printer
again after sending the output to a physical printer.
This method empties the list of the output buffer.
2017-12-04 00:13:28 +01:00
Patrick Kanzler
01e28bbcf6
ammend blacklisting from cd1bcb57b48c62c1a17be85c2793d5070eee1710
the last comment was a bit rushed and did not properly blacklist both
bad versions of pytest
2017-12-03 23:49:46 +01:00
Patrick Kanzler
2a7e2a6a36
blacklist pytest 3.3.0
see pytest-dev/pytest#2957
2017-12-03 23:43:23 +01:00
reck
3c3dab95f5 raise exception when TypeError occurs in cashdraw (#268) 2017-12-03 23:21:29 +01:00
Patrick Kanzler
d1e7052fa1 Merge pull request #266 from python-escpos/development
release v3.0a3
v3.0a3
2017-10-08 22:45:54 +02:00
Patrick Kanzler
10e1dfe1d1 update changelog 2017-10-08 22:26:55 +02:00
Patrick Kanzler
cd1bcb57b4 remove bugtrack_url
this is not supported by setuptools
2017-10-08 22:12:53 +02:00
Patrick Kanzler
d6d12f99d4 improve test - tests raising of error #257 2017-10-08 21:53:36 +02:00
Patrick Kanzler
128221363f reproduce #257 2017-10-08 21:53:36 +02:00
Patrick Kanzler
6b0b1371e5 fix layout in File-printer-section 2017-10-08 21:31:45 +02:00
Patrick Kanzler
44f01a212b fix docs failing due to pickle protocol in mixed env
When executing a tox-run a pickle file will be created. If the docs are
built after the py3 task, it will fail due to incompatible
pickle-protocols.
See https://stackoverflow.com/a/25843743/4244236 for reference.
2017-10-08 21:08:13 +02:00
Lucy Linder
456f5b7aa6 Feature/check barcodes (#255)
* add a method to check barcode code format

ensure that the code to print is compatible with the ESC/POS formats and
also automatically check this format before printing (barcode() method).

* rewrite test using pytest's parametrize functionality

* add test for the 'check' argument

* update authors list
2017-10-08 20:05:18 +02:00
Patrick Kanzler
d78a6f1699
completely fix tests
The feature use_coverage of hypothesis caused the failing tests, because
the printer_file_test is sensitive to the coverage analysis of
hypothesis.

Fixed by disabling use_coverage for the crashing tests
2017-09-27 10:38:42 +02:00
Patrick Kanzler
5e784c060a
fix tests failing (for now)
hypothesis introduced a regression in 3.29.0 (or at least changed
behaviour). Until I have found the problem I will pin it to the last
working version.

Also two tests should be prevented from failing when they are slow.
2017-09-27 10:29:19 +02:00
Patrick Kanzler
1439b14686
tell sort to ignore case 2017-08-31 13:43:07 +02:00
Romain Porte
b648cfd67f First attempt at centering images and QRs (#250)
This was tested on ZJ-5890 with success. By default centering is
deactivated for backward compatibility. Trying to center a QR code in
native mode will raise an exception as we do not know ATM if the native
rendering is centered by default or not.

* Added basic tests for center feature

* Check image size before centering
2017-08-31 09:25:35 +02:00
Sergio
50c627fbb0 Pickling capabilities for faster start up times. (#252)
On a RaspberryPi it's taking 10 seconds to simply run:

import escpos.printer

This change creates a pickle file that will load 20x faster. The
rationale is that the capabilities.json file doesn't change too often.

Also changed some imports for PEP8.
2017-08-31 09:07:26 +02:00
Sergio Pulgarin
99034d0575 Fixed outdated example file: should be font 'b' not 'B'
Updated AUTHORS using script.
2017-08-31 08:38:32 +02:00
Patrick Kanzler
19663ec574 fix cut function in example 2017-08-10 21:54:52 +02:00
Patrick Kanzler
281eea125f fix abstract read-function
read does not need msg-parameter
2017-08-10 21:51:51 +02:00
Patrick Kanzler
5bed0bfbb4
fix name of pyyaml for PyPi 2017-08-09 10:41:25 +02:00
Patrick Kanzler
f12470d3cd update contributing 2017-08-08 13:37:30 +02:00
Patrick Kanzler
fb0e4c28ba update README 2017-08-08 13:30:16 +02:00
Patrick Kanzler
af29fcca77 alpha release v3.0a2 v3.0a2 2017-08-04 16:48:36 +02:00
Patrick Kanzler
f8b269d859
update changelog for next release 2017-08-04 16:30:31 +02:00
Patrick Kanzler
c259263f26 blacklist pytest 3.2.0 because it breaks our tests
see pytest-dev/pytest#2644 for reference
2017-08-04 15:17:05 +02:00
Patrick Kanzler
27c843935f add viivakoodi to dep in tox-file 2017-08-04 15:17:05 +02:00
Patrick Kanzler
f3da6a9725 remove quanitifed-code-badge 2017-08-01 17:42:34 +02:00
Romain Porte
b64b534394 Add methods for simpler newlines (#246) 2017-08-01 17:09:24 +02:00
Patrick Kanzler
81426ab6dc fix whitespace 2017-08-01 12:27:53 +02:00
Patrick Kanzler
df1193ab35 implement read for Serial 2017-08-01 11:20:00 +02:00
mrwunderbar666
b494c9a4bd Weather Forecast Example Script (#239)
* Example Weather forecast script

Used Adafruits example as base and adapted it for python-escpos
Weather icons taken from 
http://adamwhitcroft.com/climacons/

* Weather Icons from Adam Whitcroft

Weather Icons from http://adamwhitcroft.com/climacons/

* update authors

* Minor improvements

* Weather Script Debugged

Added one more Icon
Attributed Icons in readme.md
changed folder structure

* Change formatting

* Fixed pathing to graphics issue

* fixed image size

* autopep8 to clean up the code
2017-08-01 11:13:45 +02:00
Patrick Kanzler
f8a2174108 fix typo 2017-07-27 23:06:59 +02:00
csoft2k
1f57b04974 Paper sensor querying command (#242)
The DLE EOT command allows querying the status of several features of
the printer.
Added to the online/offline status developed in #237, this commit adds a
paper sensor querying.

Tested with an Epson TM-T20II, which only has an end-paper sensor. The
near-end paper sensor should be tested with a compatible printer.
However, the implementation is quite straight-forward.
2017-07-27 23:05:50 +02:00
Romain Porte
c7080165a7 Added test script for hard and soft barcodes (#243) 2017-07-27 22:45:51 +02:00
Patrick Kanzler
cf0cf127fe
add changelog for next release 2017-07-27 16:50:41 +02:00
csoft2k
82c67aa646 Fix tabs behaviour (#238)
The changes done in this commit should help with the open issues:
#5, #27 and #161.
The old implementation lacked the NUL char at the end of the command, as
defined on the Epson ESC/POS Reference Guide (see
https://reference.epson-biz.com/modules/ref_escpos/index.php?content_id=53
). Also, the horizontal tab control character (CTL_HT) shouldn't be
there.

This implementation allows setting up to 32 tabs with a given tab width.
Both values are checked to be in the valid ranges defined on the guide.
Also, the TabPosError exception text has been rewritten to define the
stated above.
2017-07-26 10:01:08 +02:00