Attachment 'localnames.py'
Download 1 # -*- coding: iso-8859-1 -*-
2 """
3 MoinMoin - localnames action
4
5 This action generates a LocalNames description file.
6
7 You need to define wiki_url_prefix in your moin_config.py
8 file, in order for this to work. For example, if your
9 wiki's URLs all began with "http://wiki.taoriver.net/moin.cgi/",
10 then you would add the following line to moin_config.py:
11
12 wiki_url_prefix = "http://wiki.taoriver.net/moin.cgi/"
13
14 You could then access the LocalNames description at:
15
16 http://wiki.taoriver.net/moin.cgi/?action=localnames
17
18 ...provided that this file is named localnames.py
19
20 @copyright: (c) 2004 by Lion Kimbro <lion@speakeasy.org>
21 @license: GNU GPL, see COPYING for details.
22 """
23
24 from MoinMoin import config
25
26
27 output = """Content-Type: text/plain
28
29 Local Names Description
30 -----------------------
31
32 automatically generated by MoinMoin localnames plug-in
33
34 This page is: %(WIKI_URL_PREFIX)s?action=localnames
35
36 Description follows:
37 ----------------------------------------------------------------------
38
39 http://purl.net/net/localnames/
40
41 NamesTable
42 this %(WIKI_URL_PREFIX)s?action=localnames
43
44 NamesListPattern %(WIKI_URL_PREFIX)s$NAME
45 NamesList %(WIKI_URL_PREFIX)sTitleIndex?action=titleindex
46
47 LastResortNamePattern %(WIKI_URL_PREFIX)s$NAME
48
49 KeyValue ACCEPT-ADDITION-BY-FORM %(WIKI_URL_PREFIX)s$NAME
50
51 """ % { "WIKI_URL_PREFIX": config.wiki_url_prefix }
52
53 def execute(pagename, request):
54 request.write( output )
55 request.no_closing_html_code = True
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.