pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mail/rss2email Update to 2.60. From the changelog:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/b0bd9616ab14
branches:  trunk
changeset: 524128:b0bd9616ab14
user:      schmonz <schmonz%pkgsrc.org@localhost>
date:      Fri Jan 19 00:57:03 2007 +0000

description:
Update to 2.60. From the changelog:

* Now compatible with SunOS
* Correctly handle international character sets in email From

Plus changes from Debian:

* Document more options in config.py
* Flesh out manual page
* Check exit status of sendmail, and die if it fails
* Use fcntl even on non-Sunos-Unix

diffstat:

 mail/rss2email/Makefile         |   4 +-
 mail/rss2email/distinfo         |  10 ++--
 mail/rss2email/files/config.py  |  63 ++++++++++++++++++++++++++++++---
 mail/rss2email/files/r2e.1      |  75 +++++++++++++++++++++++++++++++++++++++++
 mail/rss2email/patches/patch-ad |  28 +++++++++++++-
 5 files changed, 163 insertions(+), 17 deletions(-)

diffs (233 lines):

diff -r 5ca3ca9f0f0e -r b0bd9616ab14 mail/rss2email/Makefile
--- a/mail/rss2email/Makefile   Fri Jan 19 00:55:52 2007 +0000
+++ b/mail/rss2email/Makefile   Fri Jan 19 00:57:03 2007 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.15 2007/01/18 23:08:24 schmonz Exp $
+# $NetBSD: Makefile,v 1.16 2007/01/19 00:57:03 schmonz Exp $
 #
 
-DISTNAME=              rss2email-2.59
+DISTNAME=              rss2email-2.60
 CATEGORIES=            mail
 MASTER_SITES=          ${HOMEPAGE}
 EXTRACT_SUFX=          .py
diff -r 5ca3ca9f0f0e -r b0bd9616ab14 mail/rss2email/distinfo
--- a/mail/rss2email/distinfo   Fri Jan 19 00:55:52 2007 +0000
+++ b/mail/rss2email/distinfo   Fri Jan 19 00:57:03 2007 +0000
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.13 2007/01/18 23:08:24 schmonz Exp $
+$NetBSD: distinfo,v 1.14 2007/01/19 00:57:03 schmonz Exp $
 
-SHA1 (rss2email-2.59.py) = 32091d8cc9378e6346a9589d9783505259564337
-RMD160 (rss2email-2.59.py) = ef21bc4dab3efbf52449319e736b23a9eb3ae591
-Size (rss2email-2.59.py) = 24152 bytes
-SHA1 (patch-ad) = 58b80c4bb0c4c00f2a4994d36da35f29f0dc59e8
+SHA1 (rss2email-2.60.py) = 1427043b2335574c57028a2692ca5fd18f461b6c
+RMD160 (rss2email-2.60.py) = ad7716ed62007bc13524057e060a529bdf924e18
+Size (rss2email-2.60.py) = 23956 bytes
+SHA1 (patch-ad) = 8932556b67aaa0e7d4df263ad9f3cf96deb74bfd
diff -r 5ca3ca9f0f0e -r b0bd9616ab14 mail/rss2email/files/config.py
--- a/mail/rss2email/files/config.py    Fri Jan 19 00:55:52 2007 +0000
+++ b/mail/rss2email/files/config.py    Fri Jan 19 00:57:03 2007 +0000
@@ -1,14 +1,16 @@
+### Vaguely Customizable Options ###
+
 # The email address messages are from by default:
-DEFAULT_FROM = "bozo%dev.null@localhost"
+DEFAULT_FROM = "bozo%dev.null@localhost.invalid"
+
+# 1: Send text/html messages when possible.
+# 0: Convert HTML to plain text.
+HTML_MAIL = 0
 
 # 1: Only use the DEFAULT_FROM address.
 # 0: Use the email address specified by the feed, when possible.
 FORCE_FROM = 0
 
-# 1: Receive HTML mail
-# 0: Have entries converted to plain text
-HTML_MAIL = 1
-
 # 1: Receive one email per post
 # 0: Receive an email every time a post changes
 TRUST_GUID = 1
@@ -17,11 +19,58 @@
 # 0: Generate Date header based on time sent
 DATE_HEADER = 0
 
-# 1: Apply Q-P conversion (required for some MUAs)
-# 0: Send message in 8-bits
+# A tuple consisting of some combination of
+# ('issued', 'created', 'modified', 'expired')
+# expressing ordered list of preference in dates 
+# to use for the Date header of the email.
+DATE_HEADER_ORDER = ('modified', 'issued', 'created')
+
+# 1: Apply Q-P conversion (required for some MUAs).
+# 0: Send message in 8-bits.
 # http://cr.yp.to/smtp/8bitmime.html
 QP_REQUIRED = 0
 
 # 1: Name feeds as they're being processed.
 # 0: Keep quiet.
 VERBOSE = 0
+
+# 1: Use the publisher's email if you can't find the author's.
+# 0: Just use the DEFAULT_FROM email instead.
+USE_PUBLISHER_EMAIL = 0
+
+# 1: Use SMTP_SERVER to send mail.
+# 0: Call /usr/sbin/sendmail to send mail.
+SMTP_SEND = 0
+
+SMTP_SERVER = "smtp.yourisp.net:25"
+AUTHREQUIRED = 0 # if you need to use SMTP AUTH set to 1
+SMTP_USER = ' username'  # for SMTP AUTH, set SMTP username here
+SMTP_PASS = 'password'  # for SMTP AUTH, set SMTP password here
+
+# Set this to add a bonus header to all emails (start with '\n').
+BONUS_HEADER = ''
+# Example: BONUS_HEADER = '\nApproved: joe%bob.org@localhost'
+
+# Set this to override From addresses. Keys are feed URLs, values are new titles.
+OVERRIDE_FROM = {}
+
+# Set this to override the timeout (in seconds) for feed server response
+FEED_TIMEOUT = 60
+
+# Optional CSS styling
+USE_CSS_STYLING = 0
+STYLE_SHEET='h1 {font: 18pt Georgia, "Times New Roman";} body {font: 12pt Arial;} a:link {font: 12pt Arial; font-weight: bold; color: #0000cc} blockquote {font-family: monospace; }  .header { 
background: #e0ecff; border-bottom: solid 4px #c3d9ff; padding: 5px; margin-top: 0px; color: red;} .header a { font-size: 20px; text-decoration: none; } .footer { background: #c3d9ff; border-top: 
solid 4px #c3d9ff; padding: 5px; margin-bottom: 0px; } #entry {border: solid 4px #c3d9ff; } #body { margin-left: 5px; margin-right: 5px; }'
+ 
+# If you have an HTTP Proxy set this in the format 'http://your.proxy.here:8080/'
+PROXY=""
+
+## html2text options ##
+
+# Use Unicode characters instead of their ascii psuedo-replacements
+UNICODE_SNOB = 0
+
+# Put the links after each paragraph instead of at the end.
+LINKS_EACH_PARAGRAPH = 0
+
+# Wrap long lines at position. 0 for no wrapping. (Requires Python 2.3.)
+BODY_WIDTH = 0
diff -r 5ca3ca9f0f0e -r b0bd9616ab14 mail/rss2email/files/r2e.1
--- a/mail/rss2email/files/r2e.1        Fri Jan 19 00:55:52 2007 +0000
+++ b/mail/rss2email/files/r2e.1        Fri Jan 19 00:57:03 2007 +0000
@@ -1,3 +1,78 @@
+.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@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%aaronsw.com@localhost>
 .TH R2E 1a
 .SH NAME
 r2e \- receive RSS feeds by email
diff -r 5ca3ca9f0f0e -r b0bd9616ab14 mail/rss2email/patches/patch-ad
--- a/mail/rss2email/patches/patch-ad   Fri Jan 19 00:55:52 2007 +0000
+++ b/mail/rss2email/patches/patch-ad   Fri Jan 19 00:57:03 2007 +0000
@@ -1,8 +1,30 @@
-$NetBSD: patch-ad,v 1.3 2006/07/01 19:32:40 schmonz Exp $
+$NetBSD: patch-ad,v 1.4 2007/01/19 00:57:03 schmonz Exp $
 
---- rss2email.py.orig  2006-07-01 14:06:47.000000000 -0400
+--- rss2email.py.orig  2007-01-18 18:27:17.000000000 -0500
 +++ rss2email.py
-@@ -228,6 +228,7 @@ import mimify; from StringIO import Stri
+@@ -182,6 +182,11 @@ def send(sender, recipient, subject, bod
+               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
+ 
+@@ -212,8 +217,7 @@ import cPickle as pickle, md5, time, os,
+ unix = 0
+ try:
+       import fcntl
+-      if sys.version.find('sunos') != -1:
+-              unix = 1
++      unix = 1
+ except:
+       pass
+               
+@@ -225,6 +229,7 @@ import mimify; from StringIO import Stri
  import feedparser
  feedparser.USER_AGENT = "rss2email/"+__version__+ " +http://www.aaronsw.com/2002/rss2email/";
  



Home | Main Index | Thread Index | Old Index