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.
* 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
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.
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.
* 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
* Added the DLE EOT querying command.
Added a function to check whether the printer is online or not, as well
as a reading method for USB printers.
* Update AUTHORS
* Add entry to .mailmap
* currently USB only
* Added authors file
Generated using `git shortlog -s -n` and sorted by alphabetical order
using vim.
* Added generate_authors.sh script and ordered author list
* Regenerated AUTHORS with .mailmap
Actually the hardware barcode implementation is very specific and not
generic enough for just adding a `soft_render=True` argument to it. This
is a first work that can be improved with other commits, maybe for
merging this method in the `barcode` method after some cleanup.
The width, height and text_distance were set using empiric
print-and-retry tests so that the generated barcode looks nice to the
eye (and to the eye of an Android scanner tool.
!WARNING! Printing a barcode that is too large in width will result in
the printer to go crazy trying to print an image that is too large for
it. This may be fixed by raising an exception in the `image` method.