--- text_moin_wiki.py-orig	2009-08-20 21:40:10.000000000 +0200
+++ text_moin_wiki.py	2009-08-25 23:09:41.000000000 +0200
@@ -301,6 +301,10 @@
     `  # teletype (using a backtick) on
     (?P<tt_bt_text>.*?)  # capture the text
     `  # off
+)|(?P<isbn>
+    ISBN[: ]?([0-9- xX]{10,14})
+)|(?P<asin>
+    ASIN[: ]?(\w{10,10})
 )|(?P<interwiki>
     %(interwiki_rule)s  # OtherWiki:PageName
 )|(?P<word>  # must come AFTER interwiki rule!
@@ -912,6 +916,19 @@
     _link_desc_repl = _link_repl
     _link_params_repl = _link_repl
 
+    def _isbn_repl(self, word, groups):
+        """Handle ISBN numbers."""
+        raw_nr = re.sub(r'ISBN[: ]+', '', word.strip())
+        raw_nr = re.sub(r'-', '', raw_nr)
+        return (self.formatter.url(1, ('http://www.amazon.de/dp/%s/?tag=larpwiki-21') % (raw_nr)) +
+                self.formatter.text("ISBN " + raw_nr) + self.formatter.url(0))
+    #_asin_repl = _isbn_repl
+
+    def _asin_repl(self, word, groups):
+        """Handle Amazons's ASIN numbers."""
+        raw_nr = re.sub(r'ASIN[: ]+', '', word)
+        return (self.formatter.url(1, ('http://www.amazon.de/dp/%s/?tag=larpwiki-21') % (raw_nr)) + self.formatter.text("ASIN " + raw_nr) + self.formatter.url(0))
+
     def _email_repl(self, word, groups):
         """Handle email addresses (without a leading mailto:)."""
         return (self.formatter.url(1, "mailto:%s" % word, css='mailto') +
