···5# New configuration for star counting window and threshold
6# Timeframe in hours to look back when counting recent stars
7TIMEFRAME=1
8-# Threshold for the number of stars within the timeframe to trigger a log message
9STAR_THRESHOLD=1
1011# Timeframe in hours to gate posts after a threshold is met (default 24)
···5# New configuration for star counting window and threshold
6# Timeframe in hours to look back when counting recent stars
7TIMEFRAME=1
8+# Threshold for the number of stars within the timeframe to trigger a post
9STAR_THRESHOLD=1
1011# Timeframe in hours to gate posts after a threshold is met (default 24)
+8
Dockerfile
···00000000
···1+FROM rust:1.89.0-bookworm AS builder
2+WORKDIR /app
3+COPY ../ /app
4+RUN cargo build --release
5+#
6+FROM rust:1.89-slim-bookworm AS api
7+COPY --from=builder /app/target/release/bot /usr/local/bin/bot
8+CMD ["bot"]
+4-3
README.md
···1-# Come back later
23-It ain't much, but it's bandiad engineering.
045-
···1+# Stitch Counter
23+Listens for stared repos and post them to [@stitch.selfhosted.social](https://bsky.app/profile/stitch.selfhosted.social)
4+if they meet the threshold and are "trending".
56+
+1-1
bot/src/main.rs
···105 let bot_pds_url = std::env::var("BOT_PDS_URL").expect("BOT_PDS_URL must be set");
106107 log::info!(
108- "Starting bot with username: {}\nTimeframe threshold: {}\nStar Threshold: {}\nPost Threshold: {}",
109 bot_username,
110 timeframe_hours,
111 star_threshold,
···105 let bot_pds_url = std::env::var("BOT_PDS_URL").expect("BOT_PDS_URL must be set");
106107 log::info!(
108+ "Starting bot with username: {} Timeframe threshold: {} Star Threshold: {} Post Threshold: {}",
109 bot_username,
110 timeframe_hours,
111 star_threshold,