Attachment 'sisterindex.py'
Download 1 # -*- coding: iso-8859-1 -*-
2 """
3 MoinMoin - "sisterindex" action
4
5 This action generates a list of existing pages for implemeting
6 SisterSites. See http://www.eekim.com/cgi-bin/wiki.pl?SisterSites
7
8 @license: GNU GPL, see COPYING for details.
9 """
10
11 from MoinMoin import config, util, wikiutil
12
13 def execute(pagename, request):
14 form = request.form
15 request.http_headers(
16 ["Content-Type: text/plain; charset=%s" % (config.charset,)])
17
18 # Get list of user readable pages
19 pages = request.rootpage.getPageList()
20 pages.sort()
21
22 # Build the base URL
23 script = request.getScriptname()
24 if request.is_ssl:
25 scheme = 'https'
26 else:
27 scheme = 'http'
28 base = '%s://%s%s/' % (scheme, request.http_host, script)
29
30 # Write out lines that start with the page URL
31 for name in pages:
32 url = base + wikiutil.quoteWikinameURL(name)
33 line = '%s %s\r\n' % (url, name)
34 request.write(line)
35
36 raise util.MoinMoinNoFooter
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.