R2E(1)

๐Ÿ“ฆ version 3.14, in nixpkgs unstable

๐Ÿ’… R2E(1) ๐Ÿ’…

okay so bestie, welcome to the General Commands Manual glow-up of R2E(1) โ€” yes, it's section 1, it's a command, and it's about to be your new personality. ๐Ÿซถ


โœจ NAME โœจ

r2e โ€” receive RSS feeds by email ๐Ÿ’Œ


๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

r2e [options] <command> [<args>]

๐ŸŒธ DESCRIPTION ๐ŸŒธ

r2e is a simple little program you can run in your crontab(5). It keeps an eye on RSS feeds for you and then sends you a nicely formatted email message for each new item. no cap, that's the whole vibe. ๐Ÿ‘‘

Wanna do a quick start? Here's the lowkey iconic three-step:

r2e new your@yourdomain.com
r2e add feedname http://feed.url/somewhere.rss
r2e run

That last one โ€” r2e run โ€” is the one you're eventually gonna want to drop into your crontab if you want stuff getting sent to you automatically, without you having to lift a finger. ๐Ÿ’…


โญ OPTIONS โญ

  • -h, --help โ€” prints the rss2email help and then dips. โœŒ๏ธ
  • -v, --version โ€” prints the rss2email version and exits.
  • --full-version โ€” prints the versions of Python, the compiler that was used to compile Python, and the packages used by rss2email. the whole receipts, basically. ๐Ÿงพ
  • -c, --config <path> โ€” the program configuration is read from $XDG_CONFIG_HOME/rss2mail.cfg by default (see also FILES and ENVIRONMENT VARIABLES below). use this option to point it at a different configuration file.
  • -d, --data <path> โ€” dynamic program data is read from $XDG_DATA_HOME/rss2mail.json by default (see also FILES and ENVIRONMENT VARIABLES below). use this option to point it at a different data file.
  • -V, --verbose โ€” cranks the logging verbosity up a notch. ๐Ÿ”Š

๐Ÿ‘‘ COMMANDS ๐Ÿ‘‘

  • new [<email>] โ€” creates a brand new feed database. If the <email> argument is given, it sets the default email address that mails get sent to. ๐ŸŽ€
  • email [<email>] โ€” updates the default target email address to <email>.
  • add [--only-new] <name> <url> [<email>] โ€” subscribes to a feed. The <name> argument gives the feed a name so you can mess with it later. <url> is the URL of the feed. The optional <email> argument is the email address to send new items to, which overrides the default address for this particular feed only. Repeat this for each feed you want to subscribe to. ๐Ÿ”

The --only-new option fetches the feed at addition time without sending the entries, which makes subsequent run execution consider them as already having been sent. It should be used when you're only interested in entries that are not yet in the feed at the time of running add.

  • run [--no-send] [--clean] [<index> [<index> ...]] โ€” scans the feeds and sends emails for new items. This is the one you can run in a cron job. โฐ

The --no-send option stops r2e from sending any email. This can be useful the first time you run it, because otherwise it would send an email for every single available feed entry and that's a lot of emails bestie. ๐Ÿ˜ญ

The --clean option reduces the database size by removing old entries. It forces a download of selected feeds or all feeds, and should only be used weekly or monthly. don't be extra about it. ๐Ÿ™ˆ

