email: Pass 'config' and 'section' through from send() to *_send()
[rss2email.git] / r2e.1
1 .TH R2E 1
2 .SH NAME
3 r2e \- receive RSS feeds by email
4 .SH SYNOPSIS
5 .B r2e [options] <command> [<args>]
6 .SH DESCRIPTION
7 .BR r2e
8 is a simple program which you can run in your crontab.
9 It watches RSS feeds and sends you nicely formatted email message
10 for each new item.
11 .P
12 For a quick start with \fBr2e\fR, try these steps:
13 .P
14 .RS 4
15 .nf
16 .BI "r2e new " "your@yourdomain.com"
17 .BI "r2e add " "feedname http://feed.url/somewhere.rss"
18 .BI "r2e run"
19 .RE
20 .P
21 The last command should eventually be put into your crontab, if you
22 want things be sent you automatically.
23 .SH OPTIONS
24 .TP 4
25 \-\-help
26 Print the rss2email help and exit.
27 .TP
28 \-v, \-\-version
29 Print the rss2email version and exit.
30 .TP
31 \-c, \-\-config \fI<path>\fR
32 The program configuration is read from $XDG_CONFIG_HOME/rss2mail.cfg
33 by default (see also FILES and ENVIRONMENT VARIABLES below).  Use this
34 option to set a different configuration file.
35 .TP
36 \-d, \-\-data \fI<path>\fR
37 Dynamic program data is read from $XDG_DATA_HOME/rss2mail\&.json by
38 default (see also FILES and ENVIRONMENT VARIABLES below).  Use this
39 option to set a different data file.
40 .TP
41 \-V, \-\-verbose
42 Increment the logging verbosity.
43 .SH COMMANDS
44 .TP 4
45 .B new [\fI<email>\fR]
46 Create a new feed database. If the \fI<email>\fR argument is given, it
47 sets the default email address that mails are sent to.
48 .TP
49 .B email [\fI<email>\fR]
50 Update the default target email address to \fI<email>\fR.
51 .TP
52 .B add \fI<name>\fR \fI<url>\fR [\fI<email>\fR]
53 Subscribe to a feed. The \fI<name>\fR argument gives the feed a name
54 for future manipulation. \fI<url>\fR is the URL of the feed.  The
55 optional \fI<email>\fR argument is the email address to send new items
56 to, overriding the default address for this particular feed.  Repeat
57 for each feed you want to subscribe to.
58 .TP
59 .B run [\-\-no-send] [\fI<index>\fR [\fI<index>\fR ...]]
60 Scan the feeds and send emails for new items. This can be run in a cron
61 job.
62 .P
63 .RS 4
64 The \-\-no-send option stops \fBr2e\fR from sending any email. This can be
65 useful the first time you run it, as otherwise it would send an email
66 for every available feed entry.
67 .P
68 If an \fI<index>\fR is specified, \fBr2e\fR will only download that
69 feed. \fI<index>\fR can be either the feed name (as set by \fBadd\fR)
70 or the feed index (as shown by \fBlist\fR).
71 .RE
72 .TP
73 .B list
74 List all the feeds in the database.
75 .TP
76 .B pause [\fI<index>\fR [\fI<index>\fR ...]]
77 Pause feeds (disable fetching).  The \fI<index>\fR option selects the
78 feed(s) to pause (see \fBrun\fR for possible values).  If no
79 \fI<index>\fR is given, all feeds are paused.
80 .TP
81 .B unpause [\fI<index>\fR [\fI<index>\fR ...]]
82 Unpause feeds (enable fetching).
83 .TP
84 .B delete \fI<index>\fR [\fI<index>\fR [\fI<index>\fR ...]]
85 Remove a feed (or feeds) from the database.  The \fI<index>\fR option
86 selects the feed(s) to delete (see \fBrun\fR for possible values).
87 .TP
88 .B reset [\fI<index>\fR [\fI<index>\fR ...]]
89 Forget dynamic feed data (e.g. to re-send old entries).  The
90 \fI<index>\fR option selects the feed(s) to reset (see \fBrun\fR for
91 possible values).  If no \fI<index>\fR is given, all feeds are reset.
92 .TP
93 .B opmlimport [\fI<path>\fR]
94 Import new feeds from OPML.  \fI<path>\fR is the file from which the
95 OPML data will be read.  If \fI<path>\fR is not given \fBr2e\fR reads
96 the data from stdin.
97 .TP
98 .B opmlexport [\fI<path>\fR]
99 Export all feeds to OPML.  \fI<path>\fR is the file to which the OPML
100 data will be written.  If \fI<path>\fR is not given \fBr2e\fR writes
101 the data to stdout.
102 .SH "CONFIGURATION"
103 The program's behavior can be controlled via the
104 $XDG_CONFIG_HOME/rss2email.cfg (see also FILES and ENVIRONMENT
105 VARIABLES below). The file format is similar to a Microsoft Windows
106 INI file.  It is parsed by Python's ConfigParser class, so see the
107 Python documentation at
108 http://docs\&.python\&.org/3/library/configparser\&.html for format
109 details.
110 .P
111 The config file stores general configuration (applied to all feeds) in
112 the \fB[DEFAULT]\fR section.  The \fBnew\fR command will create a
113 configuration file for you, which you can edit as you see fit.  The
114 \fBadd\fR command will add feed-specific sections.  To override any a
115 setting for all feeds, change the value in the \fB[DEFAULT]\fR
116 section.  To override a setting for a particular feed, add that
117 setting to the feed-specific section.  Here is an example overriding
118 \fBuse-publisher-email\fR and \fBfriendly-name\fR for the
119 \fBfeedname\fR feed.
120 .P
121 .RS 4
122 .nf
123 [DEFAULT]
124 from = user@rss2email.invalid
125 force-from = False
126 use-publisher-email = False
127 friendly-name = True
128   .\|.\|.
129 verbose = warning
130
131 [feed.feedname]
132 url = http://feed.url/somewhere.rss
133 use-publisher-email = True
134 friendly-name = False
135 .RE
136 .P
137 .SH FILES
138 .TP 4
139 .B $XDG_CONFIG_HOME/rss2email.cfg
140 If this file exists, it it read to configure the program.
141 .TP
142 .B $XDG_DATA_HOME/rss2email\&.json
143 The database of feeds. Use \fBr2e\fR to add, remove, or modify feeds,
144 do not edit it directly.
145 .SH "ENVIRONMENT VARIABLES"
146 The environment variables used by \fBr2e\fR are all defined in the XDG
147 Base Directory Specification, which aims to standardize locations for
148 user-specific configuration and data files.
149 .TP 4
150 .B XDG_CONFIG_HOME
151 The preferred directory for configuration files.  Defaults to
152 $HOME/\&.config.
153 .TP
154 .B XDG_DATA_HOME
155 The preferred directory for data files.  Defaults to
156 $HOME/\&.local/share.
157 .TP
158 .B XDG_CONFIG_DIRS
159 A colon ':' separated, preference ordered list of base directories for
160 configuration files in addition to $XDG_CONFIG_HOME.  Defaults to
161 /etc/xdg.  If multiple configuration files are found in this path,
162 they will all be read by the ConfigParser class (see also
163 CONFIGURATION above).
164 .TP
165 .B XDG_DATA_DIRS
166 A colon ':' separated, preference ordered list of base directories for
167 data files.  Defaults to /usr/local/share/:/usr/share/.  Only the
168 first matching file is used.
169 .B 
170 .SH AUTHORS
171 rss2email was started by Aaron Swartz, and is currently maintained by
172 W. Trevor King.  For a more complete list of contributors, see the
173 __contributors__ list in rss2email/__init__\&.py.
174 .SH "REPORTING BUGS"
175 Report bugs to the mailing list (see the README for details).