Author: rjek
Date: Tue Sep 26 00:22:02 2006
New Revision: 2966
URL:
http://svn.semichrome.net?rev=2966&view=rev
Log:
Finish off most of the rest of the changemailer infrastructure
Added:
trunk/changemailer/annotate.cgi (with props)
trunk/changemailer/genmail.sh (with props)
trunk/changemailer/sendmail.sh (with props)
Added: trunk/changemailer/annotate.cgi
URL:
http://svn.semichrome.net/trunk/changemailer/annotate.cgi?rev=2966&vi...
==============================================================================
--- trunk/changemailer/annotate.cgi (added)
+++ trunk/changemailer/annotate.cgi Tue Sep 26 00:22:02 2006
@@ -1,0 +1,41 @@
+#!/usr/bin/lua50
+
+local fn = "/home/rjek/.changemail"
+local qs = os.getenv "QUERY_STRING"
+
+if string.find(qs, "data=", 1, 1) then
+ -- update is in here!
+ qs = string.gsub(qs, "^data=", "")
+ qs = string.gsub(qs, "+", " ")
+ qs = string.gsub(qs, "%%([0-9a-fA-F][0-9a-fA-F])", function(x) return
string.char(tonumber(x, 16)) end)
+ cm = io.open(fn, "w")
+ cm:write(qs)
+ cm:close()
+ updated = "<h2>Update accepted.</h2>"
+else
+ updated = ""
+end
+
+local cm = io.open(fn, "r"):read("*a")
+
+io.write "Content-Type: text/html\r\nStatus: 200 Ok\r\n\r\n"
+
+print("<html><head><title>NetSurf Change Mail
Annotator</title></head><body><h1>NetSurf Change Mail
Annotator</h1>" .. updated)
+
+io.write [[
+The contents of the mail will be sent out to the mailing list on
+Sunday at 23:59.
+<p>
+<form action="annotate.cgi" method="get">
+ <textarea name="data" rows="24" cols="80">
+]]
+io.write(cm)
+
+io.write [[</textarea><p>
+ <input type="submit" value="Update">
+</form>
+
+]]
+
+print "</body></html>"
+
Propchange: trunk/changemailer/annotate.cgi
------------------------------------------------------------------------------
svn:executable = *
Added: trunk/changemailer/genmail.sh
URL:
http://svn.semichrome.net/trunk/changemailer/genmail.sh?rev=2966&view...
==============================================================================
--- trunk/changemailer/genmail.sh (added)
+++ trunk/changemailer/genmail.sh Tue Sep 26 00:22:02 2006
@@ -1,0 +1,6 @@
+#!/bin/sh
+
+/home/rjek/ns/genmail.lua /home/rjek/ns/genmail-state | w3m -dump >
/home/rjek/ns/mail.txt
+
+echo "The change mail has been updated. Please update it by
visiting\nhttp://netsurf.rjek.com/annotate.cgi before 12:00 on Tuesday should you wish\nto
make any annotations." | mail -s "New change mail is awaiting annotation"
-a "From: netsurf-dev(a)rjek.com" rjek(a)rjek.com
+
Propchange: trunk/changemailer/genmail.sh
------------------------------------------------------------------------------
svn:executable = *
Added: trunk/changemailer/sendmail.sh
URL:
http://svn.semichrome.net/trunk/changemailer/sendmail.sh?rev=2966&vie...
==============================================================================
--- trunk/changemailer/sendmail.sh (added)
+++ trunk/changemailer/sendmail.sh Tue Sep 26 00:22:02 2006
@@ -1,0 +1,6 @@
+#!/bin/sh
+
+cat /home/rjek/ns/mail.txt | mail -s "Summary of changes to `date -d "-2
days" +%F`" -s "From: netsurf-dev(a)rjek.com" rjek(a)rjek.com
+
+echo "Sorry, too late - the mail has already been sent." >
/home/rjek/ns/mail.txt
+
Propchange: trunk/changemailer/sendmail.sh
------------------------------------------------------------------------------
svn:executable = *