If an <index> is specified, r2e will only download that feed. <index> can be either the feed name (as set by add) or the feed index (as shown by list).

  • list โ€” lists all the feeds in the database. the receipts, the roster, the whole cast. ๐Ÿ“‹
  • pause [<index> [<index> ...]] โ€” pauses feeds (aka disables fetching). The <index> option selects the feed(s) to pause (see run for possible values). If no <index> is given, all feeds are paused. shhh, nap time. ๐Ÿ˜ด
  • unpause [<index> [<index> ...]] โ€” unpauses feeds (aka enables fetching). wakey wakey. โ˜€๏ธ
  • delete <index> [<index> [<index> ...]] โ€” removes a feed (or feeds) from the database. The <index> option selects the feed(s) to delete (see run for possible values). ๐Ÿ’€
  • reset [<index> [<index> ...]] โ€” forgets dynamic feed data (e.g. so it'll re-send old entries). The <index> option selects the feed(s) to reset (see run for possible values). If no <index> is given, all feeds are reset. selective memory loss, iconic. ๐Ÿง 
  • opmlimport [<path>] โ€” imports new feeds from OPML. <path> is the file from which the OPML data will be read. If <path> is not given, r2e reads the data from stdin.
  • opmlexport [<path>] โ€” exports all feeds to OPML. <path> is the file to which the OPML data will be written. If <path> is not given, r2e writes the data to stdout.

๐Ÿ’– CONFIGURATION ๐Ÿ’–

The program's behavior can be controlled via the $XDG_CONFIG_HOME/rss2email.cfg (see also FILES and ENVIRONMENT VARIABLES below). The file format is similar to a Microsoft Windows INI file. It is parsed by Python's ConfigParser class, so go peek at the Python documentation at http://docs.python.org/3/library/configparser.html if you want the format details. ๐Ÿ

The config file stores general configuration (applied to all feeds) in the [DEFAULT] section. The new command will create a configuration file for you, which you can edit as you see fit. The add command will add feed-specific sections. To override any a setting for all feeds, change the value in the [DEFAULT] section. To override a setting for a particular feed, add that setting to the feed-specific section. Here's an example overriding use-publisher-email and name-format for the feedname feed. ๐Ÿ‘‡

[DEFAULT]
from = user@rss2email.invalid
force-from = False
use-publisher-email = False
name-format = {feed-title}: {author}
  ...
verbose = warning

[feed.feedname]
url = http://feed.url/somewhere.rss
use-publisher-email = True
name-format = {author} ({feed.title})

You can configure the following items: โœจ

๐Ÿ“ฌ Addressing

  • from โ€” the email address messages are from by default.
  • use-8bit โ€” Transfer-Encoding. For local mailing it is safe and convenient to use 8bit.
  • force-from โ€” True: only use the 'from' address. False: use the email address specified by the feed, when possible.
  • use-publisher-email โ€” True: use the publisher's email if you can't find the author's. False: just use the 'from' email instead.
  • name-format โ€” if empty, only use the feed email address rather than friendly name plus email address. Available attributes may include 'feed', 'feed-name', 'feed-url', 'feed-title', 'author', and 'publisher', but only 'feed', 'feed-name', and 'feed-url' are guaranteed. ๐Ÿ‘€
  • to โ€” set this to default To email addresses.

๐ŸŒ Fetching

  • proxy โ€” set an HTTP proxy (e.g. 'http://your.proxy.here:8080/')
  • feed-timeout โ€” set the timeout (in seconds) for feed server response.

โš™๏ธ Processing

  • active โ€” True: fetch, process, and email feeds. False: don't fetch, process, or email feeds.
  • digest โ€” True: send a single, multi-entry email per feed per rss2email run. False: send a single email per entry.
  • digest-type โ€” message content-type for digests. Valid values are 'multipart/digest' and 'multipart/mixed'. The former is the default, but many mail user agents do not support it. โš ๏ธ
  • date-header โ€” True: generate Date header based on item's date, when possible. False: generate Date header based on time sent.
  • date-header-order โ€” a comma-delimited list of some combination of ('issued', 'created', 'modified', 'expired') expressing ordered list of preference in dates to use for the Date header of the email.
  • bonus-header โ€” set this to add bonus headers to all emails. Example: bonus-header = 'Approved: joe@bob.org'
  • trust-guid โ€” True: receive one email per post. False: receive an email every time a post changes.
  • trust-link โ€” True: receive one email per unique link url. False: defer to trust-guid preference. Toggling this for existing feeds may result in duplicates, because the old entries will not be recorded under their new link-based ids. ๐Ÿซ 
  • encodings โ€” to most correctly encode emails with international characters, we iterate through the list below and use the first character set that works.
  • post-process โ€” user processing hooks. Note the space after the module name. Example: post-process = 'rss2email.post_process.downcase downcase_message'
  • digest-post-process โ€” user processing hooks for digest messages. If 'digest' is enabled, the usual 'post-process' hook gets to message the per-entry messages, but this hook is called with the full digest message before it is mailed. Example: digest-post-process = 'rss2email.post_process.downcase downcase_message'
  • subject-format โ€” the format for the Subject line. Available attributes are 'feed', 'feed-name', 'feed-url', 'feed-title'.

๐ŸŽจ HTML conversion

  • html-mail โ€” True: send text/html messages when possible. False: convert HTML to plain text.
  • use-css โ€” use CSS.
  • css โ€” optional CSS styling.

๐Ÿงš html2text options

  • unicode-snob โ€” use Unicode characters instead of their ascii psuedo-replacements.
  • links-after-each-paragraph โ€” put the links after each paragraph instead of at the end.
  • inline-links โ€” use inline, rather than reference, formatting for images and links.
  • wrap-links โ€” wrap links according to body width.
  • body-width โ€” wrap long lines at position. Any negative value for no wrapping, 0 for 78 width (compatibility), or any positive width.

๐Ÿ“ฎ Mailing

  • email-protocol โ€” select protocol from: sendmail, smtp, imap, maildir
  • sendmail โ€” path to sendmail (or compatible).

๐Ÿ“ง SMTP configuration

  • smtp-auth โ€” set to True to use SMTP AUTH
  • smtp-username โ€” username for SMTP AUTH
  • smtp-password โ€” password for SMTP AUTH
  • smtp-server โ€” SMTP server
  • smtp-ssl โ€” connect to the SMTP server using SSL

๐Ÿ“ฅ IMAP configuration

  • imap-auth โ€” set to True to use IMAP auth.
  • imap-username โ€” username for IMAP authentication
  • imap-password โ€” password for IMAP authentication
  • imap-server โ€” IMAP server
  • imap-port โ€” IMAP port
  • imap-ssl โ€” connect to the IMAP server using SSL
  • imap-mailbox โ€” where we should store new messages

๐Ÿ“ Maildir configuration

  • maildir-path โ€” path of maildir to write messages into
  • maildir-mailbox โ€” mailbox within maildir-path to write messages into

๐ŸŒˆ Miscellaneous

  • user-agent โ€” string to use as HTTP User-Agent in web requests and as the User-Agent header in outgoing emails. If present, __VERSION__ and __URL__ are replaced with rss2email version number and webpage.
  • verbose โ€” verbosity (one of 'error', 'warning', 'info', or 'debug').

๐Ÿ—‚๏ธ FILES ๐Ÿ—‚๏ธ

  • $XDG_CONFIG_HOME/rss2email.cfg โ€” if this file exists, it is read to configure the program.
  • $XDG_DATA_HOME/rss2email.json โ€” the database of feeds. Use r2e to add, remove, or modify feeds, do not edit it directly. ๐Ÿšซ

๐ŸŒธ ENVIRONMENT VARIABLES ๐ŸŒธ

okay bestie so all the env vars r2e cares about come straight out of the XDG Base Directory Specification, which is basically the collective agreement to stop dumping everyone's config and data files in random places and standardize where user-specific stuff lives. iconic behaviour tbh ๐Ÿซถ

  • XDG_CONFIG_HOME โ€” the dir where your config files wanna live. Defaults to $HOME/.config. ๐Ÿ’…
  • XDG_DATA_HOME โ€” the dir where your data files wanna live. Defaults to $HOME/.local/share. โœจ
  • XDG_RUNTIME_DIR โ€” the dir where lockfiles go. Defaults to /tmp/rss2email-UID. ๐Ÿ”’
  • XDG_CONFIG_DIRS โ€” a colon ':' separated, preference-ordered list of base dirs for config files, on top of whatever $XDG_CONFIG_HOME is doing. Defaults to /etc/xdg. And listen โ€” if multiple config files get found along this path, the ConfigParser class reads all of them, no cap (see also CONFIGURATION above, bestie, it's all connected ๐Ÿฆ‹).
  • XDG_DATA_DIRS โ€” a colon ':' separated, preference-ordered list of base dirs for data files. Defaults to /usr/local/share/:/usr/share/. And here's the plot twist: only the first matching file is used. not all of them. just the first. the rest are simply not the main character ๐Ÿ˜ญ

๐Ÿ‘‘ AUTHORS ๐Ÿ‘‘

rss2email was started by Aaron Swartz โ€” yeah, that Aaron Swartz, absolute legend, we stan forever ๐Ÿ•Š๏ธ๐Ÿ’œ โ€” and it's currently maintained by a whole group of people doing the lord's work.

for the full, more complete list of contributors, go peek at the AUTHORS file in the rss2email distribution. everyone in there ate, fr fr. ๐ŸŽ€


๐Ÿ› REPORTING BUGS ๐Ÿ›

found a bug? don't suffer in silence bestie, that's not the vibe. report it by creating an issue at:

https://github.com/rss2email/rss2email

go forth and open that issue, you're doing amazing sweetie ๐Ÿซถ๐Ÿ’–


and that's a wrap on the whole page!! ๐ŸŒˆ this was R2E(1) โ€” the version that lives in your manual and the date it got stamped in there, both chilling right down in the footer where footers belong. go forth, feed your RSS, and remember: you're the main character of your own inbox. periodt. ๐Ÿ’…โœจ๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from