From 78a9f8cbe90ccc0871ff155590c0a7b9a4dae61b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hubert=20Bry=C5=82kowski?= Date: Sun, 9 Jul 2023 16:00:49 +0200 Subject: [PATCH] starter docs --- Dockerfile | 2 +- poetry.lock | 12 ++++++------ pyproject.toml | 1 + readme.md | 29 +++++++++++++++++++++++++++++ 4 files changed, 37 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 35efae7..327c715 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM python:3.11 RUN mkdir /app -COPY /labeler /app +COPY / /app COPY pyproject.toml poetry.lock /app/ diff --git a/poetry.lock b/poetry.lock index 8e1ad09..f0286ce 100644 --- a/poetry.lock +++ b/poetry.lock @@ -491,13 +491,13 @@ files = [ [[package]] name = "pyasn1" -version = "0.5.0" -description = "Pure-Python implementation of ASN.1 types and DER/BER/CER codecs (X.208)" +version = "0.4.8" +description = "ASN.1 types and codecs" optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,>=2.7" +python-versions = "*" files = [ - {file = "pyasn1-0.5.0-py2.py3-none-any.whl", hash = "sha256:87a2121042a1ac9358cabcaf1d07680ff97ee6404333bacca15f76aa8ad01a57"}, - {file = "pyasn1-0.5.0.tar.gz", hash = "sha256:97b7290ca68e62a832558ec3976f15cbf911bf5d7c7039d8b861c2a0ece69fde"}, + {file = "pyasn1-0.4.8-py2.py3-none-any.whl", hash = "sha256:39c7e2ec30515947ff4e87fb6f456dfc6e84857d34be479c9d4a4ba4bf46aa5d"}, + {file = "pyasn1-0.4.8.tar.gz", hash = "sha256:aef77c9fb94a3ac588e87841208bdec464471d9871bd5050a287cc9a475cd0ba"}, ] [[package]] @@ -721,4 +721,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = "^3.11" -content-hash = "1937f9f1c025ae74edea552506772b52a303ca0435d67da173c690b73415266b" +content-hash = "9467b5a8ad9e1ddc4068bf23b85f7e13050fae63d92db59034153fbfab7f09f7" diff --git a/pyproject.toml b/pyproject.toml index e90b203..6e17479 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,6 +11,7 @@ brother-ql = {git = "https://github.com/archetipo/brother_ql"} jinja2 = "^3.1.2" pillow = "^9.5.0" pysnmp = "^4.4.12" +pyasn1 = "0.4.8" python-telegram-bot = "^20.3" fastapi = "^0.99.1" diff --git a/readme.md b/readme.md index e69de29..1427050 100644 --- a/readme.md +++ b/readme.md @@ -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= + - TELEGRAM_TOKEN= + command: + - python + - labeler/adapter/telegram_bot.py + +``` + +### Supported printers +- Brother PT-E550W \ No newline at end of file