Find a file
2025-11-16 06:56:27 +00:00
static Track posted photos. Cache images. 2025-11-15 19:24:59 +00:00
station_announcer Add historical hashtags 2025-11-16 06:56:27 +00:00
templates Using GPT, not ChatGPT. 2025-11-16 06:55:33 +00:00
.gitignore Update .gitignore 2025-11-16 05:27:58 +00:00
app.py Directory rename 2025-11-15 19:00:09 +00:00
README.md Track posted photos. Cache images. 2025-11-15 19:24:59 +00:00
requirements.txt Initial commit 2025-11-15 10:54:32 +00:00
SPEC.md Initial commit 2025-11-15 10:54:32 +00:00

Station Announcer

Station Announcer is a small Flask app that keeps your Immich library and Mastodon account in sync. It helps you compose rich Mastodon posts (with GPT-polished copy and cached alt text) and doubles as an Immich alt-text helper.

Getting started

  1. Create and populate a .env file (or reuse the existing api_keys file) with:

    IMMICH_API_URL=https://photos.4angle.com/
    IMMICH_API_KEY=your-immich-api-key
    OPENAI_API_KEY=your-openai-api-key
    MASTODON_BASE_URL=http://localhost:3000
    MASTODON_ACCESS_TOKEN=your-mastodon-token
    
  2. Install dependencies and run the development server:

    pip install -r requirements.txt
    flask --app app run --debug
    
  3. Visit http://127.0.0.1:5000 to start composing Mastodon posts from your recent Immich uploads, or hop into the alt-text helper view.

Mastodon workflow

  • The home page launches the composer. Use Select photos there to pick up to four recent Immich photos (200 entries are shown for convenience).
  • The draft view auto-fills cached alt text (or generates it if missing), lets you edit each description, enter post text, and provide optional ChatGPT instructions. It also shows your most recent Mastodon post so you can tick a box to continue a thread.
  • Hit Improve text with ChatGPT as many times as you like; the model polishes grammar, tone, and UK English spellings while respecting your extra notes.
  • When ready, choose Post to Mastodon to upload the selected media (with their alt text) and publish the refined caption (optionally as a reply) via the configured access token.

The app stores cached data in instance/station_announcer.db (or wherever STATION_DB points). Remove this file to clear the cache.