From 59ae1479216e5564cf8108155efe0fe03f908e90 Mon Sep 17 00:00:00 2001 From: Eric Davis Date: Sun, 31 May 2026 21:36:35 -0700 Subject: [PATCH] feat: sync autoposters updates --- autoposters/Dockerfile | 14 ++++++++++++++ autoposters/bskycharts.py | 7 ++++--- 2 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 autoposters/Dockerfile diff --git a/autoposters/Dockerfile b/autoposters/Dockerfile new file mode 100644 index 0000000..9cec243 --- /dev/null +++ b/autoposters/Dockerfile @@ -0,0 +1,14 @@ +# Use the official Python image from Docker Hub +FROM python:3.12-slim + +# Set the working directory in the container +WORKDIR /app + +# Copy the Python script into the container +COPY bskycharts.py /app/ + +# Install the required PyPI packages +RUN pip install --no-cache-dir requests atproto + +# Define the command to run the script +CMD ["python", "bskycharts.py"] diff --git a/autoposters/bskycharts.py b/autoposters/bskycharts.py index c9ce65b..254536d 100755 --- a/autoposters/bskycharts.py +++ b/autoposters/bskycharts.py @@ -2,7 +2,7 @@ import time -import atproto +from atproto import Client, models import requests @@ -12,7 +12,7 @@ BSKY_ACTIVITY_IMAGE_URL = 'https://bskycharts.edavis.dev/munin-cgi/munin-cgi-gra def main(): - client = atproto.Client('https://pds.merklehost.xyz') + client = Client('https://pds.merklehost.xyz') client.login(BSKY_HANDLE, BSKY_APP_PASSWORD) resp = requests.get(BSKY_ACTIVITY_IMAGE_URL) @@ -21,7 +21,8 @@ def main(): client.send_image( text = '', image = resp.content, - image_alt = 'munin chart showing daily bluesky network activity' + image_alt = 'munin chart showing daily bluesky network activity', + image_aspect_ratio = models.AppBskyEmbedDefs.AspectRatio(width=697, height=568) ) -- 2.51.2