index b3a004209380268bd85b4365b6bee171faa3286f..733d233a8f4b4d0fb792009ef30b1ce01e613f7c 100755 (executable)
--- a/scripts/roundup-reminder
+++ b/scripts/roundup-reminder
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
-# $Id: roundup-reminder,v 1.2 2002-05-09 02:52:56 richard Exp $
+# $Id: roundup-reminder,v 1.5 2003-02-06 05:43:49 richard Exp $
'''
Simple script that emails all users of a tracker with the issues that
You will want to modify this script to customise it for your own schema!
'''
-import cStringIO, MimeWriter, smtplib
+import sys, cStringIO, MimeWriter, smtplib
from roundup import instance, date
# open the instance
# generate the email message
message = cStringIO.StringIO()
writer = MimeWriter.MimeWriter(message)
- writer.addheader('Subject', 'Your active %s issues'%db.config.INSTANCE_NAME)
+ writer.addheader('Subject', 'Your active %s issues'%db.config.TRACKER_NAME)
writer.addheader('To', address)
- writer.addheader('From', '%s <%s>'%(db.config.INSTANCE_NAME,
+ writer.addheader('From', '%s <%s>'%(db.config.TRACKER_NAME,
db.config.ADMIN_EMAIL))
- writer.addheader('Reply-To', '%s <%s>'%(db.config.INSTANCE_NAME,
+ writer.addheader('Reply-To', '%s <%s>'%(db.config.TRACKER_NAME,
db.config.ADMIN_EMAIL))
writer.addheader('MIME-Version', '1.0')
- writer.addheader('X-Roundup-Name', db.config.INSTANCE_NAME)
+ writer.addheader('X-Roundup-Name', db.config.TRACKER_NAME)
# start the multipart
part = writer.startmultipartbody('alternative')
%s
and click on "My Issues". Do NOT respond to this message.
-'''%db.config.ISSUE_TRACKER_WEB
+'''%db.config.TRACKER_WEB
# now the HTML one
creation = creation_date.pretty()
if not timeliness_id: timeliness_id = ' '
title = db.issue.get(issue_id, 'title')
- issue_id = '<a href="%sissue%s">%s</a>'%(db.config.ISSUE_TRACKER_WEB,
+ issue_id = '<a href="%sissue%s">%s</a>'%(db.config.TRACKER_WEB,
issue_id, issue_id)
colour = colours.get(timeliness, '')
print >>body, '''<tr%s><td>%s</td><td>%s</td><td>%s</td>
smtp = smtplib.SMTP(db.config.MAILHOST)
smtp.sendmail(db.config.ADMIN_EMAIL, address, message.getvalue())
-#
-# $Log: not supported by cvs2svn $
-# Revision 1.1 2002/04/15 06:37:31 richard
-# Here's a cron-job reminder script that we're going to be using here at
-# ekit. Might be useful for other people. Could use some work making it more
-# general and easier to customise.
-#
-#
-#
+# vim: set filetype=python ts=4 sw=4 et si