Metadata-Version: 2.0
Name: feed2exec
Version: 0.5
Summary: The programmable feed reader
Home-page: https://anarcat.gitlab.io/feed2exec/
Author: Antoine Beaupré
Author-email: anarcat@debian.org
License: AGPLv3
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
Classifier: Natural Language :: English
Classifier: Operating System :: POSIX
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Topic :: Communications :: Email
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content :: News/Diary
Classifier: Topic :: Text Processing :: Markup :: HTML
Requires-Dist: click
Requires-Dist: feedparser
Requires-Dist: html2text
Requires-Dist: requests
Requires-Dist: unidecode
Provides-Extra: dev
Requires-Dist: pyflakes; extra == 'dev'
Requires-Dist: pytest; extra == 'dev'
Requires-Dist: tox; extra == 'dev'

======================================
 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://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

.. marker-examples

Examples
--------

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/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 feed2exec.plugins.exec --args 'transmission-remote marcos.anarc.at -a '{item.link}' -w /srv/incoming'

Send new feed items to Mastodon, using the `toot`_ commandline
client::

  feed2exec add "My torrent" http://example.com/blog/feed --output feed2exec.plugins.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 torrent" http://example.com/blog/feed --output feed2exec.plugins.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 feed2exec.plugins.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 <https://anarcat.gitlab.io/feed2exec/usage.html>`_ document for more information.

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:: Make sure you use Python 3. feed2exec is written to
               also support Python 2.7, but there may be performance
               or security issues in that older version. For example,
               Python 2.7 seems to suffer from a header injection flaw
               that currently makes tests fail.

`Source <https://gitlab.com/anarcat/feed2exec/>`_, `documentation
<https://anarcat.gitlab.io/feed2exec/>`_ and `issues
<https://gitlab.com/anarcat/feed2exec/issues>`_ are available on
GitLab.

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 and known issues
-----------------------

See the `design <https://anarcat.gitlab.io/feed2exec/design.html>`_ document for more information about how and why
the program was built and its limitations. The design document also
features a comparison with other similar software.


