From de8af89d718eab3c95b1b2ab1323cbe11e042be3 Mon Sep 17 00:00:00 2001 From: Lysann Tranvouez Date: Tue, 22 Jul 2025 22:18:05 +0000 Subject: [PATCH 1/4] add item specification (details), if available --- main.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 6bdaee6..2260b6e 100644 --- a/main.py +++ b/main.py @@ -55,10 +55,16 @@ class BringPlugin: 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: From b57546140b9ab80afdf9282f9e71318d1781c897 Mon Sep 17 00:00:00 2001 From: Lysann Tranvouez Date: Sat, 3 Jan 2026 21:59:09 +0000 Subject: [PATCH 2/4] remove unused compose file --- compose.yml | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 compose.yml diff --git a/compose.yml b/compose.yml deleted file mode 100644 index c1452fb..0000000 --- a/compose.yml +++ /dev/null @@ -1,5 +0,0 @@ -services: - server: - build: . - env_file: .env - From f4159bc30d5cdab449093d8a449359845d1c7777 Mon Sep 17 00:00:00 2001 From: Lysann Tranvouez Date: Sat, 3 Jan 2026 21:59:20 +0000 Subject: [PATCH 3/4] debug log --- main.py | 1 + 1 file changed, 1 insertion(+) diff --git a/main.py b/main.py index 2260b6e..d897a03 100644 --- a/main.py +++ b/main.py @@ -51,6 +51,7 @@ 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""" From 07518a1f8f3d3e24074852ac64af6d92948fbf6c Mon Sep 17 00:00:00 2001 From: Lysann Tranvouez Date: Sat, 3 Jan 2026 22:42:40 +0000 Subject: [PATCH 4/4] update base image, smaller image type (alpine) --- Dockerfile | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index f26d3a9..617be8a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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" ] \ No newline at end of file +CMD [ "python", "-u", "./main.py" ]