Rename to Station Announcer

This commit is contained in:
Edward Betts 2025-11-15 18:59:27 +00:00
parent e6260faaeb
commit 74ec79ad9e
5 changed files with 15 additions and 9 deletions

View file

@ -1,6 +1,6 @@
# Immich Alt Text Helper # Station Announcer
A small Flask app that fetches recent Immich photos and helps generate high-quality Mastodon alt text via the OpenAI API. 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 ## Getting started
@ -21,11 +21,11 @@ A small Flask app that fetches recent Immich photos and helps generate high-qual
flask --app app run --debug flask --app app run --debug
``` ```
3. Visit <http://127.0.0.1:5000> to browse recent Immich photos, view cached alt text, request new alt text guided by optional notes, or compose Mastodon posts. 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 ## Mastodon workflow
* Use **Compose Mastodon post** to select up to four photos from the last few days (200 entries are shown for convenience). * 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. * 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. * 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. * 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.

View file

@ -107,6 +107,11 @@ MAX_MEDIA_ATTACHMENTS = 4
@bp.route("/") @bp.route("/")
def index(): def index():
return redirect(url_for("main.compose_select"))
@bp.route("/alt-text-helper")
def alt_helper():
immich_client = current_app.immich_client immich_client = current_app.immich_client
alt_cache = current_app.alt_text_cache alt_cache = current_app.alt_text_cache
days = current_app.config.get("RECENT_DAYS", 3) days = current_app.config.get("RECENT_DAYS", 3)

View file

@ -2,7 +2,7 @@
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Immich Alt Text Helper</title> <title>Station Announcer</title>
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}"> <link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}">
</head> </head>
@ -10,10 +10,10 @@
<header class="site-header"> <header class="site-header">
<div class="container"> <div class="container">
<div class="header-bar"> <div class="header-bar">
<h1><a href="{{ url_for('main.index') }}">Immich Alt Text Helper</a></h1> <h1><a href="{{ url_for('main.compose_select') }}">Station Announcer</a></h1>
<nav class="nav-links"> <nav class="nav-links">
<a href="{{ url_for('main.index') }}">Recent photos</a>
<a href="{{ url_for('main.compose_select') }}">Compose Mastodon post</a> <a href="{{ url_for('main.compose_select') }}">Compose Mastodon post</a>
<a href="{{ url_for('main.alt_helper') }}">Alt text helper</a>
</nav> </nav>
</div> </div>
</div> </div>

View file

@ -4,6 +4,7 @@
<section class="intro"> <section class="intro">
<h2>Select photos for your Mastodon post</h2> <h2>Select photos for your Mastodon post</h2>
<p>Choose between 1 and {{ max_photos }} recent Immich photos. We'll pull in cached alt text where possible.</p> <p>Choose between 1 and {{ max_photos }} recent Immich photos. We'll pull in cached alt text where possible.</p>
<p>Need to tidy up descriptions first? Visit the <a href="{{ url_for('main.alt_helper') }}">alt text helper</a>.</p>
</section> </section>
{% if error_message %} {% if error_message %}

View file

@ -2,8 +2,8 @@
{% block content %} {% block content %}
<section class="intro"> <section class="intro">
<p>Choose a recent Immich photo to request Mastodon-friendly alt text.</p> <h2>Alt text helper</h2>
<p><a class="button-link" href="{{ url_for('main.compose_select') }}">Compose a Mastodon post</a></p> <p>Review recent Immich photos and manage their cached alt text. Prefer composing instead? Head to <a href="{{ url_for('main.compose_select') }}">the composer</a>.</p>
</section> </section>
{% if error_message %} {% if error_message %}