rpms/rss2email/FC-6 rss2email-config.py.template, NONE, 1.1 rss2email-r2e, NONE, 1.1 rss2email-r2e.1, NONE, 1.1 rss2email-use-configpy-from-homedir.patch, NONE, 1.1 rss2email-warn-if-problems-with-local-mta.patch, NONE, 1.1 rss2email.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Thorsten Leemhuis (thl) fedora-extras-commits at redhat.com
Mon Mar 26 08:09:05 UTC 2007


Author: thl

Update of /cvs/extras/rpms/rss2email/FC-6
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv16185

Modified Files:
	.cvsignore sources 
Added Files:
	rss2email-config.py.template rss2email-r2e rss2email-r2e.1 
	rss2email-use-configpy-from-homedir.patch 
	rss2email-warn-if-problems-with-local-mta.patch rss2email.spec 
Log Message:
initial import; review in #233715


--- NEW FILE rss2email-config.py.template ---
# Find some common used config options below; all can be found all and 
# descriptions in the section titled "### Vaguely Customizable Options ###"
# near the top of /usr/share/rss2email/rss2email.py

DEFAULT_FROM="bozo at dev.null.invalid"
HTML_MAIL=1
SMTP_SEND=1
SMTP_SERVER="localhost"
AUTHREQUIRED=0
SMTP_USER="username"
SMTP_PASS="password"
DATE_HEADER=0
# PROXY=""


--- NEW FILE rss2email-r2e ---
#!/bin/sh
if [ ! -e "${HOME}/.rss2email" ]
then
	mkdir "${HOME}/.rss2email"
fi

if [ ! -e "${HOME}/.rss2email/config.py" ] && [ -e /usr/share/rss2email/config.py.template ]
then
	cp -a "/usr/share/rss2email/config.py.template" "${HOME}/.rss2email/config.py"
fi

if [ "${1}" = "--feedext" ] && [ "${2}" ]
then
	fileext="${2}"
	shift 2
	exec python /usr/share/rss2email/rss2email.py ${HOME}/.rss2email/feeds.dat."${fileext}" "$@"
else
	exec python /usr/share/rss2email/rss2email.py ${HOME}/.rss2email/feeds.dat "$@"
fi




--- NEW FILE rss2email-r2e.1 ---
.TH R2E 1a
.SH NAME
r2e \- receive RSS feeds by email
.SH SYNOPSIS
.B r2e action [options]
.SH DESCRIPTION
.BR r2e
is a simple program which you can run in your crontab.
It watches RSS feeds and sends you nicely formatted email message
for each new item.
.P
The program is configured by ~/.rss2email/config.py
.P
For a quick start with r2e, try these steps:
.P
.RS
.nf
.BI "r2e new " your at address
.BI "r2e add " http://feed.url/somewhere.rss
.BI "r2e run "
.RE
.P
The last command should eventually be put into your crontab, if you
want things be sent you automatically.
.SH ACTIONS
.TP
.B new [youremail]
Create a new feedfile. If the second option is specified, it sets the
default email address that mails are sent to.
.TP
.B add url [youremail]
Subscribe to a feed. The first option is the URL of the feed.
The optional second option is the email address to send new items to.
Repeat for each feed you want to subscribe to.
.TP
.B run [--no-send] [num]
Scan the feeds and send emails for new items. This can be run in a cron
job.
.P
The --no-send option stops r2e from sending any email. This can be
useful the first time you run it, as otherwise it would send every
available story.
.P
If a number is specified, r2e will only download that feed. The list
command lists the feed numbers.
.TP
.B email yournewemail
Change the default email address.
.TP
.B list
List all your currently subscribed feeds.
.TP
.B delete n
Delete a feed, using its number from the list command.
.SH "CONFIGURATION"
The program's behavior can be controlled via the ~/.rss2email/config.py
config file. The file is a python file, so variables are set using a syntax
like this: VARIABLE = "value"
.P
If the value is a number, the quotes may be omitted. Most configuration
variables in the file are boolean values, where a 1 indicates the option is
set, and a 0 disables it.
.P
See the example config.py file for a full list of available configuration
variables.
.SH FILES
.TP
.B ~/.rss2email/feeds.dat
The database of feeds. Use r2e to add, remove, or modify feeds, do not edit
it directly.
.TP
.B ~/.rss2email/config.py
If this file exists, it it read to configure the program.
.SH AUTHOR
Aaron Swartz <rss2email at aaronsw.com>

rss2email-use-configpy-from-homedir.patch:

--- NEW FILE rss2email-use-configpy-from-homedir.patch ---
--- rss2email.py.org	2007-03-23 23:35:20.000000000 +0100
+++ rss2email.py	2007-03-23 23:40:37.000000000 +0100
@@ -199,8 +199,8 @@
 ### Load the Options ###
 
 # Read options from config file if present.
-import sys
-sys.path.append(".")
+import sys, os
+sys.path.append(os.path.join(os.environ["HOME"],".rss2email/"));
 try:
 	from config import *
 except:

