Commit Graph

28 Commits

Author SHA1 Message Date
Patrick Kanzler 09a598883c
351 ean example fix (#537)
* 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>
2023-07-28 18:23:18 +02:00
Alfredo orozco df9e8ff394
Feature(escpos) Add buzzer function (#535)
* Add buzzer function
* Add `buzzer(time, duration)` function to control the buzzer on supported
   printers.
* Add unit tests for buzzer function.
* Update test_function_buzzer.py to pass black
* Run black in tests files
---------

Co-authored-by: Patrick Kanzler <dev@pkanzler.de>
2023-07-27 19:10:19 +02:00
Mathieu Poussin 7bf8d4e4b8
Add support for slip/cheque dot matrix printers (#485)
* Add support for slip/cheque dot matrix printers

* format

* fix comments

---------

Co-authored-by: Patrick Kanzler <4189642+patkan@users.noreply.github.com>
Co-authored-by: Patrick Kanzler <dev@pkanzler.de>
2023-05-09 01:25:48 +02:00
白月秋见心 6849dd3979
Add Chinese support (#356)
* Add Chinese support

* Add author

* Add newline

* Revert "Add Chinese support"

This reverts commit 110200dde6.

* Add Chinese support

* Add Chinese support

* update mailmap file

* update formatting

---------

Co-authored-by: Patrick Kanzler <dev@pkanzler.de>
Co-authored-by: Patrick Kanzler <4189642+patkan@users.noreply.github.com>
2023-05-09 01:18:00 +02:00
Patrick Kanzler ddab5318cf
Merge pull request #380 from mofosyne/development
Add to readme Serial usage example
2020-05-08 23:21:59 +02:00
Patrick Kanzler 34cd1ebde1 readd authors 2020-05-08 23:19:47 +02:00
Patrick Kanzler a2db415559 remove authors 2020-05-08 23:19:31 +02:00
Patrick Kanzler 4e19b0ca51
Merge branch 'development' into feature/image-center-doc 2020-05-08 23:15:35 +02:00
Patrick Kanzler a3660a6366 fix authors file 2020-05-08 23:14:05 +02:00
Patrick Kanzler ae0a049efa fix authors file 2020-05-08 22:43:47 +02:00
Maximilian Wagenbach f49c1dcb89 Updating AUTHORS. 2020-03-11 15:56:51 +01:00
Yaisel Hurtado 50437cc9d2 Generating AUTHORS 2019-06-28 10:10:45 -04:00
Patrick Kanzler a7d959428f update authors 2019-06-15 22:50:50 +02:00
Patrick Kanzler de761e96e3
Merge branch 'development' into development 2019-06-07 09:53:14 +02:00
Patrick Kanzler f1054876da update authors 2019-06-04 23:55:33 +02:00
Patrick Kanzler b4c32b5a4a
Merge branch 'development' into development 2019-06-04 23:04:25 +02:00
Patrick Kanzler 40b30225d3
Merge pull request #330 from om26er/windows-support
Enable Windows Support
2019-06-04 23:04:09 +02:00
Justin Vieira 91ff83e506 Update to use pyyaml safe_load(), as load() is unsafe and disabled on some systems 2019-05-29 16:43:19 -04:00
Omer Akram 035c425581 Add author 2019-05-22 17:09:27 +05:00
Ramon Poca d5b9d99093 Update AUTHORS 2018-12-31 10:43:31 +01:00
Gerard Marull-Paretas 52719c0b7d Allow arbitrary USB args 2018-11-21 22:01:13 +01:00
Patrick Kanzler 599f4f3ca5
add new authors 2018-05-13 18:44:47 +02:00
reck 3c3dab95f5 raise exception when TypeError occurs in cashdraw (#268) 2017-12-03 23:21:29 +01: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
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
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
csoft2k 89dfb6cf86 Added the DLE EOT querying command. (#237)
* 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
2017-07-24 13:57:02 +02:00
Romain Porte 3f9d44ff15 Added authors file and generate_authors.sh (#227)
* 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
2017-05-26 00:27:17 +02:00