Skip to content
/ rss2maildir Public
forked from edt/rss2maildir

Download rss and send it to a local maildir

License

Notifications You must be signed in to change notification settings

ov/rss2maildir

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 

Repository files navigation

rss2maildir

What does it do?

It downloads newsfeeds and stores them in a local maildir, so that you can read them with your mail client.

How to install?

Assuming rss2maildir.py is in your PATH and you use the default config location install the script by adding

0 * * * * rss2maildir.py > /dev/null

into you crontab.

Dependencies

The python3 modules that are required are:

feedparser mailbox

All other modules should be part of the standard library. This script is python 3 only.

Configuration

rss2maildir takes a configuration file that is located at ~/.config/rss2maildir.json. For situations where your config is located else where use the '-c' parameter.

The configuration file

An annotated config lookes like this:

{
    # General options
    "general": {
        # The "base" directory for all feeds
        "maildir": "~/.mail/rss",
        # Where to store information between script runs
        "cache": "~/.cache/rss2maildir/",
        # Use mails as a cache instead of local files
        "use_maildir_cache": true,
        # Should all mails be stored in a single Maildir
        "use_single_maildir": true,
        # What to put to the "From" field
        "mail_sender": "noreply@localhost"
    },
    # list of subscriptions
    "feeds": [
        {
            # used to identify feeds, Maildir name under "base" directory
            "name": "rss2maildir",
            "url": "https://github.com/edt-devel/rss2maildir/commits/master.atom"
        },
        {
            "name": "HackerNews",
            "url": "https://news.ycombinator.com/rss",
            "maildir": "~/.mail/rss/news", # use this maildir
            "links": true # keep links in the message text
        }
    ]
}

Options

All general settings and the feeds:maildir setting overwrite the internal default values. If you like the defaults, simply omit these parameters.

general:maildir

The "base" folder under which all feed Maildirs will be created. If you have 'use_single_maildir' set to true this directory will function ass the Maildir.

default: ~/.mail/rss

general:cache

default: ~/.cache/rss2maildir/

general:use_maildir_cache

If set to true all cache files will be stored as mails in a Maildir. general:cache will then be interpreted as that Maildir, or (~/.mail/rss/rss2maildircache if not set).

default: false

general:use_single_maildir

Drop all mails into a single Maildir (defined via general:maildir), unless a feed defines its own Maildir.

default: false

general:sender

Content of the "From" field

default: rss2maildir

general:recipient

Content of the "To" field

default: ${USER}@localhost

feeds:name

Identifying name of your feed. It will also be used to create a Maildir with equal name under general:maildir

feeds:url

URL of the feed that shall be downloaded.

feeds:maildir

Specific Maildir for this feed. Overwrites all other Maildir settings.

feeds:links

Keep links in the message text. False by default

License

This script is released under the GPLv3.

About

Download rss and send it to a local maildir

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%