rss2email-warn-if-problems-with-local-mta.patch:

--- NEW FILE rss2email-warn-if-problems-with-local-mta.patch ---
--- rss2email.py.org	2007-03-23 23:35:20.000000000 +0100
+++ rss2email.py	2007-03-25 09:42:39.000000000 +0200
@@ -182,6 +182,11 @@
 		i, o = os.popen2(["/usr/sbin/sendmail", recipient])
 		i.write(msg_as_string)
 		i.close(); o.close()
+		pid, status = os.wait()
+		if status != 0:
+			print >>warn, ""
+			print >>warn, ('Fatal error: sendmail exited with code %s' % status)
+			sys.exit(1)
 		del i, o
 		return None
 


--- NEW FILE rss2email.spec ---
Name:           rss2email
Version:        2.60
Release:        3%{?dist}
Summary:        Deliver news from RSS feeds to your smtp server as text or html mail

Group:          Applications/Internet
License:        GPL
URL:            http://rss2email.infogami.com/
Source0:        http://rss2email.infogami.com/rss2email.py
Source1:        http://rss2email.infogami.com/CHANGELOG
# Fedora variant of http://lindsey.smith.googlepages.com/r2e
Source3:        rss2email-r2e
# man page taken from 
# http://ftp.debian.org/debian/pool/main/r/rss2email/rss2email_2.60-3.diff.gz
Source4:        rss2email-r2e.1
Source5:        rss2email-config.py.template
Patch0:         rss2email-use-configpy-from-homedir.patch
# patch taken from 
# http://ftp.debian.org/debian/pool/main/r/rss2email/rss2email_2.60-3.diff.gz
Patch1:         rss2email-warn-if-problems-with-local-mta.patch
BuildArch:      noarch

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

Requires:       python-feedparser
Requires:       python-html2text

%description
rss2email lets you subscribe to a list of XML newsfeeds (RSS or Atom). It can
parse them regularly with the help of cron and send new items to you by email.

A HTML mail will be send in the default configuration to the local smtp server.
See the man page r2e for details how to set rss2email up.


%prep
%setup -q -c -T
install -p -m 0644 %{SOURCE0} rss2email.py
install -p -m 0644 %{SOURCE1} CHANGELOG.html
# let rss2email use ${HOME}/.rss2email/config.py
%patch0 -b .patch0 
%patch1 -b .patch1
sed -i -e 's/\r//' CHANGELOG.html rss2email.py


%build
echo nothing to build


%install
rm -rf $RPM_BUILD_ROOT
mkdir -p  \
   $RPM_BUILD_ROOT%{_bindir}/ \
   $RPM_BUILD_ROOT%{_datadir}/%{name}/  \
   $RPM_BUILD_ROOT%{_mandir}/man1/

install -p -m 0755 rss2email.py $RPM_BUILD_ROOT%{_datadir}/%{name}/
install -p -m 0755 %{SOURCE3} $RPM_BUILD_ROOT%{_bindir}/r2e
sed -i -e 's;/usr/share;%{_datadir};g' $RPM_BUILD_ROOT%{_bindir}/r2e
install -p -m 0644 %{SOURCE4} $RPM_BUILD_ROOT%{_mandir}/man1/r2e.1
install -p -m 0644 %{SOURCE5} $RPM_BUILD_ROOT%{_datadir}/%{name}/config.py.template


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc CHANGELOG.html
%{_bindir}/*
%{_datadir}/%{name}/
%{_mandir}/man1/*

%changelog
* Sun Mar 24 2007 Thorsten Leemhuis <fedora[AT]leemhuis.info> - 2.60-3
- Use sed instead of dos2unix
- Some small fixes from review bug #233715
- Apply one patch from Debian that should warn if there are problems with
  local delivery via sendmail


* Sat Mar 24 2007 Thorsten Leemhuis <fedora[AT]leemhuis.info> - 2.60-2
- Seperate package for html2text, as it might be useful for other stuff
  as well
- update r2e and make it possible to manage different feed files (optional,
  use r2e option "--feedext foo" to use it)
- add some common used, but-no-so-well documented configuration parameters
  to config.py template and give a hint where to find docs what they do

* Fri Mar 23 2007 Thorsten Leemhuis <fedora[AT]leemhuis.info> - 2.60-1
- Initial package


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/rss2email/FC-6/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	26 Mar 2007 07:38:07 -0000	1.1
+++ .cvsignore	26 Mar 2007 08:08:32 -0000	1.2
@@ -0,0 +1,2 @@
+CHANGELOG
+rss2email.py


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/rss2email/FC-6/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	26 Mar 2007 07:38:07 -0000	1.1
+++ sources	26 Mar 2007 08:08:32 -0000	1.2
@@ -0,0 +1,2 @@
+6f64601b5f1b27bbe140ce869f166688  CHANGELOG
+c1f452fffcbc03ad1b2fab2f9c42b76a  rss2email.py




More information about the fedora-extras-commits mailing list