Commit Graph

95 Commits

Author SHA1 Message Date
dependabot[bot] 6c49e4a057
Bump sphinx-rtd-theme from 1.2.2 to 1.3.0 (#550) 2023-08-24 21:30:22 +00:00
Patrick Kanzler c11d192e65
Fix import issues with qrcode in sphinx 7.2 (#552)
* 7.2 introduces the issue

* mock module qrcode for documentation build

This prevents issues with sphinx 7.2
2023-08-24 23:02:33 +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 fbabd8ed88
Drop Py37, improve typing and docstrings (#544)
Drops Py3.7, improves typing and adds a mypy config, improves the docstrings and isorts the imports.

* configure isort
* sort with isort
* add github action
* enable flake8-docstrings
* fix docstrings
* add mypy env
* no implicit optional
* add type for raw
* add some type hints
2023-08-15 01:03:36 +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
Patrick Kanzler 31daabcbea
Improve documentation build (#539)
* use imgconverter
* enable pdf build with xelatex
* change heading levels
* restructure headings
* add chapter intro
* remove extensions from index
2023-08-09 00:52:01 +02:00
Patrick Kanzler 60c4f481ae
Add printer profile list to documentation (#536)
* add first draft of printer profile listing

* add todos

* Update doc/capability_templates/capabilities-template.jinja

* Update doc/capability_templates/capabilities-template.jinja

* restructure documentation

* add encoding list

* add color and encoding table

* add notes on usage

* add feature table
2023-07-29 02:02:13 +02:00
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
Patrick Kanzler e9e8b10582
Fixes from ci (#533)
* break line

* remove unused imports

* remove unused os import

* make flake8 more strict

* configure flake for black

* fix action

* use importlib_resources

* rename deprecated methods
2023-07-21 23:03:46 +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
dependabot[bot] 676d2840de
Bump sphinx-rtd-theme from 1.2.1 to 1.2.2 (#528)
Bumps [sphinx-rtd-theme](https://github.com/readthedocs/sphinx_rtd_theme) from 1.2.1 to 1.2.2.
- [Changelog](https://github.com/readthedocs/sphinx_rtd_theme/blob/master/docs/changelog.rst)
- [Commits](https://github.com/readthedocs/sphinx_rtd_theme/compare/1.2.1...1.2.2)

---
updated-dependencies:
- dependency-name: sphinx-rtd-theme
  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>
2023-06-09 01:24:17 +02:00
dependabot[bot] c67c077a4d
Bump sphinx-rtd-theme from 1.2.0 to 1.2.1 (#524)
Bumps [sphinx-rtd-theme](https://github.com/readthedocs/sphinx_rtd_theme) from 1.2.0 to 1.2.1.
- [Changelog](https://github.com/readthedocs/sphinx_rtd_theme/blob/master/docs/changelog.rst)
- [Commits](https://github.com/readthedocs/sphinx_rtd_theme/compare/1.2.0...1.2.1)

---
updated-dependencies:
- dependency-name: sphinx-rtd-theme
  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>
2023-05-23 15:22:50 +02:00
Patrick Kanzler 905e37e52e
update read the docs config (#520)
* update read the docs config

* add hints on black code style

* add link to black

* fix path to requirements

* include submodules in build

* add submodule capabilities-data

* format as list

* post on execution on RTD

* use sphinx rtd theme 1.2.0

* add apt dependencies
2023-05-18 16:33:20 +02:00
Patrick Kanzler 3560f8b12b
housekeeping: fix-build for doc (#515)
* disable git checkout head²

* update pull request template

* add importlib metadata to requirements for doc build

* update capabilities data
2023-05-11 23:12:46 +02:00
Patrick Kanzler 98ee06a783 preliminarily deactivate cups printer documentation 2023-04-19 22:42:55 +02:00
belono ea61f287cb Add/Improve documentation of the new connectors 2022-12-11 16:29:33 +01:00
belono 69e9dca761 Fix black linter checks - Remove u"" strings 2022-11-24 20:23:21 +01:00
Patrick Kanzler 5bb0642b5d
housekeeping tasks (#464)
* update settings to use black

* update python versions

* enquote version numbers

* update dependency

* set explicit build command

* add newline

* add command to checkout

* add run step

* chain

* sudo

* test

* newer sphinx version

* update sphinx

* clean up setuptools usage

* use tox

* install tox

* tox
2021-10-30 22:21:34 +02:00
Patrick Kanzler 435f2bba24 reformat codebase 2021-10-30 18:15:22 +02:00
Patrick Kanzler a2e348d04a fix typos 2020-10-04 14:30:03 +02:00
Patrick Kanzler 40c8399a68 update documentation on STAR TSP100
fixes #410 and #403
2020-10-04 14:28:09 +02:00
Patrick Kanzler 2d798ca7e5 add hint on proper script names
fixes #404
2020-09-28 19:51:49 +02:00
Maximilian Wagenbach c57b9c35dc Use https links. 2020-05-31 16:21:42 +02:00
Patrick Kanzler e3cf088d69 improve output of authors script 2020-05-26 21:29:16 +02:00
Patrick Kanzler 323db98318 make gen authors more robust 2020-05-26 20:43:24 +02:00
Patrick Kanzler ff39908674
Merge branch 'master' into 390-add-spellcheck-to-sphinx 2020-05-11 23:45:34 +02:00
Patrick Kanzler f4e214ad17 add spellchecker with first conf, fix some errors 2020-05-11 23:39:56 +02:00
Patrick Kanzler 9e406efc86 add sphinxcontrib-spelling 2020-05-11 23:22:40 +02:00
Patrick Kanzler b9e3827867 use pkg_resources
This change uses if no path for e capabilities-file is supplied a
temporary file created by pkg_resources, which should be more robust
than directly accessing the file. (This failed sometimes, for example
in zipped distributions or uncommon structures)
2020-05-11 22:54:22 +02:00
Romain Porte b0ea9aec41 barcodes: replace viivakoodi with python-barcode
python-barcode is yet another clone of the PyPI barcode library, but
which is still developped compared to viivakoodi.

Signed-off-by: Romain Porte <microjoe@microjoe.org>
2020-05-10 13:36:16 +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
Alexander Bougakov e350a49cad
Clarify the positions of vendor_id and product_id
An existing example uses same value, `0x1a2b`  in both `Vendor id` and `Product id` fields, which can confuse a new user.
2020-03-22 13:36:49 +03:00
Patrick Kanzler fa140c2df5 cleanup todo page 2019-06-19 15:50:19 +02:00
Patrick Kanzler 29a546821b doc add example for Serial on Windows
fixes #322
2019-06-10 22:05:26 +02:00
Patrick Kanzler 1439b14686
tell sort to ignore case 2017-08-31 13:43:07 +02:00
Patrick Kanzler c259263f26 blacklist pytest 3.2.0 because it breaks our tests
see pytest-dev/pytest#2644 for reference
2017-08-04 15:17:05 +02:00
Patrick Kanzler c3e952befa
cat authorsfiles during check 2017-06-19 11:15:04 +00:00
Patrick Kanzler 4882c31531 Clarifiy and update usage.rst
relevant to #230
clarifies the config-file  in the usage.rst
2017-06-10 23:35:26 +00:00
Patrick Kanzler 7c17141fb2
integrate author check into travis 2017-05-26 02:36:16 +02:00
Patrick Kanzler 0f33d68f3a
add doc for ESCPOS_CAPABILITIES_FILE 2017-03-27 15:30:14 +02:00
Patrick Kanzler d3f76a5f6d
doc update modules in autogeneration 2017-01-29 22:33:15 +01:00
Patrick Kanzler e595bc2150
doc update methods and printers and use autodoc 2017-01-26 00:28:33 +01:00
Patrick Kanzler a15d02b50c change dependency to docutils to newer version of sphinx
This is a revert to f8b7238801
2017-01-06 18:05:59 +01:00
Asuki Kono 938f9890ab Update doc about installation for raspi (#194)
* 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
2017-01-05 21:51:07 +01:00
Patrick Kanzler 1e5a41ba4e Merge pull request #193 from python-escpos/fix-docutils-problem
downgrade docutils
2016-12-09 21:33:32 +01:00
Patrick Kanzler f8b7238801
downgrade docutils
version 0.13 of docutils seems to have problems. See
sphinx-doc/sphinx#3212
2016-12-09 21:24:57 +01:00
Thijs Triemstra 24731f433e fix typos 2016-12-09 16:56:23 +01:00
Thijs Triemstra 6158ba344f fix typos 2016-12-09 16:42:23 +01:00
Patrick Kanzler bd57c01794
update doc-page on Raspi 2016-12-07 20:31:49 +01:00
ysuolmai da0d49c787 Update raspi.rst 2016-11-25 21:44:47 +11:00