Attachment 'Bug.py'
Download 1 """ Debian bug macro
2
3 Usage::
4
5 [[Bug(number)]]
6
7 @copyright: 2007 by Nir Soffer <nirs@freeshell.org>
8 @license: GNU GPL
9 """
10 from MoinMoin.wikiutil import escape
11
12 Dependencies = [] # static
13
14 def execute(macro, args):
15 if args is None or args.strip() == '':
16 bug = '?' # hint for editor
17 else:
18 bug = args.split(',', 1)[0].strip()
19
20 url = 'http://bugs.debian.org/' + bug
21 # formatter.url does not escape the title
22 title = "Debian bug #" + escape(bug, 1)
23 formatter = macro.formatter
24
25 return ''.join([formatter.url(1, url, type='www', title=title),
26 formatter.text('#' + bug),
27 formatter.url(0)])
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.