starter docs

This commit is contained in:
Hubert Bryłkowski 2023-07-09 16:00:49 +02:00 committed by Piotr Gaczkowski
parent ef8b051b33
commit 56af39791e
4 changed files with 37 additions and 7 deletions

View file

@ -1,7 +1,7 @@
FROM python:3.11 FROM python:3.11
RUN mkdir /app RUN mkdir /app
COPY /labeler /app COPY / /app
COPY pyproject.toml poetry.lock /app/ COPY pyproject.toml poetry.lock /app/

12
poetry.lock generated
View file

@ -491,13 +491,13 @@ files = [
[[package]] [[package]]
name = "pyasn1" name = "pyasn1"
version = "0.5.0" version = "0.4.8"
description = "Pure-Python implementation of ASN.1 types and DER/BER/CER codecs (X.208)" description = "ASN.1 types and codecs"
optional = false optional = false
python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,>=2.7" python-versions = "*"
files = [ files = [
{file = "pyasn1-0.5.0-py2.py3-none-any.whl", hash = "sha256:87a2121042a1ac9358cabcaf1d07680ff97ee6404333bacca15f76aa8ad01a57"}, {file = "pyasn1-0.4.8-py2.py3-none-any.whl", hash = "sha256:39c7e2ec30515947ff4e87fb6f456dfc6e84857d34be479c9d4a4ba4bf46aa5d"},
{file = "pyasn1-0.5.0.tar.gz", hash = "sha256:97b7290ca68e62a832558ec3976f15cbf911bf5d7c7039d8b861c2a0ece69fde"}, {file = "pyasn1-0.4.8.tar.gz", hash = "sha256:aef77c9fb94a3ac588e87841208bdec464471d9871bd5050a287cc9a475cd0ba"},
] ]
[[package]] [[package]]
@ -721,4 +721,4 @@ files = [
[metadata] [metadata]
lock-version = "2.0" lock-version = "2.0"
python-versions = "^3.11" python-versions = "^3.11"
content-hash = "1937f9f1c025ae74edea552506772b52a303ca0435d67da173c690b73415266b" content-hash = "9467b5a8ad9e1ddc4068bf23b85f7e13050fae63d92db59034153fbfab7f09f7"

View file

@ -11,6 +11,7 @@ brother-ql = {git = "https://github.com/archetipo/brother_ql"}
jinja2 = "^3.1.2" jinja2 = "^3.1.2"
pillow = "^9.5.0" pillow = "^9.5.0"
pysnmp = "^4.4.12" pysnmp = "^4.4.12"
pyasn1 = "0.4.8"
python-telegram-bot = "^20.3" python-telegram-bot = "^20.3"
fastapi = "^0.99.1" fastapi = "^0.99.1"

View file

@ -0,0 +1,29 @@
## labeling telegram bot
This application is build to render and print labels sent to it via telegram, as well
as provide info about printer status and other useful information.
### usage example
You need to things:
1. A telegram bot token, you can write to [@BotFather](https://t.me/BotFather) to get one
2. A compatible printer
3. docker installed on your system
```yaml
version: "3.8"
services:
bot:
build:
context: .
dockerfile: Dockerfile
environment:
- PRINTER_IP=<printer_ip>
- TELEGRAM_TOKEN=<telegram_bot_token>
command:
- python
- labeler/adapter/telegram_bot.py
```
### Supported printers
- Brother PT-E550W