ros.py
Go to the documentation of this file.
00001 # Copyright (C) 2012 Google Inc.
00002 #
00003 # Licensed under the Apache License, Version 2.0 (the "License"); you may not
00004 # use this file except in compliance with the License. You may obtain a copy of
00005 # the License at
00006 #
00007 # http://www.apache.org/licenses/LICENSE-2.0
00008 #
00009 # Unless required by applicable law or agreed to in writing, software
00010 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
00011 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
00012 # License for the specific language governing permissions and limitations under
00013 # the License.
00014 
00015 __author__ = 'damonkohler@google.com (Damon Kohler)'
00016 
00017 from docutils import nodes
00018 
00019 
00020 def make_roswiki_link(name, rawtext, text, lineno, inliner, options={}, content=[]):
00021   refuri = 'http://wiki.ros.org/' + text
00022   node = nodes.reference(rawtext, text, refuri=refuri, **options)
00023   return [node], []
00024 
00025 
00026 def make_rosmsg_link(name, rawtext, text, lineno, inliner, options={}, content=[]):
00027   package, message = text.split('/', 1)
00028   refuri = 'http://ros.org/doc/api/%s/html/msg/%s.html' % (package, message)
00029   node = nodes.reference(rawtext, text, refuri=refuri, **options)
00030   return [node], []
00031 
00032 
00033 def make_rossrv_link(name, rawtext, text, lineno, inliner, options={}, content=[]):
00034   package, message = text.split('/', 1)
00035   refuri = 'http://ros.org/doc/api/%s/html/srv/%s.html' % (package, message)
00036   node = nodes.reference(rawtext, text, refuri=refuri, **options)
00037   return [node], []
00038 
00039 
00040 def setup(app):
00041   app.add_role('roswiki', make_roswiki_link)
00042   app.add_role('rosmsg', make_rosmsg_link)
00043   app.add_role('rossrv', make_rossrv_link)
00044 


android_core
Author(s): Damon Kohler
autogenerated on Thu Aug 27 2015 12:11:33