Attachment 'wikiutil_20070103_patch.txt'

Download

   1 # HG changeset patch
   2 # User ReimarBauer <R.Bauer@fz-juelich.de>
   3 # Date 1167886419 -3600
   4 # Node ID 0c5bee903be93b811a18b82b85107eae38de60cb
   5 # Parent  3c6f59cafbbe442f90171a8b0680be67eb320a67
   6 add of process_instruction
   7 
   8 diff -r 3c6f59cafbbe -r 0c5bee903be9 MoinMoin/wikiutil.py
   9 --- a/MoinMoin/wikiutil.py	Thu Dec 21 03:39:57 2006 +0100
  10 +++ b/MoinMoin/wikiutil.py	Thu Jan 04 05:53:39 2007 +0100
  11 @@ -1643,3 +1643,17 @@ def checkTicket(request, ticket):
  12      ourticket = createTicket(request, timestamp_str)
  13      return ticket == ourticket
  14  
  15 +def get_process_instruction(text):
  16 +    """Creates dict of process instructions"""
  17 +    lines = text.split('\n')
  18 +    dict = {}
  19 +    dict["processing_instructions"] = False
  20 +    for line in lines:
  21 +        for pi in ("#format", "#refresh", "#redirect", "#deprecated",
  22 +                   "#pragma", "#form", "#acl", "#language"):
  23 +            if line.lower().startswith(pi):
  24 +                value = (line.split(pi))[1]
  25 +                dict[str(pi[1:].lower())] = value.strip()
  26 +                dict["processing_instructions"] = True
  27 +                break
  28 +    return dict

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] (2007-01-02 19:13:36, 13.2 KB) [[attachment:ExportFile_1.png]]
  • [get | view] (2007-01-02 19:27:33, 0.2 KB) [[attachment:example.py]]
  • [get | view] (2007-01-02 19:27:41, 0.0 KB) [[attachment:example.txt]]
  • [get | view] (2007-01-02 19:14:06, 1.4 KB) [[attachment:exportfile-1.6.0-1.py]]
  • [get | view] (2007-01-02 19:27:52, 0.0 KB) [[attachment:exportfile.txt]]
  • [get | view] (2007-01-02 19:13:52, 4.4 KB) [[attachment:text_x_exportfile-1.6.0-1.py]]
  • [get | view] (2007-01-04 04:56:37, 4.0 KB) [[attachment:text_x_exportfile-1.6.0-2.py]]
  • [get | view] (2007-01-04 05:16:14, 3.6 KB) [[attachment:text_x_exportfile-1.6.0-3.py]]
  • [get | view] (2007-01-04 04:57:15, 1.1 KB) [[attachment:wikiutil_20070103_patch.txt]]
  • [get | view] (2007-01-04 05:15:49, 1.6 KB) [[attachment:wikiutil_20070104_patch.txt]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.