The unified diff between revisions [2531d294..] and [0b849689..] is displayed below. It can also be downloaded as a raw diff.

#
#
# patch "poetweb.py"
#  from [eee7ff20b7c61a2fa7d7d1eba4ec741a343cf535]
#    to [024693486e0ca4cae14590fd8483f3780293b2cd]
#
# patch "syllables.py"
#  from [77a91fa93c05a98c5b8efb24a081e921b42d59a6]
#    to [d4448d1d5ee78feb8d2af3a1ebbdbea33aaf4154]
#
# patch "templates/haiku.html"
#  from [e80dcebad4e65c878464de10e2fac0cad318bf55]
#    to [7e6b5dc5f4f1ae18bccec9332b5782ae0307fa30]
#
# patch "web.py"
#  from [5a70283ce26a8d90373c31b3c2eb35cd39e4d7a5]
#    to [926f3f99a3ce2dd96f9c1ba3f16538961f46f3f2]
#
============================================================
--- poetweb.py	eee7ff20b7c61a2fa7d7d1eba4ec741a343cf535
+++ poetweb.py	024693486e0ca4cae14590fd8483f3780293b2cd
@@ -29,7 +29,8 @@ urls = (
 }

 urls = (
-    '/(' + site_id_re + ')/(' + username_re + ')' + '/haiku', 'view',
+    '.*/(' + site_id_re + ')/(' + username_re + ')' + '/haiku', 'view',
+    '.*', 'testthing'
 )

 def gen_haiku(rss_uri):
@@ -97,10 +98,14 @@ class view:
         attempts, haiku = gen_haiku(uri)
         renderer.render("haiku.html",
                         attempts=attempts,
-                        haiku=(' '.join(t) for t in haiku),
+                        haiku=[' '.join(t) for t in haiku],
                         page_title="your haiku",
                         username=username)

+class testthing:
+    def GET(self):
+        print "Hello, world: this is the catch-all page"
+
 if __name__ == '__main__':
     web.internalerror = web.debugerror
     web.run(urls, web.reloader)
============================================================
--- syllables.py	77a91fa93c05a98c5b8efb24a081e921b42d59a6
+++ syllables.py	d4448d1d5ee78feb8d2af3a1ebbdbea33aaf4154
@@ -18,7 +18,7 @@ class Syllables:
         return rv

     def lookup(self, token):
-        # note: a token may (due to upwriting) be one or more words.
+        # note: a token may comprise one or more words.
         # so split on ' ' before doing the lookup, then just do a sum
         return sum(map(self.__lookup, token.split(' ')))

============================================================
--- templates/haiku.html	e80dcebad4e65c878464de10e2fac0cad318bf55
+++ templates/haiku.html	7e6b5dc5f4f1ae18bccec9332b5782ae0307fa30
@@ -12,54 +12,27 @@ Sorry, something went wrong generating y
 <p align="center">
 	Your freshly generated Haiku is:
 </p>
-

 <form action="http://grahame.angrygoats.net/lj-haiku/index.psp" method="post">
-<table border="1" cellspacing="0" cellpadding="2" align="center">
-	<tr>
-		<td align="left" colspan="2" bgcolor="#303088">
-			<font color="#FFFFFF"><b>LiveJournal Haiku 2!</b></font>
-		</td>
-	</tr>
-	<tr>
-		<td bgcolor="#303088">
-      		<font color="#FFFFFF">Your name:</font>
-    	</td>
-    	<td align="right" bgcolor="#DDDDAA">
-      		<font color="#303088">$username</font>
-    	</td>
-  	</tr>
-  	<tr>
-    	<td bgcolor="#303088">
-      		<font color="#FFFFFF">Your haiku:</font>
-		</td>
-		<td align="right" bgcolor="#DDDDAA">
-			<font color="#303088">
-				#for line in $haiku
-				$line<br />
-				#end for
-			</font>
-		</td>
-	</tr>
-    <tr>
-    	<td bgcolor="#303088">
-			<font color="#FFFFFF">Username:</font>
-		</td>
-		<td bgcolor="#DDDDAA">
-			<input type="text" name="haiku_username" value="$username">
-      	</td>
-    </tr>
-    <tr>
-		<td bgcolor="#303088" align="center" colspan="2">
-			<input type="submit" value="What's my Haiku?">
-		</td>
-    </tr>
-    <tr>
-      	<td align="center" colspan="2">
-			<font size="-1"><a href="http://www.livejournal.com/users/grahame/">Created by <img src="http://stat.livejournal.com/img/userinfo.gif" style='vertical-align:bottom;border:0;'>Grahame</a></font>
-			<input value="grahame" type="hidden" name="haiku_referrer">
-      	</td>
-    </tr>
+<table align="center" border="0" bgcolor="#DDDDFF" style="border: 1px solid black;">
+<tr><th>LJ-Haiku<sup>2</sup> for $username</th></tr>
+<tr><td>
+<blockquote align="right" style="text-align:right;border-right:1px solid #808080; padding:5px;">
+	#for line in $haiku
+	$line<br />
+	#end for
+</blockquote>
+</td></tr>
+<tr><td align="center">
+<input type="text" size=8 name="haiku_username" value="$username" /> @
+<select name="server">
+	<option selected value="livejournal.com">LJ</option>
+	<option value="pick">Other</option>
+</select>
+<input value="$username" type="hidden" name="haiku_referrer" />
+</td></tr>
+<tr><td align="center"><input type="submit" value="What's my Haiku?"></td></tr>
+<tr><td align="center" bgcolor="#CCCCCC"><small><a href="http://www.livejournal.com/users/grahame/">Created by Grahame</a></small></td></tr>
 </table>
 </form>

============================================================
--- web.py	5a70283ce26a8d90373c31b3c2eb35cd39e4d7a5
+++ web.py	926f3f99a3ce2dd96f9c1ba3f16538961f46f3f2
@@ -71,7 +71,7 @@ def rstrips(text, remove):
 def rstrips(text, remove):
     """removes the string `remove` from the right of `text`"""
     return _strips('r', text, remove)
-def lstrips(a, b):
+def lstrips(text, remove):
     """removes the string `remove` from the right of `text`"""
     return _strips('l', text, remove)
 def strips(a, b):