* add inheritance diagrams to all printers and exceptions
* split off printer implementations into separate files
* add wrapper that thros RuntimeError if not importable
* add dependency check for lp
* add dependency check for pyserial
* added check for usability
* import Win32Raw
* include WIn32Raw in documentation
* enable all extras on tox
* update github workflow
* bug/doc: Fix invalid EAN-13 barcode in examples
In the various examples and python-escpos CLI there are a number of uses
of `13243546557687` as an EAN-13 example. This EAN barcode is invalid
as the checksum should be `0` and not `7`.
```
$ python test_print.py
Traceback (most recent call last):
File "test_print.py", line 5, in <module>
p.barcode('13243546557687', 'EAN13', 64, 2, '', '')
File "/home/pi/fatt-display/lib/python3.7/site-packages/escpos/escpos.py", line 433, in barcode
bc=bc,
escpos.exceptions.BarcodeCodeError: No Barcode code was supplied (Barcode '13243546557687' not in a valid format for type 'EAN13')
```
This patch set removes `13243546557687` and replaces it with the valid
number `40063813339310`.
In researching the list of [assigned prefixes issued by
G1][g1-prefixes] there seemed to be no "officially" defined test prefix, so
this change was made to be minimally invasive using the number from the
existing test cases.
Resolves#350
Affects #176
[g1-prefixes]: https://www.gs1.org/standards/id-keys/company-prefix
[test-code]: https://www.barcodelookup.com/4006381333931
---------
Co-authored-by: Brian 'Redbeard' Harrington <redbeard@dead-city.org>
* Merge software and hardware barcodes to one method
* Fix wrong sw barcode heigh/width
* Add missing param to _sw_barcode call
* Make barcode() smarter, improvements and clean up
* Use param font_size in sw_barcode()
* Update docstrings
* Update barcode examples and docs
* Add --force_software option to CLI
* Attempt to match the sw and hw barcode sizes
* Better approximation to native font size
* Fix docs build
* Update tests at test_function_softbarcode
* Fix exception
* Move image dpi setting to writter_options
* Fix _sw_barcode() docstring param
* Fix wrong default param in docstring
* improve linkage in documentation
---------
Co-authored-by: Patrick Kanzler <4189642+patkan@users.noreply.github.com>
Co-authored-by: Patrick Kanzler <dev@pkanzler.de>
Python 2.7 EOL is arriving on 2020-01-01: https://pythonclock.org/
This will allow us to use Python 3 only libraries, like python-barcode,
which can maintain a reduced, simpler codebase, due to only one version
to support.
Closes#371.
Signed-off-by: Romain Porte <microjoe@microjoe.org>
* Update dec about installation for raspi
* Rollback syntax about warning on raspi doc
* Add a link of installation-manual on raspi doc
* Update last reviewed date for raspi doc