Edit Diskussion History Attachments

attachment:isbn.patch of Admin/Patches

Attachment 'isbn.patch'

Download

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

New Attachment

File to upload
Rename to
Overwrite existing attachment of same name
Type: LARP

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2010-02-16 00:14:49, 0.7 KB) [[attachment:disable-spell-check.patch]]
  • [get | view] (2010-07-16 01:10:04, 1.4 KB) [[attachment:isbn.patch]]
  • [get | view] (2010-02-16 00:19:52, 0.6 KB) [[attachment:sitemap.patch]]
  • [get | view] (2010-02-16 00:20:42, 8.1 KB) [[attachment:stats.patch]]
  • [get | view] (2010-02-16 00:20:50, 0.7 KB) [[attachment:wsgiapp.patch]]
  • [get | view] (2010-02-16 00:20:57, 1.6 KB) [[attachment:xapian.patch]]
 All files | Selected Files: delete move to page copy to page