Commit Graph

870 Commits

Author SHA1 Message Date
Patrick Kanzler a831fd3cfa
Update examples/receipt.py
Change import sorting

Co-authored-by: Benito López <belono@users.noreply.github.com>
2024-08-24 23:25:43 +02:00
Assaf Gordon 5f91b480f5 Examples: add fake receipt demo 2024-08-05 02:02:11 -06:00
Assaf Gordon f51af2765b Examples: add block_text usage demo 2024-08-05 02:02:11 -06:00
Assaf Gordon f63b0a77ce Examples: add font-variations demo 2024-08-05 02:02:11 -06:00
Benito López 99501cc2c1
New feature: Software columns - Part 2: CLI (#649)
* Add software_columns CLI parameter

* Fix sorting

---------

Co-authored-by: Patrick Kanzler <4189642+patkan@users.noreply.github.com>
2024-07-19 22:23:52 +02:00
Psychpsyo 3aaf203ceb
Fix typo in README (#650) 2024-07-19 22:18:09 +02:00
Benito López a8753a1121
New feature: Software columns (#645)
* add type hint Alignment

* Add static method padding()

* Add static method truncate()

* Add static method _repeat_last()

* Add private method _rearrange_into_cols()

* Add private method _add_padding_into_cols()

* Add public method software_columns

* Make truncate and padding private staticmethods

* Revert "add type hint Alignment"

This reverts commit 546391cb9c.

* Add type hint Alignment

* Fix typo in docstring

---------

Co-authored-by: Patrick Kanzler <4189642+patkan@users.noreply.github.com>
2024-07-11 17:13:34 +02:00
dependabot[bot] 5af01641d9
Bump actions/setup-python from 5.1.0 to 5.1.1 (#648)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5.1.0 to 5.1.1.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v5.1.0...v5.1.1)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-11 16:41:42 +02:00
Benito López fe3cdde424
Clarify set() width and height documentation (#644) 2024-05-24 23:21:54 +02:00
dependabot[bot] 4c02881fe7
Bump jinja2 from 3.1.3 to 3.1.4 in /examples/docker-flask (#642)
Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.3 to 3.1.4.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/3.1.3...3.1.4)

---
updated-dependencies:
- dependency-name: jinja2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-06 22:54:24 +02:00
dependabot[bot] 82f5a00b8d
Bump werkzeug from 3.0.1 to 3.0.3 in /examples/docker-flask (#641)
Bumps [werkzeug](https://github.com/pallets/werkzeug) from 3.0.1 to 3.0.3.
- [Release notes](https://github.com/pallets/werkzeug/releases)
- [Changelog](https://github.com/pallets/werkzeug/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/werkzeug/compare/3.0.1...3.0.3)

---
updated-dependencies:
- dependency-name: werkzeug
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-06 21:40:03 +02:00
Benito López 1e9adb80f3
Fix CLI not working for some connectors Fixes #639 (#640) 2024-04-29 23:50:52 +02:00
dependabot[bot] 640f6089ac
Bump pillow from 10.2.0 to 10.3.0 in /examples/docker-flask (#634)
Bumps [pillow](https://github.com/python-pillow/Pillow) from 10.2.0 to 10.3.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/10.2.0...10.3.0)

---
updated-dependencies:
- dependency-name: pillow
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-03 21:04:35 +02:00
dependabot[bot] a8a9d0f0ad
Bump codecov/codecov-action from 3 to 4 (#625)
* Bump codecov/codecov-action from 3 to 4

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* add codecov token

* add codecov token

* remove directory config

* adapt excludes

* exclude mypy_cache

* glob

* exclude

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Patrick Kanzler <4189642+patkan@users.noreply.github.com>
Co-authored-by: Patrick Kanzler <dev@pkanzler.de>
2024-04-02 01:23:56 +02:00
dependabot[bot] f781e28a69
Bump actions/setup-python from 5.0.0 to 5.1.0 (#632)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5.0.0 to 5.1.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v5.0.0...v5.1.0)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-02 00:03:22 +02:00
dependabot[bot] 62c234f6f1
Bump pillow from 10.0.1 to 10.2.0 in /examples/docker-flask (#623)
Bumps [pillow](https://github.com/python-pillow/Pillow) from 10.0.1 to 10.2.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/10.0.1...10.2.0)

---
updated-dependencies:
- dependency-name: pillow
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-22 23:25:38 +01:00
dependabot[bot] 4ba98c0017
Bump jinja2 from 3.1.2 to 3.1.3 in /examples/docker-flask (#620)
Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.2 to 3.1.3.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/3.1.2...3.1.3)

---
updated-dependencies:
- dependency-name: jinja2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-12 12:24:41 +01:00
Wesley Appler a865b715f3
Fixed lack of spacing for multi-line strings (#619)
Co-authored-by: Wes Appler <wes@lamemakes>
2024-01-11 12:35:03 +01:00
dependabot[bot] 776b8a26ad
Bump capabilities-data from `4006299` to `375135d` (#616)
Bumps [capabilities-data](https://github.com/receipt-print-hq/escpos-printer-db) from `4006299` to `375135d`.
- [Commits](4006299c0f...375135d552)

---
updated-dependencies:
- dependency-name: capabilities-data
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-18 12:37:20 +01:00
Patrick Kanzler 9b0d126da2
prepare for new development (#615) 2023-12-17 23:10:44 +01:00
Patrick Kanzler 0d22896689
Prepare release 3.1 (#614)
* update authors
* update changelog
* update spelling
* update black
2023-12-17 22:53:19 +01:00
Patrick Kanzler b66dafc90e
improve type annotations in tests (#613) 2023-12-17 01:15:59 +01:00
Patrick Kanzler 0c824cf295
More mypy (#612)
* remove type comment where type is annotated
* move function tests
* remove six from tests
* add none annotations
* add more types
* change mock (so that mypy understands it)
2023-12-16 23:09:20 +01:00
Alexandre Detiste 66a2e78e16
start removal of six and improve type annotation (#607)
* fix unfinished Python2 -> 3 translation
* remove some six usage
* annotate
* fix regression in Six removal
* mypy: self.enf is always defined
* fix return type of cups.py
* Usb idVendor/idProduct are integers
* self.default_args is always defined
* tweak usb_args, PEP589 is better
* lp.py: reassure mypy
* correctly cast call to CashDrawerError()
* update CUPS test
* add missing close() method in metaclass
* document a bug in typeshed
* query_status() returns bytes as seen in constants.py
* remove more SIX usage
* test examples too
* remove type comment where type is annotated
* adapt behavior of cups printer to match other implementations

---------

Co-authored-by: Patrick Kanzler <dev@pkanzler.de>
Co-authored-by: Patrick Kanzler <4189642+patkan@users.noreply.github.com>
2023-12-16 22:02:24 +01:00
dependabot[bot] 06bdb56937
Bump github/codeql-action from 2 to 3 (#610)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2 to 3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-15 11:53:52 +01:00
Patrick Kanzler 91cbc264fc
Refactor to using f-strings (#608)
* update authors

* refactor to using f-strings
2023-12-11 00:34:29 +01:00
tuxmaster dcc71ce47d
argparse is an part of the python core (#606) 2023-12-09 21:26:19 +01:00
dependabot[bot] d2b213dcdc
Bump actions/setup-python from 4.8.0 to 5.0.0 (#605)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4.8.0 to 5.0.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v4.8.0...v5.0.0)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-07 23:52:37 +01:00
dependabot[bot] c91eec544e
Bump actions/setup-python from 4.7.1 to 4.8.0 (#604)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4.7.1 to 4.8.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v4.7.1...v4.8.0)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-06 00:45:25 +01:00
Patrick Kanzler a9e49c909d
Update CHANGELOG.rst (#603) 2023-12-06 00:31:12 +01:00
Patrick Kanzler 815f247df1
Improve test coverage and fix issue in path loading (#602)
* reactivate skipped tests

* remove unused internal interfaces

* enable pytest in VS Code

* simplify and fix path logic in loader

* increase test coverage

* test missing config

* check for wrong printer names

* Skipped appdir test
2023-12-06 00:25:36 +01:00
Patrick Kanzler 5914c7c560
allow qr to set all arguments to image (#600)
* allow qr to set all arguments to image

* increase coverage
2023-12-04 01:15:19 +01:00
Patrick Kanzler 86a715cf02
update capabilities data (#601) 2023-12-04 01:11:05 +01:00
Patrick Kanzler ac23c083b6
update to newest python-barcode (#595)
* update to newest python-barcode
2023-12-03 23:57:34 +01:00
Patrick Kanzler 9a1699ab94
add type annotations for escpos image handler (#599) 2023-12-03 23:36:35 +01:00
dependabot[bot] 8274833255
Bump sphinx-rtd-theme from 1.3.0 to 2.0.0 (#596)
Bumps [sphinx-rtd-theme](https://github.com/readthedocs/sphinx_rtd_theme) from 1.3.0 to 2.0.0.
- [Changelog](https://github.com/readthedocs/sphinx_rtd_theme/blob/master/docs/changelog.rst)
- [Commits](https://github.com/readthedocs/sphinx_rtd_theme/compare/1.3.0...2.0.0)

---
updated-dependencies:
- dependency-name: sphinx-rtd-theme
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-30 08:38:40 +01:00
Patrick Kanzler 33d17615a0
prepare next release development cycle (#594) 2023-11-17 01:12:31 +01:00
Patrick Kanzler 90c89e66f0 filter for ValueError too in dpi logic 2023-11-17 00:48:31 +01:00
Patrick Kanzler 8f44ae7480 update changelog 2023-11-17 00:48:31 +01:00
Patrick Kanzler ff5631c989 update authors 2023-11-17 00:48:31 +01:00
Patrick Kanzler ecf3fbcc25 update capabilities data 2023-11-17 00:48:31 +01:00
Patrick Kanzler 678f8d2451
Merge pull request #579 from python-escpos:update-changelog
update changelog for new v3 release
2023-11-16 23:39:30 +01:00
Patrick Kanzler a127c7b9c4
Merge branch 'master' into update-changelog 2023-11-16 23:32:22 +01:00
Patrick Kanzler 72d26879a0
Apply suggestions from code review 2023-11-01 19:37:38 +01:00
Benito López 3b6551004f
Restore types-pywin32 (#591)
* Restore types-pywin32 dependency

* Restore pywin32 type annotations in win32raw

* Add return type to _raw()
2023-10-31 13:55:48 +01:00
Patrick Kanzler 5d3d2ca34b
import TypedDict from typing, not from extensions (#589)
TypedDict is in the supported python versions
available in typing. Therefore an import from
potentially uninstalled typing_extensions is
not necessary.

fixes #560
2023-10-28 21:11:38 +02:00
Patrick Kanzler d2ef5159c5
Merge branch 'master' into update-changelog 2023-10-28 20:53:21 +02:00
Benito López a50a3b7167
Separate method open() and constructor, enhance consistency between connectors: Rework printer tests (#587)
* Add fixtures
* Add test_printer_file.py
* Remove old broken printer tests
* Include a close_on_reopen test
* Add test_printer_network.py
* Add test_printer_serial.py
* Add test_printer_usb.py
* Add test_printer_lp.py
* Add test_printer_cups.py
* Add test_printer_win32raw.py
* Test the 'printers' property
* Fix conftest import formatting
* Fix failing LP tests
* Cancel close only if literal False|None _device
* Fix win32raw failing tests (maybe)
* Include win32raw close_on_reopen test
* Include test _raw methods to win32raw
* Replace general exceptions in win32raw
* Replace wrong exception in cups
* Include more tests to cups
* Extend cups tests
2023-10-28 20:52:59 +02:00
dependabot[bot] e7dd97554c
Bump werkzeug from 2.3.4 to 3.0.1 in /examples/docker-flask (#588)
Bumps [werkzeug](https://github.com/pallets/werkzeug) from 2.3.4 to 3.0.1.
- [Release notes](https://github.com/pallets/werkzeug/releases)
- [Changelog](https://github.com/pallets/werkzeug/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/werkzeug/compare/2.3.4...3.0.1)

---
updated-dependencies:
- dependency-name: werkzeug
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-26 18:55:56 +02:00
Benito López 425d3d209f
Update capabilities data (#586) 2023-10-18 13:20:08 +02:00