Compare commits

..

4 commits

Author SHA1 Message Date
07518a1f8f update base image, smaller image type (alpine)
Some checks failed
Docker build and publish / build-and-push-image (push) Has been cancelled
2026-01-03 22:42:40 +00:00
f4159bc30d debug log
Some checks are pending
Docker build and publish / build-and-push-image (push) Waiting to run
2026-01-03 21:59:20 +00:00
b57546140b remove unused compose file 2026-01-03 21:59:09 +00:00
de8af89d71 add item specification (details), if available 2025-07-22 22:18:05 +00:00
3 changed files with 20 additions and 9 deletions

View file

@ -1,10 +1,19 @@
FROM python:3
FROM python:3.13.11-alpine3.23 AS builder
WORKDIR /usr/src/app
RUN apk add --no-cache gcc g++ musl-dev rust cargo patchelf
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
FROM python:3.13.11-alpine3.23
COPY --from=builder /usr/local/lib/python3.13/site-packages /usr/local/lib/python3.13/site-packages
RUN apk add --no-cache libstdc++
WORKDIR /usr/src/app
COPY . .
CMD [ "python", "-u", "./main.py" ]
CMD [ "python", "-u", "./main.py" ]

View file

@ -1,5 +0,0 @@
services:
server:
build: .
env_file: .env

View file

@ -51,14 +51,21 @@ class BringPlugin:
self.webhook_url = os.getenv("WEBHOOK_URL")
self.bring = None
self.existing_list = None
print(f"email: {self.email}")
async def grab_items(self, bring_list):
"""Grabs the items of the list using the list's uuid"""
item_objs = (await self.bring.get_list(bring_list.uuid)).items.purchase
bring_list.items = [item.itemId for item in item_objs]
bring_list.items = [self.transform_item(item) for item in item_objs]
print(f"Successfully fetched items at {datetime.datetime.now().isoformat()}")
print(f"Items = {bring_list.items}")
def transform_item(self, api_item):
if api_item.specification:
return f"{api_item.itemId} ({api_item.specification})"
else:
return api_item.itemId
async def send_list_to_trmnl(self, session, bring_list):
"""Sends the list to TRMNL if it has changed"""
if self.existing_list == bring_list: