Skip to main content

Render RSS feeds with customizable templates

Project description

rssrender

Render RSS feeds for terminal display with customizable Jinja2 templates.

Features

  • Parse RSS feeds and render them for terminal output
  • Filter entries by age (only show recent entries)
  • Customizable output using Jinja2 templates
  • HTML to plain text conversion with formatting preservation
  • Content length limiting
  • Optional link hiding

Installation

pip install rssrender

Or install from source:

git clone git@github.com:berkeley-stat/rssrender.git
cd rssrender
pip install -e .

Usage

rssrender --feed-url <RSS_FEED_URL> [--template <TEMPLATE_PATH>]

Options

  • --feed-url (required): RSS feed URL
  • --template: Path to Jinja2 template file (default: included example template)
  • --day-threshold: Number of days to consider an entry as recent (default: 30)
  • --max-body-length: Maximum length of the body content (default: 400)
  • --hide-http-link: If set, the HTTP link will not be displayed in the output

Example

# Use the default template
rssrender --feed-url https://example.com/feed.xml

# Use a custom template and filter by last 7 days
rssrender --feed-url https://example.com/feed.xml --template ./my-template.j2 --day-threshold 7

Template Format

Templates use Jinja2 syntax and have access to:

  • description: Feed description (if available)
  • entries: List of entries with the following fields:
    • date: Publication date (YYYY-MM-DD format)
    • title: Entry title
    • link: Entry URL (if not hidden)
    • content: Entry content (HTML converted to plain text)

Custom Filters

Two custom filters are available in templates:

  • wrap(width, subsequent_indent, indent_all): Wrap text to specified width
  • indent(width, first): Indent lines by specified number of spaces

See the included example template for reference.

Use Cases

  • Generate MOTD (Message of the Day) from RSS feeds
  • Display news feeds in terminal dashboards
  • Create plain text digests from blogs
  • Any terminal-based RSS feed display

License

BSD 3-Clause License - See LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rssrender-0.1.0.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rssrender-0.1.0-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file rssrender-0.1.0.tar.gz.

File metadata

  • Download URL: rssrender-0.1.0.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for rssrender-0.1.0.tar.gz
Algorithm Hash digest
SHA256 190d66ca136d92c9595c64696d08717fb75179e607922ece3fa3f87d638d4603
MD5 dca0ec09f31da70489f58c59228dc37d
BLAKE2b-256 89b206ad500d871f3f9b222642ca60313ff05d94dfd35828d6fd1624614325a7

See more details on using hashes here.

Provenance

The following attestation bundles were made for rssrender-0.1.0.tar.gz:

Publisher: publish.yml on berkeley-stat/rssrender

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rssrender-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: rssrender-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for rssrender-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 daaebad824e93705467e7948e701736589514dff240ba4f4def5d8caa6eb776f
MD5 330736b7b767e87d570cdf9a6510cbeb
BLAKE2b-256 a53ee93789bf14fa6b01441e910ce3f6ae5750e91bb58af08ccec8739cf8ee0f

See more details on using hashes here.

Provenance

The following attestation bundles were made for rssrender-0.1.0-py3-none-any.whl:

Publisher: publish.yml on berkeley-stat/rssrender

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page