m0rph3us1987 f243f2213c feature(1100): Discover .markdown posts and always log run summary
Extend the anniversary matcher to recursively scan both .md and
.markdown posts under _posts/blog, retaining the existing filename
validation and relative-path dedupe identifier so published-state
bookkeeping keeps working.

Drop the zero-counter short-circuit in log_run_summary so the
run_complete line is always emitted on a successful pass. Debug and
manual runs now clearly show that scanning completed and found
nothing instead of going silent.

Update matching, logging, and run-logging tests to cover the new
extension and always-emit contract, and refresh the logging
architecture doc accordingly.
2026-08-05 11:58:04 +02:00

10Backward

Daily Mastodon throwback bot scaffolded with Docker Compose.

The container runs a cron daemon that invokes the Python entrypoint once per day at the configured RUN_AT (Europe/Berlin default). The actual blog clone / post pipeline is intentionally stubbed in this scaffold and is to be implemented in a follow-up job — this repository currently ships:

  • Pinned Python dependency manifest.
  • Dockerfile (python:3.11-slim + cron + git + ca-certificates + tzdata).
  • docker-compose.yml building locally, mounting .env read-only and persisting ./data for the blog clone and posted.json state.
  • entrypoint.sh that validates required env vars and fails clearly on startup before launching cron -f in the foreground.
  • Safe .env.example with placeholder credentials only.

Build & run

cp .env.example .env       # fill in real credentials locally
docker compose build
docker compose up -d
docker compose logs -f bot

./data is persisted across restarts on the host. The blog clone (added in a follow-up job) will live in ./data/blog/, and posted-state in ./data/posted.json.

Configuration

Variable Required Default Notes
MASTODON_BASE_URL yes e.g. https://mastodon.social
MASTODON_ACCESS_TOKEN yes never commit
SITE_URL yes source blog URL (HTTPS)
HASHTAGS yes comma-separated, e.g. #throwback,#10backward
RUN_AT yes 09:00 HH:MM in TZ
MASTODON_VISIBILITY no public public, unlisted, private, direct
THROWBACK_PREFIX no Throwback: German-localizable
RETRY_COUNT no 3 post retries
TZ no Europe/Berlin any IANA timezone

Tests

pip install -r requirements-dev.txt
pytest
S
Description
No description provided
Readme
125 KiB