Commit Graph

34 Commits

Author SHA1 Message Date
Patrick Kanzler 3a8af8a6f5
switch to python 3.12 (#582)
* switch to python 3.12
* 3.11 on RTD
* fix SyntaxWarning (regex strings were invalid partially)
2023-10-09 00:13:39 +02:00
Patrick Kanzler cfa9ecf16d
Enable spell checking (#563)
* add spellchecking

* improve spelling

* improve spelling config

* extend word list

* improve spelling

* improve spelling

* escalate warning in spell check to failure

* fix spelling

* fix spelling

* add plural

* Update doc/spelling_wordlist.txt

* do not stop on warning

* require newest sphinxcontrib spelling

* remove old comment

* add authors as single line entry to spelling list

* reenable stop on warning
2023-09-07 22:08:31 +02:00
Patrick Kanzler 44444f3c51
Maintenance: fix read the docs and some annotations (#557) 2023-09-03 09:57:56 +02:00
Patrick Kanzler 3177c8d411
split off dependencies for optional installation (#546)
* 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
2023-08-17 01:37:50 +02:00
Patrick Kanzler 2b62c8e28d
modernize and cleanup documentation (#542)
* disable system packages on rtd

* install pycups on rtd

* enable cups binding in documentation

* document CupsPrinter

* fix formatting

* revise methods and installation

* revise user/printers

* revise raspi section

* further revise
2023-08-10 01:38:47 +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
Benito López 3c11c1b9ab
New high level barcode method. Closes #245, #244. (#527)
* 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>
2023-07-12 20:45:41 +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
Patrick Kanzler 435f2bba24 reformat codebase 2021-10-30 18:15:22 +02:00
Patrick Kanzler 596787554b add disclaimer to beep sound
fixes #365
2020-09-28 20:44:22 +02:00
Maximilian Wagenbach c57b9c35dc Use https links. 2020-05-31 16:21:42 +02:00
Romain Porte cb30d7a881 drop Python 2.7 support
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>
2020-05-10 10:55:44 +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
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
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
TAHRI Ahmed 1f427953a8 Preliminary support of pos 'line display' printing 2017-05-22 00:40:40 +02:00
Romain Porte a16d6bde06 Refactor of the set method, with tests 2017-05-21 22:50:07 +02:00
Patrick Kanzler 3ee787e8b1
change license to MIT 2017-01-31 03:55:50 +01:00
Patrick Kanzler cd38cdf74e Merge pull request #170 from miracle2k/text-encoding
Text encoding
2016-09-29 19:23:54 +02:00
belono a82fefb301 Add support for custom cash drawer kick sequence 2016-09-15 22:54:35 +02:00
Michael Elsdörfer 2f89f3fe3a Port to current version of escpos-printer-db. 2016-08-30 17:08:27 +02:00
Michael Elsdörfer b37f4fc8cc Merge branch 'capabilities' into text-encoding 2016-08-30 13:36:53 +02:00
Michael Elsdörfer ea7769f8b2 Merge remote-tracking branch 'origin/development' into capabilities 2016-08-30 13:04:17 +02:00
Michael Elsdörfer a07f84a5bc Match the current printer-db format. 2016-08-30 12:26:09 +02:00
Michael Elsdörfer c7864fd785 Largely rewrite the magic text encoding feature. 2016-08-27 11:28:52 +02:00
Michael Elsdörfer f6ce7e45da Merge branch 'capabilities' into text-encoding 2016-08-26 15:29:31 +02:00
Patrick Kanzler cf41069829 Merge branch 'linespacing' of git://github.com/miracle2k/python-escpos into miracle2k-linespacing
Conflicts:
	src/escpos/constants.py
2016-08-26 14:16:06 +02:00
Michael Elsdörfer 07d47765aa Allow linespacing reset. Make this the default. 2016-08-26 10:38:36 +02:00
Michael Elsdörfer 854b75be30 Support changing the line spacing. 2016-08-26 10:34:52 +02:00
Michael Elsdörfer df0c874f6e Add constants for sheet mode, colors. 2016-08-26 10:30:29 +02:00
Patrick Kanzler 38f9835931
fix printing of CODE128
The control sequence {A or {B or {C can't be part of the qr code.
For this the user has to supply this sequence.
2016-08-02 15:39:31 +02:00
Patrick Kanzler 87a6647053 fix force-encoding REBASE (contains todos)
* fixed the code of forced-encoding in order to make it work
* extended unittest for forced-encoding
* fixed the constant for Katakana-encoding
2016-08-02 04:42:21 +02:00
Patrick Kanzler b0af9e9652 improve restructure charcode-table
restructured the charcode table in order to be more accessible to
programmatic usage
2016-08-02 04:42:21 +02:00
Patrick Kanzler 87438f9efa
SETUP move code to src
This way we can ensure that the packaged code is tested.
See https://hynek.me/articles/testing-packaging/ or c62a78c015

+ DOC adapt doc to new structure and test doc with travis
2016-06-20 17:48:14 +02:00