From b0ac39a7c6f029ea54c1bd8b97b8c20116ff0fcd Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Wed, 24 Aug 2022 22:44:26 +0200 Subject: [PATCH 1/5] Delete python-publish.yml --- .github/workflows/python-publish.yml | 32 ---------------------------- 1 file changed, 32 deletions(-) delete mode 100644 .github/workflows/python-publish.yml diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml deleted file mode 100644 index ff39cd6..0000000 --- a/.github/workflows/python-publish.yml +++ /dev/null @@ -1,32 +0,0 @@ - -name: Upload Python Package - -on: - release: - types: [published] - -permissions: - contents: read - -jobs: - deploy: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v3 - with: - python-version: '3.8' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install build - - name: Build package - run: python -m build - - name: Publish package - uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 - with: - user: __token__ - password: ${{ secrets.PYPI_API_TOKEN }} From 8c70e522bbb0f59351dac2a0657c951b9beb4d5d Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Wed, 24 Aug 2022 22:46:26 +0200 Subject: [PATCH 2/5] restore old readme --- README.md => OLD_README.md | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) rename README.md => OLD_README.md (97%) diff --git a/README.md b/OLD_README.md similarity index 97% rename from README.md rename to OLD_README.md index 726e9f3..d983386 100644 --- a/README.md +++ b/OLD_README.md @@ -1,11 +1,4 @@ -## brother\_ql-inventree - -## FORK NOTICE - -This is a fork of https://github.com/pklaus/brother_ql to enable updates of the somewhat unmaintained upstream project. -Check out https://github.com/inventree/inventree to see what it is used for. - -## README +## brother\_ql A Python package to control Brother QL label printers. It implements the raster language of those printers and allows you to send instruction files to your printer. From e178a8d7ece6f0eb90c2baae3b058e6fa30458cd Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Wed, 24 Aug 2022 22:59:32 +0200 Subject: [PATCH 3/5] add new readme --- README.md | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..537f544 --- /dev/null +++ b/README.md @@ -0,0 +1,64 @@ +# brother_ql-inventree + +Python package for the raster language protocol of the Brother QL series label printers + + +## FORK NOTICE + +This is a fork of https://github.com/pklaus/brother_ql by [Philipp Klaus](https://github.com/pklaus) to enable updates to the sparsely unmaintained upstream project. +Check out https://github.com/inventree/inventree to see what I forked it for. + +## Verified models +### Verified devices + +✓ means the device was verified by the original project + +QL-500 (✓), QL-550 (✓), QL-560 (✓), QL-570 (✓), QL-580N +QL-650TD +QL-700 (✓), QL-710W (✓), QL-720NW (✓) +QL-800 (✓), QL-810W (✓), QL-820NWB (✓) +QL-1050 (✓), QL-1060N (✓) + +### Verified labels + +The available label names can be listed with `brother_ql info labels`: + + Name Printable px Description + 12 106 12mm endless + 29 306 29mm endless + 38 413 38mm endless + 50 554 50mm endless + 54 590 54mm endless + 62 696 62mm endless + 102 1164 102mm endless + 17x54 165 x 566 17mm x 54mm die-cut + 17x87 165 x 956 17mm x 87mm die-cut + 23x23 202 x 202 23mm x 23mm die-cut + 29x42 306 x 425 29mm x 42mm die-cut + 29x90 306 x 991 29mm x 90mm die-cut + 39x90 413 x 991 38mm x 90mm die-cut + 39x48 425 x 495 39mm x 48mm die-cut + 52x29 578 x 271 52mm x 29mm die-cut + 62x29 696 x 271 62mm x 29mm die-cut + 62x100 696 x 1109 62mm x 100mm die-cut + 102x51 1164 x 526 102mm x 51mm die-cut + 102x152 1164 x 1660 102mm x 153mm die-cut + d12 94 x 94 12mm round die-cut + d24 236 x 236 24mm round die-cut + d58 618 x 618 58mm round die-cut + +### Backends + +There are multiple backends for connecting to the printer available (✔: supported, ✘: not supported): + +Backend | Kind | Linux | Mac OS | Windows +-------|-------|---------|---------|-------- +network (1) | TCP | ✔ | ✔ | ✔ +linux\_kernel | USB | ✔ (2) | ✘ | ✘ +pyusb (3) | USB | ✔ (3.1) | ✔ (3.2) | ✔ (3.3) + +## Significant Changes: +- Renamed the package to `brother_ql-inventree` +- Added a release action + +Read the full old Readme [here](https://github.com/matmair/brother_ql-inventree/blob/cleanup/OLD_README.md). From 86a8165765840f54dec13d85ef201e8647ad462a Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Wed, 24 Aug 2022 23:31:56 +0200 Subject: [PATCH 4/5] switch to toml --- pyproject.toml | 54 ++++++++++++++++++++++++++++++++++++++++++ setup.py | 64 -------------------------------------------------- 2 files changed, 54 insertions(+), 64 deletions(-) create mode 100644 pyproject.toml delete mode 100644 setup.py diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..5157d08 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,54 @@ +[project] +name = "brother_ql-inventree" +version = "1.0a0" +description = "Python package to talk to Brother QL label printers" +readme = "README.md" +authors = [ + { name = "Philipp Klaus", email = "philipp.l.klaus@web.de" } +] +license = {text = "GPL"} +dependencies = [ + "click", + "future", + "packbits", + "pillow>=3.3.0", + "pyusb", + "attrs", + "typing;python_version<'3.5'", + "enum34;python_version<'3.4'", +] +keywords = [ + "Brother", + "QL-500", + "QL-550", + "QL-560", + "QL-570", + "QL-700", + "QL-710W", + "QL-720NW", + "QL-800", + "QL-810W", + "QL-820NWB", + "QL-1050", + "QL-1060N" +] +classifiers = [ + "Development Status :: 4 - Beta", + "Operating System :: OS Independent", + "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Topic :: Scientific/Engineering :: Visualization", + "Topic :: System :: Hardware :: Hardware Drivers", +] + +[project.scripts] +brother_ql = "brother_ql.cli:cli" +brother_ql_analyse = "brother_ql.brother_ql_analyse:main" +brother_ql_create = "brother_ql.brother_ql_create:main" +brother_ql_print = "brother_ql.brother_ql_print:main" +brother_ql_debug = "brother_ql.brother_ql_debug:main" +brother_ql_info = "brother_ql.brother_ql_info:main" + +[project.urls] +repository = "https://github.com/pklaus/brother_ql-inventree" diff --git a/setup.py b/setup.py deleted file mode 100644 index d5ae4a5..0000000 --- a/setup.py +++ /dev/null @@ -1,64 +0,0 @@ -# -*- coding: utf-8 -*- - -try: - from setuptools import setup -except ImportError: - from distutils.core import setup - -try: - import pypandoc - LDESC = open('README.md', 'r').read() - LDESC = pypandoc.convert(LDESC, 'rst', format='md') -except (ImportError, IOError, RuntimeError) as e: - print("Could not create long description:") - print(str(e)) - LDESC = '' - -setup(name='brother_ql-inventree', - version = '1.0a0', - description = 'Python package to talk to Brother QL label printers', - long_description = LDESC, - author = 'Philipp Klaus', - author_email = 'philipp.l.klaus@web.de', - url = 'https://github.com/pklaus/brother_ql-inventree', - license = 'GPL', - packages = ['brother_ql', - 'brother_ql.backends'], - entry_points = { - 'console_scripts': [ - 'brother_ql = brother_ql.cli:cli', - 'brother_ql_analyse = brother_ql.brother_ql_analyse:main', - 'brother_ql_create = brother_ql.brother_ql_create:main', - 'brother_ql_print = brother_ql.brother_ql_print:main', - 'brother_ql_debug = brother_ql.brother_ql_debug:main', - 'brother_ql_info = brother_ql.brother_ql_info:main', - ], - }, - include_package_data = False, - zip_safe = True, - platforms = 'any', - install_requires = [ - "click", - "future", - "packbits", - "pillow>=3.3.0", - "pyusb", - 'attrs', - 'typing;python_version<"3.5"', - 'enum34;python_version<"3.4"', - ], - extras_require = { - #'brother_ql_analyse': ["matplotlib",], - #'brother_ql_create' : ["matplotlib",], - }, - keywords = 'Brother QL-500 QL-550 QL-560 QL-570 QL-700 QL-710W QL-720NW QL-800 QL-810W QL-820NWB QL-1050 QL-1060N', - classifiers = [ - 'Development Status :: 4 - Beta', - 'Operating System :: OS Independent', - 'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3', - 'Topic :: Scientific/Engineering :: Visualization', - 'Topic :: System :: Hardware :: Hardware Drivers', - ] -) From 03e8aaa7cea12eca84dd0f8bcdb18349d94f8438 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Wed, 24 Aug 2022 23:32:14 +0200 Subject: [PATCH 5/5] remove unneeded depenencies --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2479481..04695cd 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -19,7 +19,7 @@ jobs: python-version: ${{ env.python_version }} - name: Install Python build dependencies run: | - pip install --upgrade wheel setuptools twine build pypandoc + pip install setuptools twine build - name: Build binary run: | python3 -m build