00001
00002 """
00003 ROS - Glossary
00004
00005 <<Glossary(term)>>
00006 Will produce this:
00007
00008 <<Anchor(term)>>[#term|term]:
00009
00010 @copyright: 2012 Willow Garage,
00011 William Woodall <wwoodall@willowgarage.com>
00012 @license: BSD
00013 """
00014
00015 from __future__ import print_function
00016
00017 import urllib
00018
00019 Dependencies = []
00020
00021
00022 def execute(macro, args):
00023 if args:
00024 term = str(args)
00025 html = '<span class="anchor" id="{0}"</span><a href="#{0}">{1}</a>:'
00026 html = html.format(urllib.quote(term.replace(" ", "_")), term)
00027 return html
00028 else:
00029 return '`<<Anchor()>>` must be called with an argument.'
00030