LinuxCommandLibrary

rsstail

Monitor and tail RSS/Atom feeds

TLDR

Show the feed of a given URL and wait for new entries appearing at the bottom

$ rsstail -u [url]
copy

Show the feed in reverse chronological order (newer at the bottom)
$ rsstail -r -u [url]
copy

Include publication date and link
$ rsstail -pl -u [url]
copy

Set update interval
$ rsstail -u [url] -i [interval_in_seconds]
copy

Show feed and exit
$ rsstail -1 -u [url]
copy

SYNOPSIS

rsstail [OPTIONS] URL [URL...]

PARAMETERS

-u URL, --url=URL
    Specifies an RSS/Atom feed URL to monitor. Can be used multiple times, or URLs can be provided as positional arguments.

-i SECONDS, --interval=SECONDS
    Sets the polling interval in seconds. rsstail will check for new entries every SECONDS seconds. Default is often 300 (5 minutes).

-n, --new
    Displays only new entries found since the last check. This is often the default behavior.

-f, --follow
    Equivalent to tail -f. Continuously monitors the feed and outputs new entries as they arrive. Implies -n.

-a, --all
    Displays all entries found in the feed on the first fetch, then only new ones on subsequent checks. Overrides -n.

-l COUNT, --limit=COUNT
    Limits the number of entries displayed on the first fetch (if --all is used) or per update.

-e ELEMENTS, --elements=ELEMENTS
    Specifies which elements of a feed entry to display. Common elements include title, link, date, description. Elements are usually comma-separated, e.g., -e title,link.

-q, --quiet
    Suppresses initial output, showing only entries that appear after rsstail starts monitoring.

-v, --verbose
    Increases verbosity, showing more information about the fetching process and feed parsing.

-h, --help
    Displays a help message and exits.

-d, --debug
    Enables debug output, useful for troubleshooting parsing issues.

-o FORMAT, --output=FORMAT
    Defines a custom output format string using placeholders (e.g., %title% - %link%).

-k FILE, --keep=FILE
    Stores processed entries in a specified FILE to avoid re-displaying them across rsstail invocations, enabling state persistence.

DESCRIPTION

rsstail is a command-line utility designed to monitor RSS and Atom feeds in a manner similar to the standard tail -f command for log files.

It periodically fetches content from specified feed URLs and displays new entries as they appear, making it an ideal tool for keeping up with news, blog posts, or any frequently updated content without needing a full-fledged feed reader.

Users can specify the polling interval, control which elements of the feed (like title, link, description) are displayed, and filter the output. Its simplicity and command-line nature make it particularly useful for scripting, integrating into custom dashboards, or for system administrators who prefer terminal-based tools for quick updates and monitoring.

CAVEATS

rsstail is not a standard Linux command shipped with most distributions; it typically needs to be installed separately, often as a Perl script or from a specific package. Its functionality relies heavily on network connectivity to fetch feed content. While robust, it may encounter issues with malformed RSS/Atom feeds or unusual encoding.

Frequent polling with short intervals can consume network bandwidth and place a load on the feed server. As a command-line tool, it lacks the rich interactive features of graphical or more advanced terminal-based RSS readers.

<I>OUTPUT CUSTOMIZATION</I>

rsstail offers flexible output customization through the -e (--elements) and -o (--output) options. Users can choose to display specific components of a feed entry, such as title, link, date, description, or even author.

The --output option allows for defining a custom format string, using placeholders like %title% or %link%, enabling users to tailor the display exactly to their needs, making it highly adaptable for scripting and integration with other command-line tools.

<I>STATE PERSISTENCE</I>

To prevent re-displaying already seen entries across different rsstail invocations, the -k (--keep) option can be used. This option specifies a file where rsstail stores a record of the entries it has already processed. This allows the command to maintain state, ensuring that only truly new entries are shown even if rsstail is stopped and restarted. This feature is particularly useful in automated scripts or long-running sessions where continuous, unique updates are desired.

HISTORY

rsstail emerged in the early 2000s, coinciding with the growing popularity of RSS (Really Simple Syndication) as a web feed format. It was typically implemented as a Perl script, leveraging Perl's strong text processing and web fetching capabilities. The primary motivation was to provide a simple, tail-like interface for monitoring dynamic web content, mirroring the utility of tail -f for log files.

While not as widely known as general-purpose CLI tools, it filled a niche for developers, sysadmins, and command-line enthusiasts who needed quick, scriptable access to feed updates without the overhead of a full-fledged reader. Its development has been community-driven, with various versions and forks available over the years.

SEE ALSO

tail(1), curl(1), wget(1), grep(1), newsboat(1), newsbeuter(1)

Copied to clipboard