Auto Feed

June 22, 2026 · View on GitHub

Auto Feed is an auto feeder that monitors external sources and automatically posts new items as echomail messages to configured echo areas on a recurring schedule. Supported source types are RSS/Atom feeds and Bluesky accounts.

Each feed source is configured with one or more target echo areas and an arbitrary poster name string. When the script runs, it fetches new items from each active source, formats them as FTN echomail messages, and fans each item out to every configured target area using that poster name as the visible sender.

Supported Source Types

TypeDescription
RSS / AtomRSS 2.0, RSS 1.0 (RDF), and Atom feeds. Any standard feed URL works.
BlueskyA Bluesky account's public posts via the Bluesky public API. Accepts a profile URL, handle (@user.bsky.social), or DID. Reply posts are excluded.

Bluesky source URLs are detected automatically in the admin UI — entering a bsky.app profile URL switches the source type to Bluesky without requiring manual selection.

How It Works

  1. scripts/rss_poster.php is run periodically via cron.
  2. All active feed sources are fetched from the auto_feed_sources database table.
  3. For each feed, the script fetches recent items from the source URL.
  4. Items are deduplicated against the last_article_guid stored for that feed.
  5. New items (up to max_articles_per_check) are posted to every configured target echo area.
  6. The last_article_guid, last_check, articles_posted, and last_error fields are updated for each feed.

To prevent overloading a source, feeds checked within the last 5 minutes are skipped unless --force is passed.

Admin Configuration

Go to Admin → Auto Feed to manage feed sources.

Feed Fields

FieldDescription
Feed NameDisplay label for the feed in the admin list.
Source URLThe RSS/Atom feed URL or Bluesky profile URL. Must be unique.
Source TypeRSS or Bluesky. Auto-detected for Bluesky URLs.
Echo AreasOne or more echo areas where new posts will appear.
Poster NameArbitrary text shown as the echomail sender name for generated posts.
Max Articles Per CheckMaximum number of new items to post per script run. Default 10, range 1–50.
Include Feed Name in SubjectWhen enabled, the posted subject becomes [feed_name] article title before FTN truncation is applied.
ActiveWhether this feed is checked during script runs.

Manual Check

The admin UI includes a Check Now button for each feed. The web route delegates the request to the admin daemon, which runs rss_poster.php --feed-id=N --force --verbose and returns the CLI output to the browser. This is useful for testing a newly added feed before the cron job runs and for seeing the exact fetch/post result immediately.

Statistics

The admin list shows per-feed article counts and last-check timestamps. The statistics sidebar shows totals across all feeds: total sources configured, active count, and total articles posted.

Cron Setup

Run the script on a regular interval. Every 30 minutes is a reasonable default; the per-feed rate limiting inside the script prevents any single feed from being hammered if the cron interval is shorter.

*/30 * * * * www-data php /path/to/binkterm-php/scripts/rss_poster.php >> /path/to/binkterm-php/data/logs/auto_feed.log 2>&1

Adjust the path and user (www-data) to match your installation.

Message Format

Each posted item becomes an echomail message addressed to All. The body contains:

  1. The item title (word-wrapped to 79 characters).
  2. For Bluesky posts: the poster's display name and handle.
  3. The item's text or description (HTML stripped).
  4. Any attached media URLs (images or video), if present.
  5. A link to the original item (View post for Bluesky, Read more for RSS).
  6. The item's published date and time.

The subject line is normally the item title, truncated to 72 characters to respect the FTN message header limit. If Include Feed Name in Subject is enabled for a feed and that feed has a name, the subject becomes [feed_name] item title before the same 72-character FTN truncation is applied.

CLI Script

See also Command Line Interface.

# Check all active feeds
php scripts/rss_poster.php

# Check a specific feed by ID
php scripts/rss_poster.php --feed-id=3

# Force a check even if the feed was recently checked
php scripts/rss_poster.php --force

# Show detailed output (item titles, post results, errors)
php scripts/rss_poster.php --verbose

# Combine flags
php scripts/rss_poster.php --feed-id=3 --force --verbose

Options

FlagDescription
--feed-id=NCheck only the feed with this database ID. Must be active.
--forceSkip the 5-minute rate-limit check and process the feed regardless of when it was last checked.
--verbosePrint item titles and post results to stdout.
--helpShow usage information.

Database

Feed sources are stored in the auto_feed_sources table.

ColumnTypeDescription
idSERIALPrimary key.
feed_urlTEXTSource URL. Unique.
feed_nameVARCHAR(100)Display name.
source_typeVARCHAR(20)rss or bluesky.
poster_nameVARCHAR(100)Visible sender name used for generated posts.
activeBOOLEANWhether the feed is checked on each run.
max_articles_per_checkINTEGERArticle cap per run. Default 10.
include_feed_name_in_subjectBOOLEANWhether subjects should be prefixed with [feed_name] before posting.
last_article_guidTEXTGUID/URI of the most recently posted item; used for deduplication.
last_checkTIMESTAMPWhen the feed was last successfully checked.
articles_postedINTEGERRunning total of articles posted via this feed.
last_errorTEXTMost recent error message, if any.
created_atTIMESTAMPRow creation time.
updated_atTIMESTAMPRow last-modified time.

Feed-to-area mappings are stored in auto_feed_source_echoareas.

ColumnTypeDescription
auto_feed_source_idINTEGERFK to auto_feed_sources(id).
echoarea_idINTEGERFK to echoareas(id).
created_atTIMESTAMPRow creation time.

Added by migrations v1.9.2.2_auto_feed.sql, v20260508180000_add_auto_feed_source_type.sql, and v20260622183830_auto_feed_poster_name_and_multi_echoareas.sql.

Troubleshooting

Feed shows an error in the admin list The last_error column is displayed in the feed table when non-empty. Common causes: unreachable URL, malformed XML, Bluesky API error, or a configured echo area being deleted. Fix the underlying issue and use Check Now to confirm.

No new articles appear after a manual check All items may already have been seen. The deduplication is based on last_article_guid — if that GUID no longer appears in the feed (e.g., the feed was reset), all current items will be treated as new on the next check. Use --force to bypass the rate-limit window and re-run immediately.

Bluesky feed posts nothing Confirm the handle or URL resolves to a public account with recent posts that are not replies. The script fetches posts_no_replies — accounts whose only recent activity is replies to others will appear empty.

Duplicate messages posted This can happen if last_article_guid was cleared or if the same item appears in the feed with different GUIDs across fetches. Check the feed source for inconsistent GUID generation.