1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154
|
======================================
feed2exec - programmable feed reader
======================================
``feed2exec`` is a simple program that runs custom actions on new RSS
feed items (or whatever `feedparser`_ can read). It currently has
support for writing into mailboxes (`Maildir`_ folders) or executing
commands, but more actions can be easily implemented through
plugins. Email are saved as multipart plain/HTML and can be sent to
arbitrary folders.
.. _feedparser: https://pypi.python.org/pypi/feedparser
.. _Maildir: https://en.wikipedia.org/wiki/Maildir
.. image:: https://img.shields.io/pypi/l/feed2exec.svg
:alt: AGPLv3 licensed
:target: https://gitlab.com/anarcat/feed2exec/blob/master/LICENSE.rst
.. image:: https://gitlab.com/anarcat/feed2exec/badges/master/pipeline.svg
:alt: pipeline status
:target: https://gitlab.com/anarcat/feed2exec/commits/master
.. image:: https://gitlab.com/anarcat/feed2exec/badges/master/coverage.svg
:alt: coverage report
:target: https://gitlab.com/anarcat/feed2exec/commits/master
.. image:: https://img.shields.io/pypi/v/feed2exec.svg
:alt: feed2exec version on PyPI
:target: https://pypi.python.org/pypi/feed2exec
.. image:: https://badges.debian.net/badges/debian/stable/feed2exec/version.svg
:alt: feed2exec version in stable
:target: https://packages.debian.org/stable/feed2exec
.. image:: https://badges.debian.net/badges/debian/unstable/feed2exec/version.svg
:alt: feed2exec version in unstable
:target: https://packages.debian.org/unstable/feed2exec
.. image:: https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg
:alt: Say thanks to the author
:target: https://saythanks.io/to/anarcat
.. marker-examples
Examples
--------
Simple run with no side effects::
feed2exec parse https://www.nasa.gov/rss/dyn/breaking_news.rss --output echo --args '{item.title}'
Saving feed items to a Maildir folder::
feed2exec add "NASA breaking news" https://www.nasa.gov/rss/dyn/breaking_news.rss --folder nasa
feed2exec fetch
This creates the equivalent of this configuration file in ``~/.config/feed2exec.ini``::
[DEFAULT]
output = feed2exec.plugins.maildir
mailbox = ~/Maildir
[NASA breaking news]
folder = nasa
url = https://www.nasa.gov/rss/dyn/breaking_news.rss
Send new feed items to Transmission::
feed2exec add "Example torrent list" http://example.com/torrents/feed --output transmission --folder /srv/incoming
Send new feed items to Mastodon, using the `toot`_ commandline
client::
feed2exec add "My site" http://example.com/blog/feed --output exec --args 'toot post "{item.title} {item.link}"'
Send new feed items to Twitter, using the tweet commandline client
from `python-twitter`_::
feed2exec add "My site on twitter" http://example.com/blog/feed --output exec --args 'tweet "{item.title:.40s} {item.link:.100s}"'
Show feed contents::
feed2exec add "NASA breaking news" https://www.nasa.gov/rss/dyn/breaking_news.rss --output echo --args "{item.title} {item.link}"
feed2exec fetch
.. _toot: https://github.com/ihabunek/toot/
.. _python-twitter: https://github.com/bear/python-twitter
.. marker-installation
Multiple feeds can also be added with the OPML import command. See the
`usage`_ document for more information including known issues and
limitations.
.. _usage: https://feed2exec.readthedocs.io/en/latest/usage.html
Installation
------------
This can be installed using the normal Python procedures::
pip install feed2exec
It can also be installed from source, using::
pip install .
It can also be ran straight from the source, using::
python -m feed2exec
.. important:: feed2exec is explicitly written for Python 3. It may be
possible to backport it to Python 2 if there is
sufficient demand, but there are too many convenient
Python3 constructs to make this useful. Furthermore,
all dependencies are well-packaged for Py3 and the
platform is widely available. Upgrade already.
The program may also be available as an official package from your
Linux distribution.
`Source <https://gitlab.com/anarcat/feed2exec/>`_, `documentation
<https://feed2exec.readthedocs.io/>`_ and `issues
<https://gitlab.com/anarcat/feed2exec/issues>`_ are available on
GitLab.
.. note:: feed2exec relies on the `feedparser`_ module to parse feeds
and as such has all the bugs and limitations of that
modules. In particular, feeds with non-standard dates will
break the parser, unless the `dateparser`_ module is
installed.
.. _dateparser: https://github.com/scrapinghub/dateparser
Why the name?
-------------
There are already `feed2tweet`_ and `feed2imap`_ out there so I
figured I would just reuse the prefix and extend *both* programs at
once.
.. _feed2tweet: https://github.com/chaica/feed2tweet
.. _feed2imap: https://github.com/feed2imap/feed2imap/
.. marker-toc
Design information
------------------
See the `design`_ document for more information about how and why the
program was built. The design document also features a comparison with other
similar software.
.. _design: https://feed2exec.readthedocs.io/en/latest/design.html
|