Compare commits

...

3 Commits

Author SHA1 Message Date
Patrick Kanzler a68347ee1c update mailmap-file 2019-06-30 17:43:20 +02:00
Brian 'Redbeard' Harrington c40f2abe07 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
2019-06-29 19:19:16 -07:00
Brian 'Redbeard' Harrington fb82e5dc4a AUTHORS: Adding Brian Redbeard to AUTHORS
As per `CONTRIBUTING.rst` including a commit for Brian 'redbeard'
Harrington to AUTHORS
2019-06-29 19:19:16 -07:00
5 changed files with 8 additions and 6 deletions

View File

@ -13,3 +13,4 @@ csoft2k <csoft2k@hotmail.com>
Sergio Pulgarin <sergio.pulgarin@gmail.com>
reck31 <rakesh.gunduka@gmail.com>
Alex Debiasio <alex.debiasio@thinkin.io> <alex.debiasio@studenti.unitn.it>
Brian 'Redbeard' Harrington <redbeard@dead-city.org>

View File

@ -3,6 +3,7 @@ akeonly
Alex Debiasio
Asuki Kono
belono
Brian 'Redbeard' Harrington
Christoph Heuel
Cody (Quantified Code Bot)
csoft2k

View File

@ -62,7 +62,7 @@ The basic usage is:
p = Usb(0x04b8, 0x0202, 0, profile="TM-T88III")
p.text("Hello World\n")
p.image("logo.gif")
p.barcode('1324354657687', 'EAN13', 64, 2, '', '')
p.barcode('4006381333931', 'EAN13', 64, 2, '', '')
p.cut()
@ -74,7 +74,7 @@ Another example based on the Network printer class:
kitchen = Network("192.168.1.100") #Printer IP Address
kitchen.text("Hello World\n")
kitchen.barcode('1324354657687', 'EAN13', 64, 2, '', '')
kitchen.barcode('4006381333931', 'EAN13', 64, 2, '', '')
kitchen.cut()

View File

@ -119,7 +119,7 @@ on a USB interface.
# Print QR Code
p.qr("You can readme from your smartphone")
# Print barcode
p.barcode('1324354657687','EAN13',64,2,'','')
p.barcode('4006381333931','EAN13',64,2,'','')
# Cut paper
p.cut()

View File

@ -53,7 +53,7 @@ DEMO_FUNCTIONS = {
'barcodes_a': [
{'bc': 'UPC-A', 'code': '13243546576'},
{'bc': 'UPC-E', 'code': '132435'},
{'bc': 'EAN13', 'code': '1324354657687'},
{'bc': 'EAN13', 'code': '4006381333931'},
{'bc': 'EAN8', 'code': '1324354'},
{'bc': 'CODE39', 'code': 'TEST'},
{'bc': 'ITF', 'code': '55867492279103'},
@ -62,13 +62,13 @@ DEMO_FUNCTIONS = {
'barcodes_b': [
{'bc': 'UPC-A', 'code': '13243546576', 'function_type': 'B'},
{'bc': 'UPC-E', 'code': '132435', 'function_type': 'B'},
{'bc': 'EAN13', 'code': '1324354657687', 'function_type': 'B'},
{'bc': 'EAN13', 'code': '4006381333931', 'function_type': 'B'},
{'bc': 'EAN8', 'code': '1324354', 'function_type': 'B'},
{'bc': 'CODE39', 'code': 'TEST', 'function_type': 'B'},
{'bc': 'ITF', 'code': '55867492279103', 'function_type': 'B'},
{'bc': 'NW7', 'code': 'A00000000A', 'function_type': 'B'},
{'bc': 'CODE93', 'code': 'A00000000A', 'function_type': 'B'},
{'bc': 'CODE93', 'code': '1324354657687', 'function_type': 'B'},
{'bc': 'CODE93', 'code': '4006381333931', 'function_type': 'B'},
{'bc': 'CODE128A', 'code': 'TEST', 'function_type': 'B'},
{'bc': 'CODE128B', 'code': 'TEST', 'function_type': 'B'},
{'bc': 'CODE128C', 'code': 'TEST', 'function_type': 'B'},