Skip to main content

Feedstail

Feedstail is a tail-f-like utility for feeds. It monitor a feed and emits new entries. Feedstail aim to be simple, hackable and compatible with rsstail its C brother.

License

Feedstail is released under the terms of the GNU General Public License v3 or later.

Get started

Use pip to install feedstail the easy way:

$ pip install feedstail

Or retrieve the project with git and install it:

$ git clone https://github.com/Psycojoker/feedstail.git
$ cd feedstail
$ python setup.py install

Then, launch feedstail with a random feeds to test it:

$ feedstail -u http://hackeragenda.be/events/events.rss

Examples

By default, feedstail will checkout the feeds every 15 minutes. If you want to customize this interval you can use the i option. The following example will retrieve feeds every 5 seconds:

$ feedstail -u http://hackeragenda.be/events/events.rss -i 5

The default output format may not be ok for you. You can specify your own format using the f option. The given fields must be an available property of the feed entries. The following example will output the published date, the title and the link:

$ feedstail -u http://hackeragenda.be/events/events.rss -f "{published}: {title} - {link}"

This last example use the string formatting syntax appeared in the 2.6 version of Python. However, feedstail aim to be 2.5 compatible so you can use the old string formatting syntax:

$ feedstail -u http://hackeragenda.be/events/events.rss -f "%(published)s: %(title)s - %(link)s"

Feedstail compares the id element to find new entries. You can choose another element of comparison with the k option. The following example says to feedstail to use the title to find new entries:

$ feedstail -u http://hackeragenda.be/events/events.rss -i 2 -k title

As feedstail is built above feedparser, the available values of format fields and keys can be found in the documentation of the library.

Importing to other python project

Feedstail could be imported to another python project with:

from feedstail import feedGenerator
from feedstail.config import Config
Options :
  • key : The comparaison key. By default: id

  • reverse : Boolean value for reversing the entries of the feed. By default: False

  • number : At the first time, show x entries. By default, it is None and shows all the received entries.

  • ignore_key_error : Boolean value for ignore keys errors. By default: False

  • no_endl : Boolean value for ignoring end lines. By default: False

  • url : The url. By default: None

  • format : The format of entries.

Options not present :
  • interval : The interval time for checking the feed.

  • one shot : Get once the feed.

The feedGenerator take an instance of Config as parameters and return a generator. This generator will return an array of entries (could be an empty array) with the defined format.

Example:

from feedstail import feedGenerator
from feedstail.config import Config

feed = feedGenerator(Config(url="http://hackeragenda.be/events/events.rss", format=u'{title} - {link}'))
print '\n'.join(feed.next())

Contribute !

Don’t forget to mark your commits by one of the following flag:

  • [enh]: Your commit add a notable enhancement, a new feature for instance

  • [fix]: Your commit is a bugfix

  • [doc]: Your commit improve the documentation

  • [mod]: Your commit bring general changes, matching neither of the above, like refactoring

Release files for feedstail 0.5.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for feedstail 0.5.1
File Size Uploaded
feedstail-0.5.1.tar.gz 17.8 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for feedstail 0.5.1
File Interpreter ABI Platform
feedstail-0.5.1-py2.py3-none-any.whl Python 3, Python 2 none any Details
feedstail-0.5.1-py2.7.egg Legacy Egg format - - Details

Total release size: 64.6 kB

Release files / feedstail-0.5.1.tar.gz

Download URL feedstail-0.5.1.tar.gz
Size 17.8 kB
Tags Source
SHA-256 checksum
How to use checksums
1fcdc114d2bdce50140577e5ce82aba2bc488d7afad6d1efcfaf86b73c3dd398
BLAKE2b-256 checksum
How to use checksums
46e3c22a1d4ae451b735ac4056e3bb8db2c6ab3a36d449a54c55128aa819efd0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / feedstail-0.5.1-py2.py3-none-any.whl

Download URL feedstail-0.5.1-py2.py3-none-any.whl
Size 24.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
0a6d1a6dcfcfe74b084b46dd5e5122a5b90f87d2bda85ac9da28dbe1b37f0b16
BLAKE2b-256 checksum
How to use checksums
cc22d02f609fa4128dff4e9c7bc1279cbec6105c111739f6a59f2733ffa9c099
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / feedstail-0.5.1-py2.7.egg

Download URL feedstail-0.5.1-py2.7.egg
Size 22.0 kB
Tags Egg
SHA-256 checksum
How to use checksums
ebf3173d4346a51f8965138ebb95b1cd40e704d04e4a5f9766ccd367d882531c
BLAKE2b-256 checksum
How to use checksums
b4d2d38e46ab35333cae7ed4cfd3e1030779d4a86d91d9ac6d0a529cc091d429
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.5.1 This release

3 release files

0.5

3 release files

0.4.1

1 release file

0.4.0

1 release file

0.3.0

1 release file

0.2.0

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page