Skip to main content

A command-line syndication feed monitor mimicking tail -f

Project description

Rsstail

pypi version License

Rsstail is a command-line syndication feed monitor with behaviour similar to tail -f. Rsstail (Python/feedparser) is inspired by rsstail (C/libmrss), but provides more customizable output formatting and additional features.

Usage

$ rsstail --help
Usage: rsstail [options] <url> [<url> ...]

General Options:
  -v --verbose            increase verbosity
  -V --version            show version and exit
  -h --help               show this help message and exit
  -x --help-format        show formatting help and exit

Feed Options:
  -i --interval <arg>     poll every <arg> seconds
  -e --iterations <arg>   poll <arg> times and quit
  -n --initial <arg>      initially show <arg> items
  -w --newer <arg>        show items newer than <arg>
  -b --bytes <arg>        show only <arg> description/comment bytes
  -r --reverse            show in reverse order
  -s --striphtml          strip html tags
  -o --nofail             do not exit on error
  -q --unique             skip duplicate items

Format Options:
  -t --timestamp          show local timestamp
  -T --utc-timestamp      show utc timestamp
  -l --title              show title
  -u --url                show url
  -d --desc               show description
  -p --pubdate            show publication date
  -U --updated            show last update date
  -a --author             show author
  -c --comments           show comments
  -g --no-heading         do not show headings
  -m --time-format <arg>  date/time format
  -f --format <arg>       output format (overrides other format options)

Request Options:
  --user-agent <arg>      set user-agent
  --req-header <arg>      set request header (e.g. "Sec-GPC:1")

Examples:
  rsstail --timestamp --pubdate --title --author <url1> <url2> <url3>
  rsstail --reverse --title <url> <username:password@url>
  rsstail --interval 60|60s|5m|1h --newer "2011/12/20 23:50:12" <url>
  rsstail --format '%(timestamp)-30s %(title)s %(author)s\n' <url>
  rsstail --format '{timestamp:<30} {title} {author}\n' <url>

$ rsstail --help-format
Format specifiers must have one the following forms:
  %(placeholder)[flags]s
  {placeholder:flags}

Examples:
  --format '%(timestamp)s %(pubdate)-30s %(author)s\n'
  --format '%(title)s was written by %(author)s on %(pubdate)s\n'
  --format '{timestamp:<20} {pubdate:^30} {author:>30}\n'

Time format takes standard 'sprftime' specifiers:
  --time-format '%Y/%m/%d %H:%M:%S'
  --time-format 'Day of the year: %j Month: %b'

Useful flags in this context are:
  %(placeholder)-10s - left align and pad
  %(placeholder)10s  - right align and pad
  {placeholder:<10}  - left align and pad
  {placeholder:>10}  - right align and pad
  {placeholder:^10}  - center align and pad

Available placeholders:
  author
  comments
  created
  desc
  expired
  id
  link
  pubdate
  timestamp
  title
  updated
  utc-timestamp

Installing

The latest stable version of rsstail can be installed from pypi:

$ pip install rsstail

Or simply put the standalone rsstail script in your $PATH and make it executable:

sudo curl -L -o /usr/local/bin/rsstail https://github.com/gvalkov/rsstail.py/releases/download/v0.7.0/rsstail.pyz
sudo chmod 0755 /usr/local/bin/rsstail

Colorizing output

Rsstail's' output can be piped to one of the many console colorizers. Consider using one of the following tools: clide, multitail, ccze, colorize, colorex or colout.

Example with clide:

$ rsstail <options> \
| clide -e '/(Title|Pubdate|Author|Link|Description):/g,fg=yellow,bold' \
        -e '/^.*FAILURE.*$/,fg=red,bold \

Example with multitail:

# add to /etc/multitail.conf
colorscheme:rsstail.py:console syndication feed monitor
cs_re:red,,bold:^.*FAILURE.*$
cs_re:cyan:(:|/)
cs_re:yellow:^.......... ..:..:..
cs_re:green:(Title|Author|Link|Pubdate):

$ multitail -cS "rsstail.py" -l "rsstail <options>"

These two examples are barely touching the surface of what clide and multitail can do. Refer to the documentation of these excellent projects for more information.

Shell completion

Rsstail comes with shell completion scripts for bash and zsh.

If you are installing system-wide, the setup script will attempt to place these files in the right place.

Similar projects

License

Rsstail is released under the terms of the Revised BSD License.

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

rsstail-0.7.0.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

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

rsstail-0.7.0-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file rsstail-0.7.0.tar.gz.

File metadata

  • Download URL: rsstail-0.7.0.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.29 {"installer":{"name":"uv","version":"0.9.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"43","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for rsstail-0.7.0.tar.gz
Algorithm Hash digest
SHA256 b2050c720c78da47c81b29a9e5cbee75d463ed63b8f75ff3e13b5bfa88853786
MD5 dad2f321bb30ba92c4e791ea6aed4e14
BLAKE2b-256 fb0afbb1f0c6afad83550e2b87ead084ee2c6d1d2b08cc6c86284bf8dd1211e1

See more details on using hashes here.

File details

Details for the file rsstail-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: rsstail-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.29 {"installer":{"name":"uv","version":"0.9.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"43","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for rsstail-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9f774cab0feb7564d9a0da19290cacef94c253091bc69657f74fa02c0410b656
MD5 21268ee57f5253461be85bcf06df95d5
BLAKE2b-256 0828037c3eb5aa42f9ebc49b8b86eb73f4f021c938e427e6640591bcc08b26af

See more details on using hashes here.

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