Cups label printer plugin for InvenTree
Project description
inventree-cups-plugin
A label printing plugin for InvenTree, which provides support for Cups label printing servers. If your printer is not cups compatible, you can setup a cups printing server. This article describes how to setup a cups printing server for the DYMO LabelWriter 450 Duo.
Installation
[!IMPORTANT] This plugin needs
cups-devel
installed to install its dependencies. You can read more about the requirements atpycups
. If you're usingapt
as a package manager runapt install libcups2-dev
before. For docker see below.
Goto "Settings > Plugins > Install Plugin" and enter the following values:
Package name: inventree-cups-plugin
Source URL: git+https://github.com/wolflu05/inventree-cups-plugin
Or install this plugin from the terminal:
pip install git+https://github.com/wolflu05/inventree-cups-plugin
Docker
For docker installs you need to build your own docker image based on the inventree image to install the required system dependencies. The following Dockerfile
is using a multistage build to only install what is needed onto the inventree image and do the building in a separate stage.
[!NOTE] This only works for the inventree alpine based docker image which is shipped with inventree>=0.13.
To use it you have to do some slight modifications of the docker-compose.yml
file and create the Dockerfile
as follows:
docker-compose.yml changes
diff --git a/docker-compose.yml b/docker-compose.yml
index 8adee63..dc3993c 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -69,7 +69,14 @@ services:
# Uses gunicorn as the web server
inventree-server:
# If you wish to specify a particular InvenTree version, do so here
- image: inventree/inventree:${INVENTREE_TAG:-stable}
+ image: inventree/inventree:${INVENTREE_TAG:-stable}-printing
+ pull_policy: never
+ build:
+ context: .
+ dockerfile: Dockerfile
+ target: production
+ args:
+ INVENTREE_TAG: ${INVENTREE_TAG:-stable}
# Only change this port if you understand the stack.
# If you change this you have to change:
# - the proxy settings (on two lines)
@@ -88,7 +95,8 @@ services:
# Background worker process handles long-running or periodic tasks
inventree-worker:
# If you wish to specify a particular InvenTree version, do so here
- image: inventree/inventree:${INVENTREE_TAG:-stable}
+ image: inventree/inventree:${INVENTREE_TAG:-stable}-printing
+ pull_policy: never
command: invoke worker
depends_on:
- inventree-server
Dockerfile
ARG INVENTREE_TAG
# prebuild stage - needs a lot of build dependencies
FROM python:3.10-alpine3.18 as prebuild
RUN apk add --no-cache cups-dev gcc git musl-dev && \
pip install --user --no-cache-dir git+https://github.com/wolflu05/inventree-cups-plugin
# production image - only install the cups shared library
FROM inventree/inventree:${INVENTREE_TAG} as production
RUN apk add --no-cache cups-libs
COPY --from=prebuild /root/.local /root/.local
Configuration Options
Name | Description | Example |
---|---|---|
Server | IP/Hostname to connect to the cups server | 192.168.1.5 |
Port | Port to connect to the cups server | 631 |
Benutzer | User to connect to the cups server | can also be empty |
Passwort | Password to connect to the cups server | can also be empty |
Printer | Printer from cups server, can be selected if valid connection options are saved in | myprinter |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for inventree-cups-plugin-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb0f0410401b77481c8af130e50be4d2a141ec70e9f79671f637bd23a800e276 |
|
MD5 | 4dfb258dc44e498ccd8fcb5be2f0fb47 |
|
BLAKE2b-256 | c1d9bdd4d349da0c1158150cab74cee38ca748458652ff2140dbc6d0cfed65af |
Hashes for inventree_cups_plugin-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 966a1b87e3ea7dd57fe997a180ce44e5e7df4d61f72ac6c386e27476bcaaaff0 |
|
MD5 | 4f74f76663c3f1bfc864b1fcfc4ecb4a |
|
BLAKE2b-256 | d0f58aa14715219632601da0ef3ea1cf8d4885ade53d88fc309d33b89099c246 |