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.You are not allowed to attach a file to this page.