Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Forward RSS feeds to your email address, community maintained

License

NotificationsYou must be signed in to change notification settings

rss2email/rss2email

Repository files navigation

Monthly DownloadsLatest VersionGPL v2.0 License

We highly recommend that you watch the rss2email project on GitHubso you can keep up to date with the latest version, bugfixes andfeatures:

https://github.com/rss2email/rss2email

A quick way to get rss2email going is using pre-made packages. There arereleases forDebian,Fedora,Gentoo,NetBSD,NixOS,OpenBSD,openSUSE, andUbuntu.

Before you install rss2email, you'll need to make sure that a fewthings are in place.

  1. Ensure that a version ofPython ≥3.6 is installed.
  2. Install the required Python packages.
  3. Figure out how you are going to send outgoing email. You have twooptions here: either use an SMTP server or a local sendmailprogram. So,
    • determine your outgoing email server's SMTP address, or
    • install sendmail (or a compatible replacement like postfix).

Download the latest rss2email source and unpack it. You can choosefrom several equivalent formats.

  1. A.zip file (suggested for Microsoft Windows users)or.tar.gz file (suggested for everyone else):

    * Navigate to https://github.com/rss2email/rss2email/releases* Click either the ``zip`` or ``tar.gz`` icon for the latest release* Download and extract the archive
  1. AGit checkout (suggested for developers):

    $ git clone https://github.com/rss2email/rss2email.git

From the unpacked directory, run:

$ pip install .

You can pass all the usual options to theinstall command,including--user. If you don't want to install rss2email, you canalso runr2e directly from the source directory.

Just repeat the installation procedure for the new source package. Ifyour config file and data file were in the old source directory, movethem over to the new source directory. If the config and data fileswere in another directory (e.g.~/.config and~/.local/share),there is no need to move them.

Create a new feed database to send updates to your email address:

$ r2e new you@yourdomain.com

This command will create a configuration file($XDG_CONFIG_HOME/rss2email.cfg by default) and a feed database($XDG_DATA_HOME/rss2email.json by default). If you'd rather thosefiles were stored in other locations, use the--config and--data options.XDG_CONFIG_HOME defaults to$HOME/.configandXDG_DATA_HOME defaults to$HOME/.local/share.

You should edit the default configuration file now to adjust rss2emailfor your local system. Unless you've installed a localsendmail-equivalent, you'll need to edit theSMTP options.

Subscribe to some feeds:

$ r2e add eff https://www.eff.org/rss/updates.xml

That will cause rss2email to notify you when there is a new announcement fromthe Electronic Frontier Foundation. Repeat this for each feed you want tosubscribe to.

When you run rss2email, it emails you about every story it hasn't seenbefore. But the first time you run it, that will be every story. Toavoid this, you can ask rss2email not to send you any stories thefirst time you run it:

r2e run --no-send

Then later, you can ask it to email you new stories:

r2e run

When a run is made, rss2email stores the list of already seen items for each feed in $HOME/.local/share/rss2email.json.

There are a number of options, described in full inrss2email/config.py, to customize the way rss2email behaves. Ifyou want to change something, edit the configuration file that wascreated byr2e new.

For example, if you want to receive HTML mail, instead of havingentries converted to plain text:

html-mail = True

To be notified every time a post changes, instead of just when it'sfirst posted (see alsotrust-link andreply-changes, described inrss2email/config.py):

trust-guid = True

And to make the emails look as if they were sent when the item wasposted:

date-header = True

If you get an error messageSender domain must exist, add thefollowing to your configuration file:

from = rss2email@yoursite.comforce-from = True

You can make the email address whatever you want, but your mail serverrequires that theyoursite.com part actually exists.

By default, rss2email uses sendmail (or an equivalent) to sendoutgoing email. If you don't have such a program installed, or simplyprefer to useSMTP directly, edit the configuration file and fill inyour outgoing email server's details:

[DEFAULT]...email-protocol = smtpsmtp-server = smtp.example.net:587smtp-auth = False...

If your server requires you to login, changesmtp-auth = False tosmtp-auth = True and enter your email username and password:

smtp-auth = Truesmtp-username = usernamesmtp-password = password

If your server requires anTLS/SSL connection (SMTPS), changesmtp-ssl = False tosmtp-ssl = True. If your server doesnot require a SMTPS connection but you request authentication,rss2email will useSTARTTLS to encrypt the connection before sendingyour login credentials to the server.

LMTP__ is an alternative to SMTP where the receiving side does not havea mail queue and is mainly used to deliver mail when the target mailserver is located on the same machine as the sending site. If you wantto use LMTP, edit the configuration file and fill in your mail server'sdetails:

[DEFAULT]...email-protocol = lmtplmtp-server = /path/to/lmtp.socketlmtp-auth = False...

If your server exposes LMTP via a TCP socket, specify the server andport vialmtp-server andlmtp-port:

lmtp-server = 127.0.0.1lmtp-port = 2003

If your server requires you to login, changelmtp-auth = False tolmtp-auth = True and enter your username and password:

lmtp-auth = Truelmtp-username = usernamelmtp-password = password

rss2email has a mechanism to post-process entries. A post-processor can be used to change the content of each entrybefore rss2email sends the email out. A hook is added by defining the variablepost-process in theconfig file. It takes two arguments, the module and the function to call. For example:

post-process = rss2email.post_process.prettify process

Examples of built-in post-processors:

  • prettify.py prettifies the HTML content with BeautifulSoup.
  • redirect.py remove redirects on the post URL for privacy or durability.

More than likely you will want rss2email to run automatically at aregular interval. Under Windows this is can be easily accomplishedusing the Windows Task Scheduler. This site has anicetutorial on it. Just selectr2e.bat as the program to run. Onceyou've created the task, double click on it in the task list andchange the Run entry so thatrun comesafterr2e.bat. For example, if you installed rss2email intheC:\rss2email directory, then you would change the Runentry fromC:\rss2email\r2e.battoC:\rss2email\r2e.bat run.

On Unix/Linux systems, you should add acron job that runsr2e.For example, runr2e every night (at 1:23 am) with:

23 1 * * * r2e run

User discussion and development take place on GitHub. Please feel freeto post bug reports, feature requests, comments, and patches. If you donot have a GitHub account and do not wish to acquire one, please comechat in the IRC channel.

There is a developer chat on theLibera IRC server, in therss2email channel. Feel free to idle.

When adding a new test case, it is possible to just add the new inputfiles, and then run the test suite withFORCE_TESTDATA_CREATION=1,and the test suite will automatically generate the output file. Justmake sure to check that the output file does match what is wanted beforechecking it in.

About

Forward RSS feeds to your email address, community maintained

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp