summaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authorschmonz <schmonz>2004-06-27 23:00:34 +0000
committerschmonz <schmonz>2004-06-27 23:00:34 +0000
commitd081613dbd92af33264130a6919df2c6c765ecd7 (patch)
treec016601a02f233fab12970f1c22f7ecc8ea7b5b6 /mail
parent4b0ec64ec5cf888b8bc5944905543e93f4453345 (diff)
downloadpkgsrc-d081613dbd92af33264130a6919df2c6c765ecd7.tar.gz
Import rss2email 2.32.
rss2email is a simple Python script that lets you subscribe to a list of XML newsfeeds and get new items sent to you by email. The man page and sample config file are from the Debian package.
Diffstat (limited to 'mail')
-rw-r--r--mail/rss2email/DESCR2
-rw-r--r--mail/rss2email/Makefile47
-rw-r--r--mail/rss2email/PLIST8
-rw-r--r--mail/rss2email/distinfo11
-rw-r--r--mail/rss2email/patches/patch-aa32
-rw-r--r--mail/rss2email/patches/patch-ab100
-rw-r--r--mail/rss2email/patches/patch-ac13
7 files changed, 213 insertions, 0 deletions
diff --git a/mail/rss2email/DESCR b/mail/rss2email/DESCR
new file mode 100644
index 00000000000..003232a148e
--- /dev/null
+++ b/mail/rss2email/DESCR
@@ -0,0 +1,2 @@
+rss2email is a simple Python script that lets you subscribe to a
+list of XML newsfeeds and get new items sent to you by email.
diff --git a/mail/rss2email/Makefile b/mail/rss2email/Makefile
new file mode 100644
index 00000000000..00d23c9569e
--- /dev/null
+++ b/mail/rss2email/Makefile
@@ -0,0 +1,47 @@
+# $NetBSD: Makefile,v 1.1.1.1 2004/06/27 23:00:34 schmonz Exp $
+#
+
+DISTNAME= rss2email-2.32
+CATEGORIES= mail
+MASTER_SITES= ${HOMEPAGE}
+EXTRACT_SUFX= .py
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX} r2e html2text-1.0.py
+
+MAINTAINER= schmonz@NetBSD.org
+HOMEPAGE= http://www.aaronsw.com/2002/rss2email/
+COMMENT= Get RSS feeds emailed to you
+
+DEPENDS+= ${PYPKGPREFIX}-feedparser-[0-9]*:../../textproc/py-feedparser
+
+SITES_html2text-1.0.py= http://www.aaronsw.com/2002/html2text/
+
+DIST_SUBDIR= ${PKGNAME_NOREV}
+
+NO_BUILD= # defined
+USE_BUILDLINK3= yes
+PYTHON_PATCH_SCRIPTS= *.py
+
+SUBST_CLASSES+= bin
+SUBST_STAGE.bin= do-configure
+SUBST_FILES.bin= r2e
+SUBST_SED.bin= -e 's|@PREFIX@|${PREFIX}|g'
+SUBST_SED.bin+= -e 's|@PYTHONBIN@|${PYTHONBIN}|g'
+
+SHAREDIR= ${PREFIX}/share/rss2email
+EGDIR= ${PREFIX}/share/examples/rss2email
+
+do-extract:
+ ${CP} -R ${DISTDIR}/${DIST_SUBDIR} ${WRKSRC}
+
+do-install:
+ cd ${WRKSRC} && \
+ ${INSTALL_SCRIPT_DIR} ${SHAREDIR}; \
+ ${INSTALL_SCRIPT} rss2email-2.32.py ${SHAREDIR}/rss2email.py; \
+ ${INSTALL_SCRIPT} html2text-1.0.py ${SHAREDIR}/html2text.py; \
+ ${INSTALL_DATA_DIR} ${EGDIR}; \
+ ${INSTALL_DATA} config.py ${EGDIR}; \
+ ${INSTALL_MAN} r2e.1 ${PREFIX}/man/man1; \
+ ${INSTALL_SCRIPT} r2e ${PREFIX}/bin
+
+.include "../../lang/python/application.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/mail/rss2email/PLIST b/mail/rss2email/PLIST
new file mode 100644
index 00000000000..db0f59138c0
--- /dev/null
+++ b/mail/rss2email/PLIST
@@ -0,0 +1,8 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2004/06/27 23:00:34 schmonz Exp $
+bin/r2e
+man/man1/r2e.1
+share/examples/rss2email/config.py
+share/rss2email/html2text.py
+share/rss2email/rss2email.py
+@dirrm share/rss2email
+@dirrm share/examples/rss2email
diff --git a/mail/rss2email/distinfo b/mail/rss2email/distinfo
new file mode 100644
index 00000000000..a5308041ae9
--- /dev/null
+++ b/mail/rss2email/distinfo
@@ -0,0 +1,11 @@
+$NetBSD: distinfo,v 1.1.1.1 2004/06/27 23:00:34 schmonz Exp $
+
+SHA1 (rss2email-2.32/rss2email-2.32.py) = 33ccc61bf252bc074937298dc332321b75ef7967
+Size (rss2email-2.32/rss2email-2.32.py) = 7705 bytes
+SHA1 (rss2email-2.32/r2e) = 11eb7b878c30fac548d56aed90c1503143583e3d
+Size (rss2email-2.32/r2e) = 60 bytes
+SHA1 (rss2email-2.32/html2text-1.0.py) = 30c632fba425e49283fd24b149781c313cc003b9
+Size (rss2email-2.32/html2text-1.0.py) = 7334 bytes
+SHA1 (patch-aa) = e990985d2318e5dafbc53a59cafafe2fa4e8ba6a
+SHA1 (patch-ab) = a01934c5e471093a8a453789c0a691f8d4eebaa4
+SHA1 (patch-ac) = e941a9d75580396fc70fd3808a19b99a77e51bec
diff --git a/mail/rss2email/patches/patch-aa b/mail/rss2email/patches/patch-aa
new file mode 100644
index 00000000000..09d36a9d840
--- /dev/null
+++ b/mail/rss2email/patches/patch-aa
@@ -0,0 +1,32 @@
+$NetBSD: patch-aa,v 1.1.1.1 2004/06/27 23:00:34 schmonz Exp $
+
+--- config.py.orig 2004-06-27 17:49:51.000000000 -0400
++++ config.py
+@@ -0,0 +1,27 @@
++# The email address messages are from by default:
++DEFAULT_FROM = "bozo@dev.null"
++
++# 1: Only use the DEFAULT_FROM address.
++# 0: Use the email address specified by the feed, when possible.
++FORCE_FROM = 0
++
++# 1: Receive one email per post
++# 0: Receive an email every time a post changes
++TRUST_GUID = 1
++
++# 1: Generate Date header based on item's date, when possible
++# 0: Generate Date header based on time sent
++DATE_HEADER = 0
++
++# 1: Treat the contents of <description> as HTML
++# 0: Send the contents of <description> as is, without conversion
++TREAT_DESCRIPTION_AS_HTML = 1
++
++# 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
diff --git a/mail/rss2email/patches/patch-ab b/mail/rss2email/patches/patch-ab
new file mode 100644
index 00000000000..84a31c7ca31
--- /dev/null
+++ b/mail/rss2email/patches/patch-ab
@@ -0,0 +1,100 @@
+$NetBSD: patch-ab,v 1.1.1.1 2004/06/27 23:00:35 schmonz Exp $
+
+--- r2e.1.orig 2004-06-27 17:48:05.000000000 -0400
++++ r2e.1
+@@ -0,0 +1,95 @@
++.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]
++Scan the feeds and send emails for new items. This can be 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, as otherwise it would send every
++available story.
++.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 following configuration variables can be set in 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.
++.TP
++.B DEFAULT_FROM
++The email address messages are from by default, if the rss feed does not
++specify an email address. The default valus is "bozo@dev.null"
++.TP
++.B FORCE_FROM
++If set, the DEFAULT_FROM address will always be used, otherwise use
++the email address specified by the feed, when possible.
++.TP
++.B TRUST_GUID
++If set, receive one email per post. Otherwise, a new email will be sent
++each time a post changes.
++.TP
++.B DATE_HEADER
++If set, the mail's date will be set to the date the item was posted, if
++possible. Otherwise, the date will be based on the time the email is sent.
++.TP
++.B TREAT_DESCRIPTION_AS_HTML
++Controls whether to treat the contents of a post as html. If set, the
++contents are assumed to be html, and will be converted to plain text. If
++not set, the contents will be assumed to be text, and left alone.
++.TP
++.B QP_REQUIRED
++If set, do a quoted printible conversion; otherwise send message in 8 bits.
++.TP
++.B VERBOSE
++If set, feeds are named as they're processed.
++.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 <me@aaronsw.com>
diff --git a/mail/rss2email/patches/patch-ac b/mail/rss2email/patches/patch-ac
new file mode 100644
index 00000000000..5fef6341ab3
--- /dev/null
+++ b/mail/rss2email/patches/patch-ac
@@ -0,0 +1,13 @@
+$NetBSD: patch-ac,v 1.1.1.1 2004/06/27 23:00:34 schmonz Exp $
+
+--- r2e.orig 2004-06-27 17:47:39.000000000 -0400
++++ r2e
+@@ -1,3 +1,7 @@
+ #!/bin/sh
++set -e
++if [ ! -d ~/.rss2email ]; then
++ mkdir ~/.rss2email
++fi
+ cd ~/.rss2email/
+-python rss2email.py feeds.dat $*
++@PYTHONBIN@ @PREFIX@/share/rss2email/rss2email.py feeds.dat $*