Attachment 'text_x_sorttext-1.6.0-2.py'
Download 1 #-*- coding: utf-8 -*-
2 """
3 sorttext to sort one level of input
4 ===================================
5
6 This parser is used to sort text lines
7
8
9 Install
10 -------
11
12 remove the version number
13 Put it in your wiki/data/plugin/parser/
14
15
16 Example
17 -------
18
19 {{{
20 #!sorttext
21 * B
22 * A
23 * D
24 * C
25 }}}
26
27
28 Result::
29
30 * A
31 * B
32 * C
33 * D
34
35 Compatibility
36 --------------
37 Tested with release 1.6
38
39
40 Legal
41 -----
42 @copyright © 2005 MoinMoin:ReimarBauer
43
44 This program is free software; you can redistribute it and/or modify
45 it under the terms of the GNU General Public License as published by
46 the Free Software Foundation; either version 2 of the License, or
47 (at your option) any later version.
48
49 This program is distributed in the hope that it will be useful,
50 but WITHOUT ANY WARRANTY; without even the implied warranty of
51 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
52 GNU General Public License for more details.
53
54 You should have received a copy of the GNU General Public License
55 along with this program; if not, write to the Free Software
56 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
57 """
58
59
60
61 Dependencies = []
62 from MoinMoin.parser import text_moin_wiki as wiki
63 class Parser:
64
65 def __init__(self, raw, request, **kw):
66 self.raw = raw
67 self.request = request
68 self.form = request.form
69 self._ = request.getText
70
71
72 def format(self, formatter):
73
74 Dict = {}
75 raw = self.raw.split('\n')
76 raw.sort()
77
78 wikiizer = wiki.Parser('\n'.join(raw), self.request)
79 wikiizer.format(formatter)
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.