Launchpad Bug Macro for the Wiki

Dustin Kirkland kirkland at canonical.com
Wed May 28 02:32:33 UTC 2008


Does the Wiki have a macro for linking to Launchpad Bugs?

Something that you could use in Wiki markup similar to other macros
described here:
https://wiki.ubuntu.com/HelpOnMacros
[[Bug(1)]]

And have it render the appropriate Launchpad bug marked up as a hyperlink:
<a href=http://bugs.launchpad.net/bugs/1>Bug #1</a>

I think the following code will do it, if someone could save this into
data/plugins/macro/Bug.py:
Dependencies = []
def execute(macro, arg):
    return macro.formatter.text("<a
href=http://bugs.launchpad.net/bugs/%s>Bug #%s</a>]" % (arg, arg))

Thanks,
-- 
:-Dustin




More information about the ubuntu-doc mailing list