├── .gitignore ├── MANIFEST.in ├── doc ├── ros.png ├── index.rst ├── Makefile └── conf.py ├── rosdoc.yaml ├── src └── rosdoc_lite │ ├── templates │ ├── footer.html │ ├── manifest.html │ ├── landing.template │ ├── header.html │ ├── msg-index.template │ ├── action.template │ ├── msg.template │ ├── styles.css │ ├── msg-styles.css │ ├── doxygen.css │ └── doxy.template │ ├── python_paths.py │ ├── sphinxenator.py │ ├── epyenator.py │ ├── landing_page.py │ ├── rdcore.py │ ├── msgenator.py │ ├── __init__.py │ └── doxygenator.py ├── mainpage.dox ├── CMakeLists.txt ├── setup.py ├── README.md ├── scripts └── rosdoc_lite ├── package.xml ├── test └── test_doxygenator.py └── CHANGELOG.rst /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | recursive-include templates * 2 | -------------------------------------------------------------------------------- /doc/ros.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-infrastructure/rosdoc_lite/HEAD/doc/ros.png -------------------------------------------------------------------------------- /rosdoc.yaml: -------------------------------------------------------------------------------- 1 | - builder: sphinx 2 | sphinx_root_dir: doc 3 | required: True 4 | -------------------------------------------------------------------------------- /src/rosdoc_lite/templates/footer.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | $projectlink
5 | Author(s): $author
6 | autogenerated on $datetime 7 |
8 | 9 | 10 | -------------------------------------------------------------------------------- /mainpage.dox: -------------------------------------------------------------------------------- 1 | /** 2 | \mainpage 3 | \htmlinclude manifest.html 4 | 5 | \b rosdoc is a tool responsible for all auto-generated ROS 6 | documentation. The code API of rosdoc is not stable, so it is 7 | not recommended for use in other tools. 8 | 9 | 10 | */ 11 | -------------------------------------------------------------------------------- /src/rosdoc_lite/templates/manifest.html: -------------------------------------------------------------------------------- 1 |
2 |

$package$brief

3 |

$description

4 |

5 |

8 |

9 | 10 |
11 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.0.2) 2 | project(rosdoc_lite) 3 | find_package(catkin REQUIRED) 4 | 5 | catkin_package() 6 | 7 | install(FILES DESTINATION ${CATKIN_PROJECT_SHARE_DESTINATION}/cmake) 8 | 9 | catkin_python_setup() 10 | 11 | if(CATKIN_ENABLE_TESTING) 12 | catkin_add_nosetests(test/test_doxygenator.py) 13 | endif() 14 | 15 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from setuptools import setup 4 | from catkin_pkg.python_setup import generate_distutils_setup 5 | 6 | d = generate_distutils_setup( 7 | packages=['rosdoc_lite'], 8 | package_dir={'': 'src'}, 9 | scripts=['scripts/rosdoc_lite'], 10 | package_data={'rosdoc_lite': ['templates/*']} 11 | ) 12 | 13 | setup(**d) 14 | -------------------------------------------------------------------------------- /src/rosdoc_lite/templates/landing.template: -------------------------------------------------------------------------------- 1 | 2 | 3 | $package Documentation 4 | 5 | 6 | 7 | 8 |
9 |

$package API Documentation

10 | 11 | $links 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/rosdoc_lite/templates/header.html: -------------------------------------------------------------------------------- 1 | 2 | $package: $title 3 | 4 | 5 | 6 | $search 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Overview 2 | ======== 3 | 4 | [rosdoc_lite](http://wiki.ros.org/rosdoc_lite) is a 5 | [ROS](http://www.ros.org) package that wraps documentation tools like 6 | [doxygen](http://www.doxygen.org), [sphinx](http://sphinx-doc.org), 7 | and [epydoc](http://epydoc.sourceforge.net/), for convenient 8 | generation of ROS package documentation. 9 | 10 | It also generates online documentation for the ROS wiki. 11 | 12 | This package provides only the `rosdoc_lite` command. It has no supported 13 | Python or C++ API. 14 | -------------------------------------------------------------------------------- /src/rosdoc_lite/templates/msg-index.template: -------------------------------------------------------------------------------- 1 | 2 | 3 | %(package)s Msg/Srv Documentation 4 | 5 | 6 | 7 | 8 |
9 | 10 |

%(package)s Msg/Srv Documentation

11 | 12 |
13 | See also: 14 | 15 | 19 | 20 |
21 | 22 | %(msg_list)s 23 | %(srv_list)s 24 | %(action_list)s 25 | 26 | 27 | 28 | 29 |
30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /doc/index.rst: -------------------------------------------------------------------------------- 1 | .. rosdoc_lite documentation master file, created by 2 | sphinx-quickstart on Thu Oct 18 15:26:46 2012. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | rosdoc_lite 7 | ======================================= 8 | **rosdoc_lite** is used to generate Doxygen, Epydoc, or Sphinx documentation on a ROS package. 9 | 10 | For detailed documentation of rosdoc_lite and its use, please see `rosdoc_lite Documentation `_. 11 | 12 | The code API of rosdoc_lite should **not** be used as it is an internal library that is frequently changed. 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/rosdoc_lite/templates/action.template: -------------------------------------------------------------------------------- 1 | 2 | 3 | %(name)s Documentation 4 | 5 | 6 | 7 | 8 |
9 | 10 |

%(package)s/%(base_type)s %(type)s

11 | 12 |
13 | 14 |

File: %(name)s.%(ext)s

15 | 16 |

Action Definition

17 | 18 |
19 | %(raw_text)s 20 |
21 | 22 | 23 |
24 | 25 | 26 | 27 |
28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/rosdoc_lite/templates/msg.template: -------------------------------------------------------------------------------- 1 | 2 | 3 | %(name)s Documentation 4 | 5 | 6 | 7 | 8 |
9 | 10 |

%(package)s/%(base_type)s %(type)s

11 | 12 |
13 | 14 |

File: %(name)s.%(ext)s

15 | 16 |

Raw Message Definition

17 |
18 | %(raw_text)s 19 |
20 | 21 |

Compact Message Definition

22 |
23 | %(fancy_text)s 24 |
25 | 26 | 27 |
28 | 29 | 30 | 31 |
32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /src/rosdoc_lite/templates/styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: Arial, Helvetica, sans-serif; 3 | } 4 | a { 5 | text-decoration: none; 6 | color: #2b7fcf; 7 | } 8 | a:link { } 9 | a:hover, a:focus { 10 | text-decoration: underline; 11 | } 12 | 13 | h3 { 14 | font-size: 1.1em; 15 | line-height: 1.1em; 16 | margin-top: 0.769em; 17 | border-bottom-width: 1px; 18 | border-bottom-style: dotted; 19 | border-bottom-color: #545454; 20 | padding-bottom: 3px; 21 | margin-bottom: 5px; 22 | } 23 | 24 | .packages { 25 | margin-top: 10px; 26 | } 27 | .nav-link { 28 | font-size: 0.9em; 29 | } 30 | .subgroup { 31 | margin: 5px 10px 10px -15px; 32 | } 33 | .greybox { 34 | padding: 1px; 35 | background-color: #eee; 36 | border: 1px solid #333; 37 | } 38 | hr { 39 | width: 100%; 40 | height: 1px; 41 | border-top: 0; 42 | color: #000; 43 | } 44 | .fancy-msg { 45 | width: auto; 46 | border: 1px solid #333; 47 | padding: 10px; 48 | } 49 | 50 | .raw-msg { 51 | font-family: monospace; 52 | width: auto; 53 | padding: 10px; 54 | border: 1px solid #333; 55 | } 56 | -------------------------------------------------------------------------------- /src/rosdoc_lite/templates/msg-styles.css: -------------------------------------------------------------------------------- 1 | html { 2 | background: #333; 3 | color: #333; 4 | font-family: 'Palatino', serif; 5 | font-size: 18px; 6 | line-height: 24px; 7 | text-align: center; 8 | padding: 0px 50px 0px 50px; 9 | } 10 | #container { 11 | background: white; 12 | margin: 25px auto 100px auto; 13 | padding: 50px 50px; 14 | text-align: left; 15 | } 16 | a { 17 | text-decoration: none; 18 | } 19 | a:hover { 20 | text-decoration: underline; 21 | } 22 | .msg-title { 23 | margin-bottom: 40px; 24 | border-bottom: 1px solid #333; 25 | padding: 10px 10px 10px 0px; 26 | } 27 | .filename { 28 | padding: 5px; 29 | background-color: #eee; 30 | border: 1px solid #333; 31 | } 32 | .fancy-msg { 33 | width: auto; 34 | font-size: 14px; 35 | line-height: 16px; 36 | border: 1px solid #333; 37 | padding: 10px; 38 | margin-bottom: 20px; 39 | } 40 | 41 | .raw-msg { 42 | font-family: monospace; 43 | width: auto; 44 | font-size: 14px; 45 | line-height: 16px; 46 | padding: 5px; 47 | border: 1px solid #333; 48 | margin-bottom: 20px; 49 | } 50 | -------------------------------------------------------------------------------- /scripts/rosdoc_lite: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # Software License Agreement (BSD License) 3 | # 4 | # Copyright (c) 2008, Willow Garage, Inc. 5 | # All rights reserved. 6 | # 7 | # Redistribution and use in source and binary forms, with or without 8 | # modification, are permitted provided that the following conditions 9 | # are met: 10 | # 11 | # * Redistributions of source code must retain the above copyright 12 | # notice, this list of conditions and the following disclaimer. 13 | # * Redistributions in binary form must reproduce the above 14 | # copyright notice, this list of conditions and the following 15 | # disclaimer in the documentation and/or other materials provided 16 | # with the distribution. 17 | # * Neither the name of Willow Garage, Inc. nor the names of its 18 | # contributors may be used to endorse or promote products derived 19 | # from this software without specific prior written permission. 20 | # 21 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 24 | # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 25 | # COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 26 | # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 27 | # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 29 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 31 | # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | # POSSIBILITY OF SUCH DAMAGE. 33 | # 34 | # Revision $Id: rosdoc 11469 2010-10-12 00:56:25Z kwc $ 35 | 36 | import rosdoc_lite 37 | rosdoc_lite.main() 38 | -------------------------------------------------------------------------------- /package.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | rosdoc_lite 7 | 0.2.11 8 | 9 | This ROS package wraps documentation tools like doxygen, sphinx, 10 | and epydoc, making it convenient to generate ROS package 11 | documentation. 12 | 13 | It also generates online documentation for the ROS wiki. 14 | 15 | Ken Conley 16 | Eitan Marder-Eppstein 17 | Jack O'Quin 18 | BSD 19 | http://wiki.ros.org/rosdoc_lite 20 | https://github.com/ros-infrastructure/rosdoc_lite.git 21 | https://github.com/ros-infrastructure/rosdoc_lite/issues 22 | 23 | catkin 24 | python-setuptools 25 | python3-setuptools 26 | 27 | doxygen 28 | epydoc 29 | genmsg 30 | graphviz 31 | python-catkin-pkg-modules 32 | python3-catkin-pkg-modules 33 | python-kitchen 34 | python3-kitchen 35 | python-rospkg-modules 36 | python3-rospkg-modules 37 | python-sphinx 38 | python3-sphinx 39 | python-yaml 40 | python3-yaml 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /src/rosdoc_lite/python_paths.py: -------------------------------------------------------------------------------- 1 | # Software License Agreement (BSD License) 2 | # 3 | # Copyright (c) 2008, Willow Garage, Inc. 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions 8 | # are met: 9 | # 10 | # * Redistributions of source code must retain the above copyright 11 | # notice, this list of conditions and the following disclaimer. 12 | # * Redistributions in binary form must reproduce the above 13 | # copyright notice, this list of conditions and the following 14 | # disclaimer in the documentation and/or other materials provided 15 | # with the distribution. 16 | # * Neither the name of Willow Garage, Inc. nor the names of its 17 | # contributors may be used to endorse or promote products derived 18 | # from this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 23 | # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 24 | # COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 25 | # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 26 | # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 27 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 28 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 30 | # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | # POSSIBILITY OF SUCH DAMAGE. 32 | # 33 | 34 | from __future__ import print_function 35 | import os 36 | 37 | 38 | def get_non_catkin_depends(package, rospack): 39 | vals = rospack.get_depends(package, implicit=True) 40 | return [v for v in vals if not rospack.get_manifest(v).is_catkin] 41 | 42 | 43 | def append_package_paths(manifest, paths, pkg_dir): 44 | """ 45 | Added paths for package to paths 46 | :param manifest_: package manifest, ``Manifest`` 47 | :param pkg_dir: package's filesystem directory path, ``str`` 48 | :param paths: list of paths, ``[str]`` 49 | """ 50 | exports = manifest.get_export('python', 'path') 51 | if exports: 52 | for export in exports: 53 | if ':' in export: 54 | export = export.split(':') 55 | else: 56 | export = [export] 57 | for e in export: 58 | paths.append(e.replace('${prefix}', pkg_dir)) 59 | else: 60 | dirs = [os.path.join(pkg_dir, d) for d in ['src', 'lib']] 61 | print("Trying to put %s on python path" % dirs) 62 | paths.extend([d for d in dirs if os.path.isdir(d)]) 63 | 64 | 65 | def generate_python_path(pkg, rospack, m): 66 | """ 67 | Recursive subroutine for building dependency list and python path 68 | """ 69 | # short-circuit if this is a catkin-ized package 70 | if m.is_catkin: 71 | print("Catkin package, no need to generate python paths") 72 | return [] 73 | 74 | packages = get_non_catkin_depends(pkg, rospack) 75 | packages.append(pkg) 76 | print("Packages to create python paths for %s" % packages) 77 | 78 | paths = [] 79 | try: 80 | for p in packages: 81 | m = rospack.get_manifest(p) 82 | d = rospack.get_path(p) 83 | append_package_paths(m, paths, d) 84 | except: 85 | raise 86 | return paths 87 | -------------------------------------------------------------------------------- /src/rosdoc_lite/sphinxenator.py: -------------------------------------------------------------------------------- 1 | # Software License Agreement (BSD License) 2 | # 3 | # Copyright (c) 2008, Willow Garage, Inc. 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions 8 | # are met: 9 | # 10 | # * Redistributions of source code must retain the above copyright 11 | # notice, this list of conditions and the following disclaimer. 12 | # * Redistributions in binary form must reproduce the above 13 | # copyright notice, this list of conditions and the following 14 | # disclaimer in the documentation and/or other materials provided 15 | # with the distribution. 16 | # * Neither the name of Willow Garage, Inc. nor the names of its 17 | # contributors may be used to endorse or promote products derived 18 | # from this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 23 | # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 24 | # COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 25 | # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 26 | # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 27 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 28 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 30 | # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | # POSSIBILITY OF SUCH DAMAGE. 32 | # 33 | 34 | from __future__ import print_function 35 | 36 | import os 37 | import subprocess 38 | import sys 39 | from . import python_paths 40 | from subprocess import Popen, PIPE 41 | import rospkg 42 | 43 | 44 | def generate_sphinx(path, package, manifest, rd_config, output_dir, quiet): 45 | """ 46 | Main entrypoint into creating Sphinx documentation 47 | :return [str]: list of packages that were successfully generated 48 | """ 49 | try: 50 | # check to see which directory index.rst/conf.py are rooted in 51 | if 'sphinx_root_dir' in rd_config: 52 | base_dir = os.path.join(path, rd_config['sphinx_root_dir']) 53 | else: 54 | base_dir = path 55 | if os.access(os.path.join(base_dir, "conf.py"), os.R_OK): 56 | oldcwd = os.getcwd() 57 | os.chdir(base_dir) 58 | try: 59 | paths = python_paths.generate_python_path(package, rospkg.RosPack(), manifest) 60 | env = os.environ.copy() 61 | additional_packages = [p for p in paths if os.path.exists(p)] 62 | if additional_packages: 63 | env['PYTHONPATH'] = "%s:%s" % (os.pathsep.join(additional_packages), env['PYTHONPATH']) 64 | print ("Sphinx python path is: %s" % env['PYTHONPATH']) 65 | 66 | html_dir = os.path.join(oldcwd, output_dir, rd_config.get('output_dir', '.')) 67 | command = ['sphinx-build', '-a', '-E', '-b', 'html', '.', html_dir] 68 | print("sphinx-building %s [%s]" % (package, ' '.join(command))) 69 | print(" cwd is", os.getcwd()) 70 | process = Popen(command, stdout=PIPE, stderr=PIPE, env=env) 71 | com = process.communicate() 72 | print('stdout:') 73 | print(com[0]) 74 | print('stderr') 75 | print(com[1]) 76 | print('return code') 77 | print(process.returncode) 78 | if process.returncode != 0: 79 | raise subprocess.CalledProcessError(process.returncode, command, output=com[0]) 80 | finally: 81 | # restore cwd 82 | os.chdir(oldcwd) 83 | else: 84 | print("ERROR: no conf.py for sphinx build of [%s]"%package, file=sys.stderr) 85 | finally: 86 | pass 87 | -------------------------------------------------------------------------------- /src/rosdoc_lite/epyenator.py: -------------------------------------------------------------------------------- 1 | # Software License Agreement (BSD License) 2 | # 3 | # Copyright (c) 2008, Willow Garage, Inc. 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions 8 | # are met: 9 | # 10 | # * Redistributions of source code must retain the above copyright 11 | # notice, this list of conditions and the following disclaimer. 12 | # * Redistributions in binary form must reproduce the above 13 | # copyright notice, this list of conditions and the following 14 | # disclaimer in the documentation and/or other materials provided 15 | # with the distribution. 16 | # * Neither the name of Willow Garage, Inc. nor the names of its 17 | # contributors may be used to endorse or promote products derived 18 | # from this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 23 | # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 24 | # COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 25 | # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 26 | # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 27 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 28 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 30 | # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | # POSSIBILITY OF SUCH DAMAGE. 32 | # 33 | 34 | from __future__ import with_statement 35 | from __future__ import print_function 36 | 37 | import os 38 | import sys 39 | import subprocess 40 | import rospkg 41 | from . import python_paths 42 | 43 | 44 | def generate_epydoc(path, package, manifest, rd_config, output_dir, quiet): 45 | """ 46 | Main entrypoint into creating Epydoc documentation 47 | """ 48 | #make sure that we create docs in a subdirectory if requested 49 | html_dir = os.path.join(output_dir, rd_config.get('output_dir', '.')) 50 | 51 | try: 52 | if not os.path.isdir(html_dir): 53 | os.makedirs(html_dir) 54 | 55 | command = ['epydoc', '--html', package, '-o', html_dir] 56 | if 'exclude' in rd_config: 57 | for s in rd_config['exclude']: 58 | command.extend(['--exclude', s]) 59 | 60 | if 'config' in rd_config: 61 | command.extend(['--config', os.path.join(path, rd_config['config']) ]) 62 | else: 63 | # default options 64 | command.extend(['--inheritance', 'included', '--no-private']) 65 | 66 | # determine the python path of the package 67 | paths = python_paths.generate_python_path(package, rospkg.RosPack(), manifest) 68 | if not quiet: 69 | print('generate_epydoc() paths: %s' % ', '.join(paths)) 70 | env = os.environ.copy() 71 | additional_packages = [p for p in paths if os.path.exists(p)] 72 | if not quiet: 73 | print('generate_epydoc() additional_packages: %s' % ', '.join(additional_packages)) 74 | if additional_packages: 75 | env['PYTHONPATH'] = "%s:%s" % (os.pathsep.join(additional_packages), env['PYTHONPATH']) 76 | 77 | if not quiet: 78 | print('generate_epydoc() PYTHONPATH: %s' % env.get('PYTHONPATH', '')) 79 | print("epydoc-building %s [%s]" % (package, ' '.join(command))) 80 | output = subprocess.check_output(command, stderr=subprocess.STDOUT, env=env, cwd=path) 81 | print(output) 82 | except subprocess.CalledProcessError as e: 83 | print(e.output, file=sys.stderr) 84 | print("Unable to generate epydoc for [%s]. The return code is %d" % (package, e.returncode), file=sys.stderr) 85 | raise 86 | except Exception as e: 87 | print("Unable to generate epydoc for [%s]. This is probably because epydoc is not installed.\nThe exact error is:\n\t%s" % (package, str(e)), file=sys.stderr) 88 | raise 89 | -------------------------------------------------------------------------------- /test/test_doxygenator.py: -------------------------------------------------------------------------------- 1 | import os 2 | import unittest 3 | import sys 4 | if sys.version_info >= (3, 3): 5 | from unittest.mock import patch, mock_open 6 | else: 7 | # Expect the `mock` package for python 2. 8 | # https://pypi.python.org/pypi/mock 9 | from mock import patch, mock_open 10 | from rosdoc_lite import doxygenator as doxy 11 | 12 | def builtins_name(): 13 | return "__builtin__.open" if sys.version_info.major < 3 else "builtins.open" 14 | 15 | def urlopen_name(): 16 | return "urllib2.urlopen" if sys.version_info.major < 3 else "urllib.request.urlopen" 17 | 18 | class TestGetDocPath(unittest.TestCase): 19 | 20 | def setUp(self): 21 | self.tagfile_spec = "test_tagfile_spec.yaml" 22 | self.tagfile_dir = "./test_tagfiles" 23 | self.output_subfolder = "/path/to/" 24 | 25 | def tearDown(self): 26 | if os.path.exists(self.tagfile_spec): 27 | os.remove(self.tagfile_spec) 28 | if os.path.exists(self.tagfile_dir): 29 | os.rmdir(self.tagfile_dir) 30 | 31 | def test_relative_doc_path(self): 32 | tag_pair = {'docs_url':"relative/path"} 33 | output = doxy.get_doc_path("sub/folders", tag_pair) 34 | self.assertEqual("../../relative/path", output) 35 | 36 | tag_pair = {'docs_url':"relative/path",'doxygen_output_folder':"doxygen_output_folder"} 37 | output = doxy.get_doc_path("sub/folders", tag_pair) 38 | self.assertEqual("../../relative/path/doxygen_output_folder", output) 39 | 40 | def test_absolute_doc_path(self): 41 | tag_pair = {'docs_url': "https://absolu.te/path"} 42 | output = doxy.get_doc_path("sub/folders", tag_pair) 43 | self.assertEqual("https://absolu.te/path", output) 44 | 45 | tag_pair = {'docs_url': "https://absolu.te/path",'doxygen_output_folder':"doxygen_output_folder"} 46 | output = doxy.get_doc_path("sub/folders", tag_pair) 47 | self.assertEqual("https://absolu.te/path/doxygen_output_folder", output) 48 | 49 | def test_prepare_tagfiles_valid_http_location(self): 50 | input_tagfile_spec = "- location: http://example.com/tagfile.yaml\n docs_url: http://example.com/docs" 51 | expected_result = os.path.join(self.tagfile_dir, 'tagfile.yaml') + "=http://example.com/docs " 52 | with patch(builtins_name(), mock_open(read_data=input_tagfile_spec)) as _: 53 | with patch(urlopen_name()) as mock_urlopen: 54 | mock_urlopen.return_value.code = 200 55 | mock_urlopen.return_value.read.return_value = b"tagfile_content" 56 | mock_urlopen.return_value.headers.getparam.return_value = "utf-8" # python 2 57 | mock_urlopen.return_value.headers.get_param.return_value = "utf-8" # python 3 58 | 59 | result = doxy.prepare_tagfiles(self.tagfile_spec, self.tagfile_dir, self.output_subfolder) 60 | 61 | self.assertEqual(result, expected_result) 62 | 63 | def test_prepare_tagfiles_invalid_http_location(self): 64 | input_tagfile_spec = "- location: http://example.com/invalid_tagfile.yaml\n docs_url: http://example.com/docs" 65 | with patch(builtins_name(), mock_open(read_data=input_tagfile_spec)) as _: 66 | with patch(urlopen_name()) as mock_urlopen: 67 | mock_urlopen.return_value.code = 404 68 | 69 | result = doxy.prepare_tagfiles(self.tagfile_spec, self.tagfile_dir, self.output_subfolder) 70 | 71 | self.assertEqual(result, "") 72 | 73 | def test_prepare_tagfiles_valid_file_location(self): 74 | input_tagfile_spec = "- location: file:///path/to/tagfile.yaml\n docs_url: /path/to/docs" 75 | expected_result = "/path/to/tagfile.yaml=/path/to/docs " 76 | 77 | with patch(builtins_name(), mock_open(read_data=input_tagfile_spec)) as _: 78 | result = doxy.prepare_tagfiles(self.tagfile_spec, self.tagfile_dir, self.output_subfolder) 79 | 80 | self.assertEqual(result, expected_result) 81 | 82 | def test_prepare_tagfiles_invalid_location_prefix(self): 83 | input_tagfile_spec = "- location: invalid_prefix://example.com/tagfile.yaml\n docs_url: http://example.com/docs" 84 | with patch(builtins_name(), mock_open(read_data=input_tagfile_spec)) as _: 85 | result = doxy.prepare_tagfiles(self.tagfile_spec, self.tagfile_dir, self.output_subfolder) 86 | 87 | self.assertEqual(result, "") 88 | -------------------------------------------------------------------------------- /src/rosdoc_lite/landing_page.py: -------------------------------------------------------------------------------- 1 | # Software License Agreement (BSD License) 2 | # 3 | # Copyright (c) 2008, Willow Garage, Inc. 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions 8 | # are met: 9 | # 10 | # * Redistributions of source code must retain the above copyright 11 | # notice, this list of conditions and the following disclaimer. 12 | # * Redistributions in binary form must reproduce the above 13 | # copyright notice, this list of conditions and the following 14 | # disclaimer in the documentation and/or other materials provided 15 | # with the distribution. 16 | # * Neither the name of Willow Garage, Inc. nor the names of its 17 | # contributors may be used to endorse or promote products derived 18 | # from this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 23 | # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 24 | # COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 25 | # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 26 | # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 27 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 28 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 30 | # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | # POSSIBILITY OF SUCH DAMAGE. 32 | # 33 | 34 | from __future__ import with_statement 35 | from __future__ import print_function 36 | 37 | import os 38 | import sys 39 | import time 40 | 41 | from . import rdcore 42 | 43 | 44 | def _href(location, text): 45 | return '%(text)s' % locals() 46 | 47 | 48 | def link_name(rd_config): 49 | """ 50 | returns the name to display as for the generated kind of API. 51 | :param rdconfig: dict as parsed from manifest.xml 52 | :returns: label, ``str`` 53 | """ 54 | if 'name' in rd_config: 55 | n = rd_config['name'] 56 | else: 57 | if rd_config['builder'] == 'doxygen': 58 | return 'C++ API' 59 | elif rd_config['builder'] in ['epydoc', 'sphinx']: 60 | return 'Python API' 61 | elif rd_config['builder'] in ['external']: 62 | return rd_config.get('external_label', 'External') 63 | else: 64 | return rd_config['builder'] 65 | return n 66 | 67 | 68 | def output_location(config): 69 | """ 70 | :returns: uri, ``str`` 71 | """ 72 | if config['builder'] == 'external': 73 | return config.get('external_url', None) 74 | else: 75 | return config.get('output_dir', None) 76 | 77 | 78 | def generate_links(package, manifest, rd_configs): 79 | """ 80 | :param package: str packagename 81 | :param manifest: manifest object 82 | :param rd_configs: [dict] package manifest rosdoc configs 83 | :returns: [str] list of html snippets 84 | """ 85 | config_list = [c for c in rd_configs.values() if c['builder'] != 'rosmake'] 86 | output_dirs = [output_location(c) for c in config_list] 87 | # filter out empties 88 | output_dirs = [d for d in output_dirs if d and d != '.'] 89 | 90 | # length check. if these are unequal, cannot generate landing 91 | # page. this is often true if the config is merely generating 92 | # local. 93 | if len(output_dirs) != len(config_list): 94 | return None 95 | 96 | links = [_href(d, link_name(c)) for c, d in zip(config_list, output_dirs)] 97 | 98 | url = manifest.url 99 | if url: 100 | links.append(_href(url, '%s Package Documentation' % package)) 101 | return links 102 | 103 | 104 | def generate_landing_page(package, manifest, rd_configs, output_dir): 105 | """ 106 | Generate landing page in the event that there are multiple documentation sets 107 | :returns: list of packages for which there are landing pages generated 108 | """ 109 | template = rdcore.load_tmpl('landing.template') 110 | #print("landing_page: packages are", ctx.packages.keys()) 111 | try: 112 | links = generate_links(package, manifest, rd_configs) 113 | # if links is empty, it means that the rd_configs builds 114 | # to the base directory and no landing page is required 115 | # (or it means that the config is corrupt) 116 | if not links: 117 | #print("ignoring landing page for", package) 118 | return 119 | 120 | html_dir = output_dir 121 | #print("generating landing page", html_dir) 122 | 123 | if not os.path.isdir(html_dir): 124 | os.makedirs(html_dir) 125 | 126 | links_html = '\n'.join(['
  • %s
  • ' % l for l in links]) 127 | date = str(time.strftime('%a, %d %b %Y %H:%M:%S')) 128 | tempvars = { 129 | '$package': package, 130 | '$links': links_html, 131 | '$date': date, 132 | } 133 | 134 | with open(os.path.join(html_dir, 'index.html'), 'w') as f: 135 | f.write(rdcore.instantiate_template(template, tempvars)) 136 | 137 | except Exception as e: 138 | print("Unable to generate landing_page for [%s]:\n\t%s" % (package, str(e)), file=sys.stderr) 139 | raise 140 | -------------------------------------------------------------------------------- /doc/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line. 5 | SPHINXOPTS = 6 | SPHINXBUILD = sphinx-build 7 | PAPER = 8 | BUILDDIR = build 9 | 10 | # Internal variables. 11 | PAPEROPT_a4 = -D latex_paper_size=a4 12 | PAPEROPT_letter = -D latex_paper_size=letter 13 | ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . 14 | # the i18n builder cannot share the environment and doctrees with the others 15 | I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . 16 | 17 | .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext 18 | 19 | help: 20 | @echo "Please use \`make ' where is one of" 21 | @echo " html to make standalone HTML files" 22 | @echo " dirhtml to make HTML files named index.html in directories" 23 | @echo " singlehtml to make a single large HTML file" 24 | @echo " pickle to make pickle files" 25 | @echo " json to make JSON files" 26 | @echo " htmlhelp to make HTML files and a HTML help project" 27 | @echo " qthelp to make HTML files and a qthelp project" 28 | @echo " devhelp to make HTML files and a Devhelp project" 29 | @echo " epub to make an epub" 30 | @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" 31 | @echo " latexpdf to make LaTeX files and run them through pdflatex" 32 | @echo " text to make text files" 33 | @echo " man to make manual pages" 34 | @echo " texinfo to make Texinfo files" 35 | @echo " info to make Texinfo files and run them through makeinfo" 36 | @echo " gettext to make PO message catalogs" 37 | @echo " changes to make an overview of all changed/added/deprecated items" 38 | @echo " linkcheck to check all external links for integrity" 39 | @echo " doctest to run all doctests embedded in the documentation (if enabled)" 40 | 41 | clean: 42 | -rm -rf $(BUILDDIR)/* 43 | 44 | html: 45 | $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html 46 | @echo 47 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." 48 | 49 | dirhtml: 50 | $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml 51 | @echo 52 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." 53 | 54 | singlehtml: 55 | $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml 56 | @echo 57 | @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." 58 | 59 | pickle: 60 | $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle 61 | @echo 62 | @echo "Build finished; now you can process the pickle files." 63 | 64 | json: 65 | $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json 66 | @echo 67 | @echo "Build finished; now you can process the JSON files." 68 | 69 | htmlhelp: 70 | $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp 71 | @echo 72 | @echo "Build finished; now you can run HTML Help Workshop with the" \ 73 | ".hhp project file in $(BUILDDIR)/htmlhelp." 74 | 75 | qthelp: 76 | $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp 77 | @echo 78 | @echo "Build finished; now you can run "qcollectiongenerator" with the" \ 79 | ".qhcp project file in $(BUILDDIR)/qthelp, like this:" 80 | @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/rosdoc_lite.qhcp" 81 | @echo "To view the help file:" 82 | @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/rosdoc_lite.qhc" 83 | 84 | devhelp: 85 | $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp 86 | @echo 87 | @echo "Build finished." 88 | @echo "To view the help file:" 89 | @echo "# mkdir -p $$HOME/.local/share/devhelp/rosdoc_lite" 90 | @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/rosdoc_lite" 91 | @echo "# devhelp" 92 | 93 | epub: 94 | $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub 95 | @echo 96 | @echo "Build finished. The epub file is in $(BUILDDIR)/epub." 97 | 98 | latex: 99 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 100 | @echo 101 | @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." 102 | @echo "Run \`make' in that directory to run these through (pdf)latex" \ 103 | "(use \`make latexpdf' here to do that automatically)." 104 | 105 | latexpdf: 106 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 107 | @echo "Running LaTeX files through pdflatex..." 108 | $(MAKE) -C $(BUILDDIR)/latex all-pdf 109 | @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." 110 | 111 | text: 112 | $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text 113 | @echo 114 | @echo "Build finished. The text files are in $(BUILDDIR)/text." 115 | 116 | man: 117 | $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man 118 | @echo 119 | @echo "Build finished. The manual pages are in $(BUILDDIR)/man." 120 | 121 | texinfo: 122 | $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo 123 | @echo 124 | @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." 125 | @echo "Run \`make' in that directory to run these through makeinfo" \ 126 | "(use \`make info' here to do that automatically)." 127 | 128 | info: 129 | $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo 130 | @echo "Running Texinfo files through makeinfo..." 131 | make -C $(BUILDDIR)/texinfo info 132 | @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." 133 | 134 | gettext: 135 | $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale 136 | @echo 137 | @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." 138 | 139 | changes: 140 | $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes 141 | @echo 142 | @echo "The overview file is in $(BUILDDIR)/changes." 143 | 144 | linkcheck: 145 | $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck 146 | @echo 147 | @echo "Link check complete; look for any errors in the above output " \ 148 | "or in $(BUILDDIR)/linkcheck/output.txt." 149 | 150 | doctest: 151 | $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest 152 | @echo "Testing of doctests in the sources finished, look at the " \ 153 | "results in $(BUILDDIR)/doctest/output.txt." 154 | -------------------------------------------------------------------------------- /src/rosdoc_lite/rdcore.py: -------------------------------------------------------------------------------- 1 | # Software License Agreement (BSD License) 2 | # 3 | # Copyright (c) 2008, Willow Garage, Inc. 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions 8 | # are met: 9 | # 10 | # * Redistributions of source code must retain the above copyright 11 | # notice, this list of conditions and the following disclaimer. 12 | # * Redistributions in binary form must reproduce the above 13 | # copyright notice, this list of conditions and the following 14 | # disclaimer in the documentation and/or other materials provided 15 | # with the distribution. 16 | # * Neither the name of Willow Garage, Inc. nor the names of its 17 | # contributors may be used to endorse or promote products derived 18 | # from this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 23 | # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 24 | # COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 25 | # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 26 | # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 27 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 28 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 30 | # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | # POSSIBILITY OF SUCH DAMAGE. 32 | 33 | from __future__ import print_function 34 | 35 | import os 36 | import sys 37 | 38 | 39 | from catkin_pkg.package import Package, Export 40 | import rospkg 41 | 42 | #Helper object to pull the information rosdoc needs from both manifest and 43 | #package objects 44 | 45 | 46 | def convert_manifest_export(man_export): 47 | e = Export(man_export.tag, man_export.str) 48 | e.attributes = man_export.attrs 49 | return e 50 | 51 | 52 | class PackageInformation(object): 53 | __slots__ = ['license', 'maintainer', 'author', 'description', 'status', 'brief', 'url', 'is_catkin', 'exports', 'depends', 'bugtracker', 'repo_url'] 54 | 55 | def __init__(self, pkg_desc): 56 | if isinstance(pkg_desc, Package): 57 | self.create_from_package(pkg_desc) 58 | elif isinstance(pkg_desc, rospkg.Manifest): 59 | self.create_from_manifest(pkg_desc) 60 | 61 | def create_from_package(self, package): 62 | self.license = ', '.join(package.licenses) 63 | self.author = ', '.join([('%s <%s>' % (a.name, a.email) if a.email is not None else a.name) for a in package.authors]) 64 | self.maintainer = ', '.join([('%s <%s>' % (m.name, m.email) if m.email is not None else m.name) for m in package.maintainers]) 65 | self.description = package.description 66 | 67 | #we'll just use the first url with type website or the first URL of any type 68 | websites = [url.url for url in package.urls if url.type == 'website'] 69 | self.url = websites[0] if websites else None 70 | 71 | #we'll also check if there's a bugtracker URL 72 | bugtracker = [url.url for url in package.urls if url.type == 'bugtracker'] 73 | self.bugtracker = bugtracker[0] if bugtracker else None 74 | 75 | #we'll also check if there's a bugtracker URL 76 | repo_url = [url.url for url in package.urls if url.type == 'repository'] 77 | self.repo_url = repo_url[0] if repo_url else None 78 | 79 | self.is_catkin = True 80 | self.exports = package.exports 81 | self.status = None 82 | self.brief = None 83 | self.depends = [] 84 | self.depends.extend([dep.name for dep in package.build_depends]) 85 | self.depends.extend([dep.name for dep in package.buildtool_depends]) 86 | self.depends.extend([dep.name for dep in package.run_depends]) 87 | self.depends.extend([dep.name for dep in package.test_depends]) 88 | self.depends = list(set(self.depends)) 89 | 90 | def create_from_manifest(self, manifest): 91 | self.repo_url = None 92 | self.bugtracker = None 93 | self.license = manifest.license 94 | self.maintainer = None 95 | self.author = manifest.author 96 | self.description = manifest.description 97 | self.status = manifest.status 98 | self.brief = manifest.brief 99 | self.url = manifest.url 100 | self.is_catkin = manifest.is_catkin 101 | self.exports = [convert_manifest_export(e) for e in manifest.exports] 102 | self.depends = [dep.name for dep in manifest.depends] 103 | self.depends.extend([dep.name for dep in manifest.rosdeps]) 104 | self.depends = list(set(self.depends)) 105 | 106 | def get_export(self, tag, attr): 107 | vals = [e.attributes[attr] for e in self.exports 108 | if e.tagname == tag if attr in e.attributes] 109 | return vals 110 | 111 | 112 | def html_path(package, docdir): 113 | return os.path.join(docdir, package, 'html') 114 | 115 | 116 | ################################################################################ 117 | # TEMPLATE ROUTINES 118 | import pkg_resources 119 | import kitchen 120 | 121 | _TEMPLATES_DIR = 'templates' 122 | _PACKAGE_NAME = 'rosdoc_lite' 123 | 124 | 125 | def get_templates_dir(): 126 | return os.path.join(os.path.dirname(__file__), _TEMPLATES_DIR) 127 | 128 | 129 | def load_tmpl(filename): 130 | """ 131 | looks up file within rosdoc ROS package, 132 | return its content, may sys.exit on error. 133 | Contents are cached with filename as key. 134 | 135 | :returns: cached file contents 136 | """ 137 | filename = os.path.join(get_templates_dir(), filename) 138 | if not os.path.isfile(filename): 139 | sys.stderr.write("Cannot locate template file '%s'\n" % (filename)) 140 | sys.exit(1) 141 | with open(filename, 'r') as f: 142 | content = f.read() 143 | if not content: 144 | sys.stderr.write("Template file '%s' is empty\n" % (filename)) 145 | sys.exit(1) 146 | return content 147 | 148 | 149 | def instantiate_template(tmpl, tempvars): 150 | """ 151 | looks up file within rosdoc_lite package, return its content, may sys.exit on error 152 | """ 153 | for k, v in tempvars.items(): 154 | tmpl = tmpl.replace(k, kitchen.text.converters.to_unicode(v)) 155 | return tmpl 156 | -------------------------------------------------------------------------------- /doc/conf.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # rosdoc_lite documentation build configuration file, created by 4 | # sphinx-quickstart on Thu Oct 18 15:26:46 2012. 5 | # 6 | # This file is execfile()d with the current directory set to its containing dir. 7 | # 8 | # Note that not all possible configuration values are present in this 9 | # autogenerated file. 10 | # 11 | # All configuration values have a default; values that are commented out 12 | # serve to show the default. 13 | 14 | import sys, os 15 | from xml.etree.ElementTree import ElementTree 16 | 17 | html_logo = 'ros.png' 18 | 19 | import catkin_sphinx 20 | html_theme_path = [os.path.join(os.path.dirname(catkin_sphinx.__file__), 'theme')] 21 | 22 | # If extensions (or modules to document with autodoc) are in another directory, 23 | # add these directories to sys.path here. If the directory is relative to the 24 | # documentation root, use os.path.abspath to make it absolute, like shown here. 25 | #sys.path.insert(0, os.path.abspath('.')) 26 | 27 | # -- General configuration ----------------------------------------------------- 28 | 29 | # If your documentation needs a minimal Sphinx version, state it here. 30 | #needs_sphinx = '1.0' 31 | 32 | # Add any Sphinx extension module names here, as strings. They can be extensions 33 | # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. 34 | extensions = ['sphinx.ext.ifconfig', 'sphinx.ext.graphviz', 35 | 'sphinx.ext.intersphinx', 36 | 'catkin_sphinx.ShLexer', 'catkin_sphinx.cmake', 37 | 'sphinx.ext.autodoc'] 38 | 39 | # Add any paths that contain templates here, relative to this directory. 40 | templates_path = ['_templates'] 41 | 42 | # The suffix of source filenames. 43 | source_suffix = '.rst' 44 | 45 | # The encoding of source files. 46 | #source_encoding = 'utf-8-sig' 47 | 48 | # The master toctree document. 49 | master_doc = 'index' 50 | 51 | # General information about the project. 52 | project = u'rosdoc_lite' 53 | copyright = u'2012, Eitan Marder-Eppstein' 54 | 55 | # The version info for the project you're documenting, acts as replacement for 56 | # |version| and |release|, also used in various other places throughout the 57 | # built documents. 58 | # 59 | # The short X.Y version. 60 | try: 61 | root = ElementTree(None, os.path.join('..', 'package.xml')) 62 | version = root.findtext('version') 63 | except Exception as e: 64 | raise RuntimeError('Could not extract version from package.xml:\n%s' % e) 65 | 66 | # The full version, including alpha/beta/rc tags. 67 | release = version 68 | 69 | # The language for content autogenerated by Sphinx. Refer to documentation 70 | # for a list of supported languages. 71 | #language = None 72 | 73 | # There are two options for replacing |today|: either, you set today to some 74 | # non-false value, then it is used: 75 | #today = '' 76 | # Else, today_fmt is used as the format for a strftime call. 77 | #today_fmt = '%B %d, %Y' 78 | 79 | # List of patterns, relative to source directory, that match files and 80 | # directories to ignore when looking for source files. 81 | exclude_patterns = ['build'] 82 | 83 | # The reST default role (used for this markup: `text`) to use for all documents. 84 | #default_role = None 85 | 86 | # If true, '()' will be appended to :func: etc. cross-reference text. 87 | #add_function_parentheses = True 88 | 89 | # If true, the current module name will be prepended to all description 90 | # unit titles (such as .. function::). 91 | #add_module_names = True 92 | 93 | # If true, sectionauthor and moduleauthor directives will be shown in the 94 | # output. They are ignored by default. 95 | #show_authors = False 96 | 97 | # The name of the Pygments (syntax highlighting) style to use. 98 | pygments_style = 'sphinx' 99 | 100 | # A list of ignored prefixes for module index sorting. 101 | #modindex_common_prefix = [] 102 | 103 | 104 | # -- Options for HTML output --------------------------------------------------- 105 | 106 | # The theme to use for HTML and HTML Help pages. See the documentation for 107 | # a list of builtin themes. 108 | html_theme = 'ros-theme' 109 | 110 | # Theme options are theme-specific and customize the look and feel of a theme 111 | # further. For a list of options available for each theme, see the 112 | # documentation. 113 | #html_theme_options = {} 114 | 115 | # Add any paths that contain custom themes here, relative to this directory. 116 | #html_theme_path = [] 117 | 118 | # The name for this set of Sphinx documents. If None, it defaults to 119 | # " v documentation". 120 | #html_title = None 121 | 122 | # A shorter title for the navigation bar. Default is the same as html_title. 123 | #html_short_title = None 124 | 125 | # The name of an image file (relative to this directory) to place at the top 126 | # of the sidebar. 127 | #html_logo = None 128 | 129 | # The name of an image file (within the static path) to use as favicon of the 130 | # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 131 | # pixels large. 132 | #html_favicon = None 133 | 134 | # Add any paths that contain custom static files (such as style sheets) here, 135 | # relative to this directory. They are copied after the builtin static files, 136 | # so a file named "default.css" will overwrite the builtin "default.css". 137 | html_static_path = [] 138 | 139 | # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, 140 | # using the given strftime format. 141 | #html_last_updated_fmt = '%b %d, %Y' 142 | 143 | # If true, SmartyPants will be used to convert quotes and dashes to 144 | # typographically correct entities. 145 | #html_use_smartypants = True 146 | 147 | # Custom sidebar templates, maps document names to template names. 148 | #html_sidebars = {} 149 | 150 | # Additional templates that should be rendered to pages, maps page names to 151 | # template names. 152 | #html_additional_pages = {} 153 | 154 | # If false, no module index is generated. 155 | #html_domain_indices = True 156 | 157 | # If false, no index is generated. 158 | #html_use_index = True 159 | 160 | # If true, the index is split into individual pages for each letter. 161 | #html_split_index = False 162 | 163 | # If true, links to the reST sources are added to the pages. 164 | #html_show_sourcelink = True 165 | 166 | # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. 167 | #html_show_sphinx = True 168 | 169 | # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. 170 | #html_show_copyright = True 171 | 172 | # If true, an OpenSearch description file will be output, and all pages will 173 | # contain a tag referring to it. The value of this option must be the 174 | # base URL from which the finished HTML is served. 175 | #html_use_opensearch = '' 176 | 177 | # This is the file name suffix for HTML files (e.g. ".xhtml"). 178 | #html_file_suffix = None 179 | 180 | # Output file base name for HTML help builder. 181 | htmlhelp_basename = 'rosdoc_litedoc' 182 | 183 | 184 | # -- Options for LaTeX output -------------------------------------------------- 185 | 186 | latex_elements = { 187 | # The paper size ('letterpaper' or 'a4paper'). 188 | #'papersize': 'letterpaper', 189 | 190 | # The font size ('10pt', '11pt' or '12pt'). 191 | #'pointsize': '10pt', 192 | 193 | # Additional stuff for the LaTeX preamble. 194 | #'preamble': '', 195 | } 196 | 197 | # Grouping the document tree into LaTeX files. List of tuples 198 | # (source start file, target name, title, author, documentclass [howto/manual]). 199 | latex_documents = [ 200 | ('index', 'rosdoc_lite.tex', u'rosdoc\\_lite Documentation', 201 | u'Eitan Marder-Eppstein', 'manual'), 202 | ] 203 | 204 | # The name of an image file (relative to this directory) to place at the top of 205 | # the title page. 206 | #latex_logo = None 207 | 208 | # For "manual" documents, if this is true, then toplevel headings are parts, 209 | # not chapters. 210 | #latex_use_parts = False 211 | 212 | # If true, show page references after internal links. 213 | #latex_show_pagerefs = False 214 | 215 | # If true, show URL addresses after external links. 216 | #latex_show_urls = False 217 | 218 | # Documents to append as an appendix to all manuals. 219 | #latex_appendices = [] 220 | 221 | # If false, no module index is generated. 222 | #latex_domain_indices = True 223 | 224 | 225 | # -- Options for manual page output -------------------------------------------- 226 | 227 | # One entry per manual page. List of tuples 228 | # (source start file, name, description, authors, manual section). 229 | man_pages = [ 230 | ('index', 'rosdoc_lite', u'rosdoc_lite Documentation', 231 | [u'Eitan Marder-Eppstein'], 1) 232 | ] 233 | 234 | # If true, show URL addresses after external links. 235 | #man_show_urls = False 236 | 237 | 238 | # -- Options for Texinfo output ------------------------------------------------ 239 | 240 | # Grouping the document tree into Texinfo files. List of tuples 241 | # (source start file, target name, title, author, 242 | # dir menu entry, description, category) 243 | texinfo_documents = [ 244 | ('index', 'rosdoc_lite', u'rosdoc_lite Documentation', 245 | u'Eitan Marder-Eppstein', 'rosdoc_lite', 'One line description of project.', 246 | 'Miscellaneous'), 247 | ] 248 | 249 | # Documents to append as an appendix to all manuals. 250 | #texinfo_appendices = [] 251 | 252 | # If false, no module index is generated. 253 | #texinfo_domain_indices = True 254 | 255 | # How to display URL addresses: 'footnote', 'no', or 'inline'. 256 | #texinfo_show_urls = 'footnote' 257 | -------------------------------------------------------------------------------- /src/rosdoc_lite/templates/doxygen.css: -------------------------------------------------------------------------------- 1 | BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV { 2 | font-family: Geneva, Arial, Helvetica, sans-serif; 3 | } 4 | BODY,TD { 5 | font-size: 90%; 6 | } 7 | H1 { 8 | font-size: 32px; 9 | font-weight: normal; 10 | 11 | margin-top: 30px; 12 | padding-top: 30px; 13 | width: 100%; 14 | display: block; 15 | border-bottom: solid 1px #aaa; 16 | 17 | } 18 | H2 { 19 | font-size: 120%; 20 | } 21 | H3 { 22 | font-size: 100%; 23 | } 24 | CAPTION { font-weight: bold } 25 | DIV.qindex { 26 | width: 100%; 27 | background-color: #e8eef2; 28 | border: 1px solid #84b0c7; 29 | text-align: center; 30 | margin: 2px; 31 | padding: 2px; 32 | line-height: 140%; 33 | } 34 | DIV.nav { 35 | width: 100%; 36 | background-color: #e8eef2; 37 | border: 1px solid #84b0c7; 38 | text-align: center; 39 | margin: 2px; 40 | padding: 2px; 41 | line-height: 140%; 42 | } 43 | DIV.navtab { 44 | background-color: #e8eef2; 45 | border: 1px solid #84b0c7; 46 | text-align: center; 47 | margin: 2px; 48 | margin-right: 15px; 49 | padding: 2px; 50 | } 51 | TD.navtab { 52 | font-size: 70%; 53 | } 54 | A.qindex { 55 | text-decoration: none; 56 | font-weight: bold; 57 | color: #1A419D; 58 | } 59 | A.qindex:visited { 60 | text-decoration: none; 61 | font-weight: bold; 62 | color: #1A419D 63 | } 64 | A.qindex:hover { 65 | text-decoration: none; 66 | background-color: #ddddff; 67 | } 68 | A.qindexHL { 69 | text-decoration: none; 70 | font-weight: bold; 71 | background-color: #6666cc; 72 | color: #ffffff; 73 | border: 1px double #9295C2; 74 | } 75 | A.qindexHL:hover { 76 | text-decoration: none; 77 | background-color: #6666cc; 78 | color: #ffffff; 79 | } 80 | A.qindexHL:visited { text-decoration: none; background-color: #6666cc; color: #ffffff } 81 | A.el { text-decoration: none; font-weight: bold } 82 | A.elRef { font-weight: bold } 83 | A.code:link { text-decoration: none; font-weight: normal; color: #0000FF} 84 | A.code:visited { text-decoration: none; font-weight: normal; color: #0000FF} 85 | A.codeRef:link { font-weight: normal; color: #0000FF} 86 | A.codeRef:visited { font-weight: normal; color: #0000FF} 87 | A:hover { text-decoration: none; background-color: #f2f2ff } 88 | DL.el { margin-left: -1cm } 89 | .fragment { 90 | font-family: monospace, fixed; 91 | font-size: 95%; 92 | } 93 | PRE.fragment { 94 | border: 1px solid #CCCCCC; 95 | background-color: #f5f5f5; 96 | margin-top: 4px; 97 | margin-bottom: 4px; 98 | margin-left: 2px; 99 | margin-right: 8px; 100 | padding-left: 6px; 101 | padding-right: 6px; 102 | padding-top: 4px; 103 | padding-bottom: 4px; 104 | } 105 | DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px } 106 | 107 | DIV.groupHeader { 108 | margin-left: 16px; 109 | margin-top: 12px; 110 | margin-bottom: 6px; 111 | font-weight: bold; 112 | } 113 | DIV.groupText { margin-left: 16px; font-style: italic; font-size: 90% } 114 | BODY { 115 | background: white; 116 | color: black; 117 | margin-right: 20px; 118 | margin-left: 20px; 119 | } 120 | TD.indexkey { 121 | background-color: #e8eef2; 122 | font-weight: bold; 123 | padding-right : 10px; 124 | padding-top : 2px; 125 | padding-left : 10px; 126 | padding-bottom : 2px; 127 | margin-left : 0px; 128 | margin-right : 0px; 129 | margin-top : 2px; 130 | margin-bottom : 2px; 131 | border: 1px solid #CCCCCC; 132 | } 133 | TD.indexvalue { 134 | background-color: #e8eef2; 135 | font-style: italic; 136 | padding-right : 10px; 137 | padding-top : 2px; 138 | padding-left : 10px; 139 | padding-bottom : 2px; 140 | margin-left : 0px; 141 | margin-right : 0px; 142 | margin-top : 2px; 143 | margin-bottom : 2px; 144 | border: 1px solid #CCCCCC; 145 | } 146 | TR.memlist { 147 | background-color: #f0f0f0; 148 | } 149 | P.formulaDsp { text-align: center; } 150 | IMG.formulaDsp { } 151 | IMG.formulaInl { vertical-align: middle; } 152 | SPAN.keyword { color: #008000 } 153 | SPAN.keywordtype { color: #604020 } 154 | SPAN.keywordflow { color: #e08000 } 155 | SPAN.comment { color: #800000 } 156 | SPAN.preprocessor { color: #806020 } 157 | SPAN.stringliteral { color: #002080 } 158 | SPAN.charliteral { color: #008080 } 159 | .mdescLeft { 160 | padding: 0px 8px 4px 8px; 161 | font-size: 80%; 162 | font-style: italic; 163 | background-color: #FAFAFA; 164 | border-top: 1px none #E0E0E0; 165 | border-right: 1px none #E0E0E0; 166 | border-bottom: 1px none #E0E0E0; 167 | border-left: 1px none #E0E0E0; 168 | margin: 0px; 169 | } 170 | .mdescRight { 171 | padding: 0px 8px 4px 8px; 172 | font-size: 80%; 173 | font-style: italic; 174 | background-color: #FAFAFA; 175 | border-top: 1px none #E0E0E0; 176 | border-right: 1px none #E0E0E0; 177 | border-bottom: 1px none #E0E0E0; 178 | border-left: 1px none #E0E0E0; 179 | margin: 0px; 180 | } 181 | .memItemLeft { 182 | padding: 1px 0px 0px 8px; 183 | margin: 4px; 184 | border-top-width: 1px; 185 | border-right-width: 1px; 186 | border-bottom-width: 1px; 187 | border-left-width: 1px; 188 | border-top-color: #E0E0E0; 189 | border-right-color: #E0E0E0; 190 | border-bottom-color: #E0E0E0; 191 | border-left-color: #E0E0E0; 192 | border-top-style: solid; 193 | border-right-style: none; 194 | border-bottom-style: none; 195 | border-left-style: none; 196 | background-color: #FAFAFA; 197 | font-size: 80%; 198 | } 199 | .memItemRight { 200 | padding: 1px 8px 0px 8px; 201 | margin: 4px; 202 | border-top-width: 1px; 203 | border-right-width: 1px; 204 | border-bottom-width: 1px; 205 | border-left-width: 1px; 206 | border-top-color: #E0E0E0; 207 | border-right-color: #E0E0E0; 208 | border-bottom-color: #E0E0E0; 209 | border-left-color: #E0E0E0; 210 | border-top-style: solid; 211 | border-right-style: none; 212 | border-bottom-style: none; 213 | border-left-style: none; 214 | background-color: #FAFAFA; 215 | font-size: 80%; 216 | } 217 | .memTemplItemLeft { 218 | padding: 1px 0px 0px 8px; 219 | margin: 4px; 220 | border-top-width: 1px; 221 | border-right-width: 1px; 222 | border-bottom-width: 1px; 223 | border-left-width: 1px; 224 | border-top-color: #E0E0E0; 225 | border-right-color: #E0E0E0; 226 | border-bottom-color: #E0E0E0; 227 | border-left-color: #E0E0E0; 228 | border-top-style: none; 229 | border-right-style: none; 230 | border-bottom-style: none; 231 | border-left-style: none; 232 | background-color: #FAFAFA; 233 | font-size: 80%; 234 | } 235 | .memTemplItemRight { 236 | padding: 1px 8px 0px 8px; 237 | margin: 4px; 238 | border-top-width: 1px; 239 | border-right-width: 1px; 240 | border-bottom-width: 1px; 241 | border-left-width: 1px; 242 | border-top-color: #E0E0E0; 243 | border-right-color: #E0E0E0; 244 | border-bottom-color: #E0E0E0; 245 | border-left-color: #E0E0E0; 246 | border-top-style: none; 247 | border-right-style: none; 248 | border-bottom-style: none; 249 | border-left-style: none; 250 | background-color: #FAFAFA; 251 | font-size: 80%; 252 | } 253 | .memTemplParams { 254 | padding: 1px 0px 0px 8px; 255 | margin: 4px; 256 | border-top-width: 1px; 257 | border-right-width: 1px; 258 | border-bottom-width: 1px; 259 | border-left-width: 1px; 260 | border-top-color: #E0E0E0; 261 | border-right-color: #E0E0E0; 262 | border-bottom-color: #E0E0E0; 263 | border-left-color: #E0E0E0; 264 | border-top-style: solid; 265 | border-right-style: none; 266 | border-bottom-style: none; 267 | border-left-style: none; 268 | color: #606060; 269 | background-color: #FAFAFA; 270 | font-size: 80%; 271 | } 272 | .search { color: #003399; 273 | font-weight: bold; 274 | } 275 | FORM.search { 276 | margin-bottom: 0px; 277 | margin-top: 0px; 278 | } 279 | INPUT.search { font-size: 75%; 280 | color: #000080; 281 | font-weight: normal; 282 | background-color: #e8eef2; 283 | } 284 | TD.tiny { font-size: 75%; 285 | } 286 | a { 287 | color: #1A41A8; 288 | } 289 | a:visited { 290 | color: #2A3798; 291 | } 292 | .dirtab { padding: 4px; 293 | border-collapse: collapse; 294 | border: 1px solid #84b0c7; 295 | } 296 | TH.dirtab { background: #e8eef2; 297 | font-weight: bold; 298 | } 299 | HR { height: 1px; 300 | border: none; 301 | border-top: 1px solid black; 302 | } 303 | 304 | /* Style for detailed member documentation */ 305 | .memtemplate { 306 | font-size: 80%; 307 | color: #606060; 308 | font-weight: normal; 309 | } 310 | .memnav { 311 | background-color: #e8eef2; 312 | border: 1px solid #84b0c7; 313 | text-align: center; 314 | margin: 2px; 315 | margin-right: 15px; 316 | padding: 2px; 317 | } 318 | .memitem { 319 | padding: 4px; 320 | background-color: #eef3f5; 321 | border-width: 1px; 322 | border-style: solid; 323 | border-color: #dedeee; 324 | -moz-border-radius: 8px 8px 8px 8px; 325 | } 326 | .memname { 327 | white-space: nowrap; 328 | font-weight: bold; 329 | } 330 | .memdoc{ 331 | padding-left: 10px; 332 | } 333 | .memproto { 334 | background-color: #d5e1e8; 335 | width: 100%; 336 | border-width: 1px; 337 | border-style: solid; 338 | border-color: #84b0c7; 339 | font-weight: bold; 340 | -moz-border-radius: 8px 8px 8px 8px; 341 | } 342 | .paramkey { 343 | text-align: right; 344 | } 345 | .paramtype { 346 | white-space: nowrap; 347 | } 348 | .paramname { 349 | color: #602020; 350 | font-style: italic; 351 | white-space: nowrap; 352 | } 353 | /* End Styling for detailed member documentation */ 354 | 355 | /* for the tree view */ 356 | .ftvtree { 357 | font-family: sans-serif; 358 | margin:0.5em; 359 | } 360 | .directory { font-size: 9pt; font-weight: bold; } 361 | .directory h3 { margin: 0px; margin-top: 1em; font-size: 11pt; } 362 | .directory > h3 { margin-top: 0; } 363 | .directory p { margin: 0px; white-space: nowrap; } 364 | .directory div { display: none; margin: 0px; } 365 | .directory img { vertical-align: -30%; } 366 | -------------------------------------------------------------------------------- /CHANGELOG.rst: -------------------------------------------------------------------------------- 1 | Change history 2 | ============== 3 | 4 | 0.2.11 (2023-09-07) 5 | ------------------- 6 | * add generate_treeview option (`#96 `_) 7 | To enable the treeview set in rosdoc.yaml 8 | ``` 9 | - builder: doxygen 10 | generate_treeview: YES 11 | ``` 12 | * change to setuptools in accordance with migration guide (`#105 `_) 13 | * Add option "required" to builder configs which will cause rosdoc_lite to fail if the builder fails. (`#106 `_) 14 | * Add option "required" to builder configs which will cause rosdoc_lite to fail if the builder fails. 15 | * Require documentation of this package to finish properly. 16 | * Added documentation to the added exception from generate_docs. 17 | * Add support for configuring INPUT_FILTER doxygen option (`#103 `_) 18 | * Add missing graphviz dep 19 | Used by Doxygen for inheritance diagrams. 20 | * Read include_path from config file 21 | * Removes warning about non existing INCLUDE_PATH. Closes `#86 `_ 22 | * Bump CMake version to avoid CMP0048 23 | * Contributors: Alexander Gutenkunst, Arne Hitzmann, Felix Ruess, Martin Pecka, Matthijs van der Burgh, Shane Loretz, Tully Foote 24 | 25 | 0.2.10 (2020-02-07) 26 | ------------------- 27 | * Add mdfile to INPUT 28 | * Use conditional dependencies (`#93 `_) 29 | * Use conditional dependencies for all Python rosdep keys 30 | * Only depend on epydoc if using Python 2 31 | * Switch to python?-catkin-pkg-modules since the CLI tools aren't used 32 | * Python 2 and 3 versions are side-by-side installable 33 | * Switch to python?-rospkg-modules since the CLI tools aren't used 34 | * Python 2 and 3 versions are side-by-side installable 35 | * Add mdfile to INPUT 36 | * backwards-compatible fix for python3 API changes 37 | * fix cmake failure when building without tests 38 | * Removes obsolete doxygen options 39 | fix cmake failure when building without tests 40 | * enable linking to documentation hosted on third party server 41 | * Update exception handling to Python2.6+ / Python3 syntax 42 | * Fix getting doxygen path when output_folder is defined 43 | * Add unit tests for getting doxygen path 44 | * Better name of function getting the documentation path 45 | * Update exception handling to Python2.6+ / Python3 syntax 46 | * Merge branch 'master' of github.com:jobleier/rosdoc_lite 47 | * enable 'docs_url' pointing to documentation hosted on third party server with external Doxygen documentation using tag files 48 | * Contributors: Alexander Gutenkunst, Finn-Thorben Sell, Johannes Bleier, Matthijs van der Burgh, Paul Dinh, Riku Shigematsu, Shane Loretz, Tully Foote, v4hn 49 | 50 | 0.2.9 (2019-01-23) 51 | ------------------ 52 | * use yaml.safe_load for untrusted yaml input 53 | * Contributors: Dirk Thomas 54 | 55 | 0.2.8 (2018-09-17) 56 | ------------------ 57 | * fix top bar on recent doxygen versions 58 | * on recent doxygen topbar requires jquery 59 | * fixes documentation generation on ROS melodic 60 | * see https://www.stack.nl/~dimitri/doxygen/manual/changelog.html#log_1_8_1 61 | * add use_mdfile_as_mainpage option 62 | This makes it possible/easier to use a markdown file as mainpage, e.g. the README.md 63 | * remove unsupported option latex_paper_size (`#79 `_) 64 | * Expose doxygen parameter GENERATE_QHP 65 | * Contributors: Dirk Thomas, Felix Ruess, Jack O'Quin, Jiri Horner, Levi Armstrong, Tully Foote 66 | 67 | 0.2.7 (2017-06-02) 68 | ------------------ 69 | * fix import (`#74 `_) 70 | * add ability to configure the doxygen parameter EXTRACT_ALL (`#72 `_) 71 | * more correct reference to the package website url (`#68 `_) 72 | * get rid of HTML static path, so build farm quits complaining 73 | * Contributors: Daniel Stonier, Dirk Thomas, Jack O'Quin, Levi Armstrong 74 | 75 | 0.2.6 (2016-04-12) 76 | ------------------ 77 | * Support SEARCHENGINE option for doxygen 78 | Closes `#56 `_ 79 | * Contributors: Jack O'Quin, Kentaro Wada 80 | 81 | 0.2.5 (2015-02-28) 82 | ------------------ 83 | 84 | * Add autodoc to sphinx config. 85 | * Use generator specific output folder. 86 | * Move import to local scope, since when the new API is being invoked 87 | from jenkins_scripts genmsg is not on the Python path. 88 | * Add API to provide generator specific output folders. 89 | * Run epydoc in the package folder. 90 | * Print output from epydoc invocation (fix `#50 91 | `_). 92 | * Update doxygen template to disable external groups and pages. 93 | * Update doxygen template to 1.8.6. 94 | * Contributors: Dirk Thomas, Jack O'Quin, Jonathan Bohren 95 | 96 | 0.2.4 (2014-04-22) 97 | ------------------ 98 | 99 | * Groovy, Hydro and Indigo release. 100 | * Introduce doxygen PREDEFINED tag (`#47`_). Thanks to Fabien 101 | Spindler. 102 | * Bugfix to enable devel space usage of rosdoc-lite, fixes `#44 103 | `_. 104 | Thanks to Daniel Stonier. 105 | * Delete upload script which is not used anymore. Its functionality 106 | is in `jenkins_scripts doc_stack.py`_ 107 | * Merge pull request `#41 108 | `_ to 109 | disable doxygen searchengine and latex generation. 110 | * Update ros.org urls. 111 | * Add list of actions to manifest.yaml after documenting them. 112 | * Order list of documented msgs/srvs/actions. 113 | * Add debug information to epyenator. 114 | * Contributors: Daniel Stonier, Dirk Thomas, Fabien Spindler, Jack O'Quin, Tully Foote 115 | 116 | 0.2.3 (2013-08-02) 117 | ------------------ 118 | 119 | * Groovy and Hydro release. 120 | * Working version of action documentation. 121 | * Restore support for raw message comments in docs (`#29`_). 122 | 123 | 0.2.2 (2013-01-28) 124 | ------------------ 125 | 126 | * Groovy and Hydro release. 127 | * Write information on deprecated packages to manifest.yaml. 128 | * Updated package.xml with new catkin<...> 129 | requirement. 130 | * Now writes information about package maintainers to the manifest 131 | generated for the wiki. 132 | * Adding bugtracker and repo_url fields to manifest generation. 133 | * Adding a missing dep on python-catkin-pkg. 134 | * Switching to python kitchen for unicode support to get around edge 135 | cases. 136 | * Switching from abspath to realpath to make sure to handle symlinks 137 | correctly. 138 | * Add docstrings. 139 | 140 | 0.2.1 (2012-10-24) 141 | ------------------ 142 | 143 | * Groovy release 144 | * Updating so that dependencies are only listed once, regardless of 145 | how many times they appear in package.xml 146 | * Updating so that ros-theme can be found 147 | * Updating description in package.xml to be a bit more informative 148 | * Adding proper export to rosdoc_lite 149 | * Changing default doc directory to be doc 150 | * Adding docs for rosdoc_lite 151 | 152 | 0.2.0 (2012-10-05) 153 | ------------------ 154 | 155 | * Initial Groovy release. 156 | * Message generation now links to the proper place, but expansion 157 | commented out. 158 | * Write manifest.yaml files for the wiki to use. 159 | * Support both new package.xml and the old manifest.xml on Groovy. 160 | * Port to Groovy catkin. 161 | 162 | 0.1.3 (2012-10-24) 163 | ------------------ 164 | 165 | * Fuerte release. 166 | * Only list dependencies once, regardless of how many times they 167 | appear in package.xml. 168 | * Updating so that ros-theme can be found. 169 | * Adding proper export to manifest.xml. 170 | * Changing default doc directory to be doc. 171 | * For Fuerte, we need to pull the version of the package from 172 | stack.xml instead of package.xml. 173 | * Refactoring so that epydoc and sphinx share the same Python path 174 | manipulation code. 175 | 176 | 0.1.2 (2012-10-05) 177 | ------------------ 178 | 179 | * Fuerte release. 180 | * Message generation now links to the proper place, but commenting out 181 | expansion for now, also work towards writing manifest.yaml files for 182 | the wiki to use. 183 | * Fixing a bug in converting from package.xml to rosdoc manifest format 184 | * Just treat catkin stuff as non-catkin on Fuerte since those packages 185 | still have a manifest. Fuerte catkin stacks do need to be on 186 | ``$ROS_PACKAGE_PATH`` to document. 187 | 188 | 0.1.1 (2012-09-28) 189 | ------------------ 190 | 191 | * minor Fuerte release. 192 | * Fixing a bug with the way the python path was built for 193 | epydoc. Also, skipping documentation for messages that can't be 194 | found. 195 | * Now handles when a given URL does not exist for a specified tagfile. 196 | 197 | 0.1.0 (2012-09-20) 198 | ------------------ 199 | 200 | * Initial release to Fuerte. 201 | * Fix for rospkg dependency problem (`#1`_). 202 | * Updating help to be more useful. 203 | * Allow users to specify the location of tagfile output if they choose. 204 | * Add support for tagfiles. 205 | * Working towards catkinizing this stack. 206 | * Removing leftover package dependencies, including roslib. 207 | * Version of the message documentation that doesn't depend on roslib. 208 | * Switching to package names for calling rosdoc_lite. 209 | * Renaming ``rosdoc`` script to ``rosdoc_lite``. 210 | * Making a ROS package, need some tools for message generation. 211 | 212 | .. _`jenkins_scripts doc_stack.py`: 213 | https://github.com/ros-infrastructure/jenkins_scripts/blob/master/doc_stack.py 214 | .. _`#1`: https://github.com/ros-infrastructure/rosdoc_lite/issues/1 215 | .. _`#29`: https://github.com/ros-infrastructure/rosdoc_lite/issues/29 216 | .. _`#47`: https://github.com/ros-infrastructure/rosdoc_lite/issues/47 217 | -------------------------------------------------------------------------------- /src/rosdoc_lite/msgenator.py: -------------------------------------------------------------------------------- 1 | # Software License Agreement (BSD License) 2 | # 3 | # Copyright (c) 2009, Willow Garage, Inc. 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions 8 | # are met: 9 | # 10 | # * Redistributions of source code must retain the above copyright 11 | # notice, this list of conditions and the following disclaimer. 12 | # * Redistributions in binary form must reproduce the above 13 | # copyright notice, this list of conditions and the following 14 | # disclaimer in the documentation and/or other materials provided 15 | # with the distribution. 16 | # * Neither the name of Willow Garage, Inc. nor the names of its 17 | # contributors may be used to endorse or promote products derived 18 | # from this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 23 | # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 24 | # COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 25 | # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 26 | # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 27 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 28 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 30 | # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | # POSSIBILITY OF SUCH DAMAGE. 32 | 33 | from __future__ import print_function 34 | 35 | try: 36 | from cStringIO import StringIO 37 | except ImportError: 38 | from io import StringIO 39 | import os 40 | import sys 41 | import time 42 | 43 | from . import rdcore 44 | import genmsg 45 | import fnmatch 46 | 47 | 48 | def _find_files_with_extension(path, ext): 49 | matches = [] 50 | for root, dirnames, filenames in os.walk(path): 51 | for filename in fnmatch.filter(filenames, '*.%s' % ext): 52 | #matches.append(os.path.join(root, filename)) 53 | matches.append((os.path.splitext(filename)[0], os.path.join(root, filename))) 54 | return matches 55 | 56 | 57 | def _href(link, text): 58 | return '%(text)s' % locals() 59 | 60 | 61 | def resource_name(resource): 62 | if '/' in resource: 63 | val = tuple(resource.split('/')) 64 | if len(val) != 2: 65 | raise ValueError("invalid name [%s]" % resource) 66 | else: 67 | return val 68 | else: 69 | return '', resource 70 | 71 | 72 | def type_link(type_, base_package): 73 | """ 74 | :param type_: str 75 | :param base_package: containing package 76 | :returns: A link to the page of the type, or just a label for basetypes 77 | """ 78 | base_type = genmsg.msgs.parse_type(type_)[0] 79 | base_type = genmsg.msgs.resolve_type(base_type, base_package) 80 | if base_type in genmsg.msgs.BUILTIN_TYPES: 81 | return type_ 82 | package, base_type = resource_name(base_type) 83 | # always chain upwards to msg dir 84 | return _href("../../../%(package)s/html/msg/%(base_type)s.html" % locals(), type_) 85 | 86 | 87 | def index_type_link(pref, type_, base_package): 88 | if type_ in genmsg.msgs.BUILTIN_TYPES: 89 | return type_ 90 | base_type_ = genmsg.msgs.parse_type(type_)[0] 91 | package, base_type_ = resource_name(base_type_) 92 | if not package or package == base_package: 93 | return _href("%s/%s.html" % (pref, base_type_), type_) 94 | else: 95 | return _href("../../%(package)s/html/%(pref)s/%(base_type_)s.html" % locals(), type_) 96 | 97 | def _generate_raw_text(raw_text): 98 | s = '' 99 | for line in raw_text.split('\n'): 100 | line = line.replace(' ', ' ') 101 | parts = line.split('#') 102 | if len(parts) > 1: 103 | s = s + parts[0]+'#%s
    '%('#'.join(parts[1:])) 104 | else: 105 | s = s + "%s
    "%parts[0] 106 | return s 107 | 108 | def _generate_msg_text_from_spec(package, spec, msg_context, buff=None, indent=0): 109 | if buff is None: 110 | buff = StringIO() 111 | for c in spec.constants: 112 | buff.write("%s%s %s=%s
    " % (" "*indent, c.type, c.name, c.val_text)) 113 | for type_, name in zip(spec.types, spec.names): 114 | buff.write("%s%s %s
    " % (" "*indent, type_link(type_, package), name)) 115 | base_type = genmsg.msgs.parse_type(type_)[0] 116 | base_type = genmsg.msgs.resolve_type(base_type, package) 117 | #TODO: If you actually want an expanded definition, you need some way 118 | # to go from package name to message type, with the new catkin stuff, 119 | #I'm not sure this is possible 120 | #if not base_type in genmsg.msgs.BUILTIN_TYPES: 121 | # subspec = None 122 | # if not msg_context.is_registered(base_type): 123 | # package, msg_type = resource_name(base_type) 124 | # path = os.path.join(rp.get_path(package), 'msg', "%s.msg" % msg_type) 125 | # subspec = genmsg.msg_loader.load_msg_from_file(msg_context, path, "%s/%s" % (package, msg_type)) 126 | # else: 127 | # subspec = msg_context.get_registered(base_type) 128 | # _generate_msg_text_from_spec(package, subspec, msg_context, rp, buff, indent + 4) 129 | return buff.getvalue() 130 | 131 | 132 | def _generate_msg_text(package, type_, msg_context, spec): 133 | #print("generate", package, type_) 134 | return _generate_msg_text_from_spec(package, spec, msg_context) 135 | 136 | 137 | def _generate_srv_text(package, type_, msg_context, spec): 138 | return _generate_msg_text_from_spec(package, spec.request, msg_context) + \ 139 | '
    ' + \ 140 | _generate_msg_text_from_spec(package, spec.response, msg_context) 141 | 142 | def generate_action_doc(action, action_template, path): 143 | package, base_type = resource_name(action) 144 | print ("action: %s" % action) 145 | d = {'name': action, 'ext': 'action', 'type': 'Action', 146 | 'package': package, 'base_type': base_type, 147 | 'date': str(time.strftime('%a, %d %b %Y %H:%M:%S'))} 148 | with open(path, 'r') as f: 149 | raw_text = f.read() 150 | d['raw_text'] = _generate_raw_text(raw_text) 151 | return action_template % d 152 | 153 | def generate_srv_doc(srv, msg_context, msg_template, path): 154 | package, base_type = resource_name(srv) 155 | print("srv: %s" % srv) 156 | d = {'name': srv, 'ext': 'srv', 'type': 'Service', 157 | 'package': package, 'base_type': base_type, 158 | 'date': str(time.strftime('%a, %d %b %Y %H:%M:%S'))} 159 | spec = genmsg.msg_loader.load_srv_from_file(msg_context, path, "%s/%s" % (package, base_type)) 160 | d['fancy_text'] = _generate_srv_text(package, base_type, msg_context, spec) 161 | d['raw_text'] = _generate_raw_text(spec.text) 162 | return msg_template % d 163 | 164 | 165 | def generate_msg_doc(msg, msg_context, msg_template, path): 166 | package, base_type = resource_name(msg) 167 | d = {'name': msg, 'ext': 'msg', 'type': 'Message', 168 | 'package': package, 'base_type': base_type, 169 | 'date': str(time.strftime('%a, %d %b %Y %H:%M:%S'))} 170 | spec = genmsg.msg_loader.load_msg_from_file(msg_context, path, "%s/%s" % (package, base_type)) 171 | d['fancy_text'] = _generate_msg_text(package, base_type, msg_context, spec) 172 | d['raw_text'] = _generate_raw_text(spec.text) 173 | return msg_template % d 174 | 175 | 176 | def generate_msg_index(package, file_d, msgs, srvs, actions, wiki_url, msg_index_template): 177 | d = {'package': package, 'msg_list': '', 'srv_list': '', 'action_list': '', 178 | 'package_url': wiki_url, 179 | 'date': str(time.strftime('%a, %d %b %Y %H:%M:%S'))} 180 | if msgs: 181 | d['msg_list'] = """

    Message types

    182 |
    183 |
      184 | %s 185 |
    186 |
    """ % '\n'.join(["
  • %s
  • " % index_type_link('msg', m, package) for m in sorted(msgs)]) 187 | 188 | if srvs: 189 | d['srv_list'] = """

    Service types

    190 |
    191 |
      192 | %s 193 |
    194 |
    """ % '\n'.join(["
  • %s
  • " % index_type_link('srv', s, package) for s in sorted(srvs)]) 195 | 196 | if actions: 197 | d['action_list'] = """

    Action types

    198 |
    199 |
      200 | %s 201 |
    202 |
    """ % '\n'.join(["
  • %s
  • " % index_type_link('action', a, package) for a in sorted(actions)]) 203 | 204 | file_p = os.path.join(file_d, 'index-msg.html') 205 | text = msg_index_template % d 206 | with open(file_p, 'w') as f: 207 | #print("writing", file_p) 208 | f.write(text) 209 | 210 | 211 | def generate_msg_docs(package, path, manifest, output_dir): 212 | """generate manifest.yaml files for MoinMoin PackageHeader macro""" 213 | try: 214 | import yaml 215 | except ImportError: 216 | print("Cannot import yaml, will not generate MoinMoin PackageHeader files", file=sys.stderr) 217 | return 218 | 219 | # create the directory for the autogen files 220 | if not os.path.exists(output_dir): 221 | os.makedirs(output_dir) 222 | 223 | # get a list of what we are documenting 224 | msgs = _find_files_with_extension(path, 'msg') 225 | srvs = _find_files_with_extension(path, 'srv') 226 | actions = _find_files_with_extension(path, 'action') 227 | 228 | print(msgs) 229 | print(srvs) 230 | print(actions) 231 | 232 | #Load template files 233 | msg_template = rdcore.load_tmpl('msg.template') 234 | action_template = rdcore.load_tmpl('action.template') 235 | msg_index_template = rdcore.load_tmpl('msg-index.template') 236 | 237 | msg_success = [] 238 | srv_success = [] 239 | action_success = [] 240 | 241 | # create dir for msg documentation 242 | if msgs: 243 | msg_d = os.path.join(output_dir, 'msg') 244 | if not os.path.exists(msg_d): 245 | os.makedirs(msg_d) 246 | 247 | # document the messages 248 | msg_context = genmsg.msg_loader.MsgContext.create_default() 249 | for m, msg_path in msgs: 250 | try: 251 | text = generate_msg_doc('%s/%s'%(package,m), msg_context, msg_template, msg_path) 252 | file_p = os.path.join(msg_d, '%s.html' % m) 253 | with open(file_p, 'w') as f: 254 | #print("writing", file_p) 255 | f.write(text) 256 | msg_success.append(m) 257 | except Exception as e: 258 | print("FAILED to generate for %s/%s: %s" % (package, m, str(e)), file=sys.stderr) 259 | 260 | # create dir for srv documentation 261 | if srvs: 262 | srv_d = os.path.join(output_dir, 'srv') 263 | if not os.path.exists(srv_d): 264 | os.makedirs(srv_d) 265 | 266 | # document the services 267 | for s, srv_path in srvs: 268 | try: 269 | text = generate_srv_doc('%s/%s' % (package,s), msg_context, msg_template, srv_path) 270 | file_p = os.path.join(srv_d, '%s.html' % s) 271 | with open(file_p, 'w') as f: 272 | #print("writing", file_p) 273 | f.write(text) 274 | srv_success.append(s) 275 | except Exception as e: 276 | print("FAILED to generate for %s/%s: %s" % (package, s, str(e)), file=sys.stderr) 277 | raise 278 | 279 | #create dir for action documentation 280 | if actions: 281 | action_d = os.path.join(output_dir, 'action') 282 | if not os.path.exists(action_d): 283 | os.makedirs(action_d) 284 | 285 | #document the actions 286 | for a, action_path in actions: 287 | try: 288 | text = generate_action_doc('%s/%s' % (package,a), action_template, action_path) 289 | file_p = os.path.join(action_d, '%s.html' % a) 290 | with open(file_p, 'w') as f: 291 | #print("writing", file_p) 292 | f.write(text) 293 | action_success.append(a) 294 | except Exception as e: 295 | print("FAILED to generate for %s/%s: %s" % (package, a, str(e)), file=sys.stderr) 296 | raise 297 | 298 | # generate the top-level index 299 | website_url = '
  • %s
  • \n' % _href(manifest.url, 'Website') 300 | generate_msg_index(package, output_dir, msg_success, srv_success, action_success, website_url, msg_index_template) 301 | 302 | return (msg_success, srv_success, action_success) 303 | -------------------------------------------------------------------------------- /src/rosdoc_lite/__init__.py: -------------------------------------------------------------------------------- 1 | # Software License Agreement (BSD License) 2 | # 3 | # Copyright (c) 2008, Willow Garage, Inc. 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions 8 | # are met: 9 | # 10 | # * Redistributions of source code must retain the above copyright 11 | # notice, this list of conditions and the following disclaimer. 12 | # * Redistributions in binary form must reproduce the above 13 | # copyright notice, this list of conditions and the following 14 | # disclaimer in the documentation and/or other materials provided 15 | # with the distribution. 16 | # * Neither the name of Willow Garage, Inc. nor the names of its 17 | # contributors may be used to endorse or promote products derived 18 | # from this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 23 | # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 24 | # COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 25 | # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 26 | # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 27 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 28 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 30 | # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | # POSSIBILITY OF SUCH DAMAGE. 32 | 33 | from __future__ import print_function 34 | 35 | import sys 36 | import os 37 | import traceback 38 | import yaml 39 | from subprocess import Popen, PIPE 40 | import shutil 41 | 42 | NAME = 'rosdoc_lite' 43 | 44 | from . import rdcore 45 | from . import epyenator 46 | from . import sphinxenator 47 | from . import landing_page 48 | from . import doxygenator 49 | 50 | import rospkg 51 | 52 | from catkin_pkg.package import parse_package 53 | 54 | 55 | def get_optparse(name): 56 | """ 57 | Retrieve default option parser for rosdoc. Useful if building an 58 | extended rosdoc tool with additional options. 59 | """ 60 | from optparse import OptionParser 61 | parser = OptionParser(usage="usage: %prog [options] [package_path]", prog=name) 62 | parser.add_option("-q", "--quiet", action="store_true", default=False, 63 | dest="quiet", 64 | help="Suppress doxygen errors.") 65 | parser.add_option("-o", metavar="OUTPUT_DIRECTORY", 66 | dest="docdir", default='doc', 67 | help="The directory to write documentation to.") 68 | parser.add_option("-t", "--tagfile", metavar="TAGFILE", dest="tagfile", default=None, 69 | help="Path to tag configuration file for Doxygen cross referencing support. Ex: /home/user/tagfiles_list.yaml") 70 | parser.add_option("-g", "--generate_tagfile", default=None, dest="generate_tagfile", 71 | help="If specified, will generate a doxygen tagfile in this location. Ex: /home/user/tags/package.tag") 72 | parser.add_option("-p", "--generate_qhp", action="store_true", default=False, dest="generate_qhp", 73 | help="If specified, will generate the Qt Help Project file index.qhp") 74 | return parser 75 | 76 | 77 | def load_rd_config(path, manifest): 78 | #load in any external config files 79 | rd_config = {} 80 | exported_configs = manifest.get_export('rosdoc', 'config') 81 | if exported_configs: 82 | #This just takes the last listed config export 83 | for exported_config in manifest.get_export('rosdoc', 'config'): 84 | try: 85 | exported_config = exported_config.replace('${prefix}', path) 86 | config_path = os.path.join(path, exported_config) 87 | with open(config_path, 'r') as config_file: 88 | rd_config = yaml.safe_load(config_file) 89 | except Exception as e: 90 | sys.stderr.write("ERROR: unable to load rosdoc config file [%s]: %s\n" % (config_path, str(e))) 91 | #we'll check if a 'rosdoc.yaml' file exists in the directory 92 | elif os.path.isfile(os.path.join(path, 'rosdoc.yaml')): 93 | with open(os.path.join(path, 'rosdoc.yaml'), 'r') as config_file: 94 | rd_config = yaml.safe_load(config_file) 95 | 96 | return rd_config 97 | 98 | 99 | def generate_build_params(rd_config, package): 100 | build_params = {} 101 | #if there's no config, we'll just build doxygen with the defaults 102 | if not rd_config: 103 | build_params['doxygen'] = {'builder': 'doxygen', 'output_dir': '.'} 104 | #make sure that we have a valid rd_config 105 | elif type(rd_config) != list: 106 | sys.stderr.write("WARNING: package [%s] had an invalid rosdoc config\n" % (package)) 107 | build_params['doxygen'] = {'builder': 'doxygen', 'output_dir': '.'} 108 | #generate build parameters for the different types of builders 109 | else: 110 | try: 111 | for target in rd_config: 112 | build_params[target['builder']] = target 113 | except KeyError: 114 | sys.stderr.write("config file for [%s] is invalid, missing required 'builder' key\n" % (package)) 115 | except: 116 | sys.stderr.write("config file for [%s] is invalid\n" % (package)) 117 | raise 118 | 119 | return build_params 120 | 121 | 122 | def build_manifest_yaml(manifest, msgs, srvs, actions, output_dir): 123 | # by default, assume that packages are on wiki 124 | m_yaml = {} 125 | m_yaml['authors'] = manifest.author or '' 126 | m_yaml['maintainers'] = manifest.maintainer or '' 127 | m_yaml['brief'] = manifest.brief or '' 128 | m_yaml['depends'] = manifest.depends or '' 129 | m_yaml['description'] = manifest.description or '' 130 | m_yaml['license'] = manifest.license or '' 131 | m_yaml['msgs'] = msgs 132 | m_yaml['srvs'] = srvs 133 | m_yaml['actions'] = actions 134 | m_yaml['url'] = manifest.url or '' 135 | m_yaml['bugtracker'] = manifest.bugtracker or '' 136 | m_yaml['repo_url'] = manifest.repo_url or '' 137 | external_docs = manifest.get_export('doxymaker', 'external') 138 | if external_docs: 139 | m_yaml['external_docmentation'] = external_docs 140 | 141 | metapackage = [e for e in manifest.exports if e.tagname == 'metapackage'] 142 | if metapackage: 143 | m_yaml['package_type'] = 'metapackage' 144 | else: 145 | m_yaml['package_type'] = 'package' 146 | 147 | deprecated = [e for e in manifest.exports if e.tagname == 'deprecated'] 148 | if deprecated: 149 | m_yaml['deprecated'] = deprecated[0].content or "This package is deprecated." 150 | 151 | with open(os.path.join(output_dir, 'manifest.yaml'), 'w') as f: 152 | yaml.safe_dump(m_yaml, f, default_flow_style=False) 153 | 154 | 155 | def generate_docs(path, package, manifest, output_dir, tagfile, generate_tagfile, generate_qhp=False, quiet=True): 156 | """ 157 | Generates API docs by invoking plugins with context 158 | 159 | :returns: a list of filenames/paths that is the union set of all results of plugin invocations 160 | :raises Exception: If any builder raises an exception and it has `'required': True` in build_params. 161 | """ 162 | plugins = [ 163 | ('doxygen', doxygenator.generate_doxygen), 164 | ('epydoc', epyenator.generate_epydoc), 165 | ('sphinx', sphinxenator.generate_sphinx) 166 | ] 167 | 168 | #load any rosdoc configuration files 169 | rd_config = load_rd_config(path, manifest) 170 | 171 | #put the rd_config into a form that's easier to use with plugins 172 | build_params = generate_build_params(rd_config, package) 173 | 174 | #throw in tagfiles for doxygen if it is going to be built 175 | if 'doxygen' in build_params: 176 | if tagfile: 177 | build_params['doxygen']['tagfile_spec'] = tagfile 178 | 179 | if generate_tagfile: 180 | build_params['doxygen']['generate_tagfile'] = generate_tagfile 181 | 182 | if generate_qhp: 183 | build_params['doxygen']['generate_qhp'] = generate_qhp 184 | 185 | print(build_params) 186 | 187 | html_dir = os.path.join(output_dir, 'html') 188 | 189 | failed_plugins = [] 190 | for plugin_name, plugin in plugins: 191 | #check to see if we're supposed to build each plugin 192 | if plugin_name in build_params: 193 | try: 194 | plugin(path, package, manifest, build_params[plugin_name], html_dir, quiet) 195 | except Exception as e: 196 | traceback.print_exc() 197 | print("plugin [%s] failed" % (plugin_name), file=sys.stderr) 198 | failed_plugins.append((plugin_name, e)) 199 | 200 | #Generate a landing page for the package, requires passing all the build_parameters on 201 | landing_page.generate_landing_page(package, manifest, build_params, html_dir) 202 | 203 | #Generate documentation for messages and store the messages successfully generated 204 | from . import msgenator 205 | msgs, srvs, actions = msgenator.generate_msg_docs(package, path, manifest, html_dir) 206 | 207 | #Write meta data for the package to a yaml file for use by external tools 208 | build_manifest_yaml(manifest, msgs, srvs, actions, output_dir) 209 | 210 | #We'll also write the message stylesheet that the landing page and message docs use 211 | styles_name = 'msg-styles.css' 212 | styles_in = os.path.join(rdcore.get_templates_dir(), styles_name) 213 | styles_css = os.path.join(html_dir, styles_name) 214 | print("copying %s to %s" % (styles_in, styles_css)) 215 | shutil.copyfile(styles_in, styles_css) 216 | 217 | if len(failed_plugins) > 0: 218 | print("ERROR: plugins %s have failed" % (",".join("[%s]" % (f[0],) for f in failed_plugins),), file=sys.stderr) 219 | for failed_plugin, e in failed_plugins: 220 | if build_params.get(failed_plugin, {}).get('required', False): 221 | print('plugin [%s] was required, returning failure' % (failed_plugin,), file=sys.stderr) 222 | raise e 223 | 224 | 225 | def is_catkin(path): 226 | return os.path.isfile(os.path.join(path, 'package.xml')) 227 | 228 | 229 | def main(): 230 | parser = get_optparse(NAME) 231 | options, args = parser.parse_args() 232 | 233 | if len(args) != 1: 234 | print("Please give %s exactly one package path" % NAME) 235 | parser.print_help() 236 | sys.exit(1) 237 | 238 | path = os.path.realpath(args[0]) 239 | package = os.path.basename(path) 240 | pkg_desc = get_pkg_desc(path) 241 | 242 | manifest = rdcore.PackageInformation(pkg_desc) 243 | print("Documenting %s located here: %s" % (package, path)) 244 | 245 | try: 246 | generate_docs(path, package, manifest, options.docdir, options.tagfile, options.generate_tagfile, options.generate_qhp, options.quiet) 247 | print("Done documenting %s you can find your documentation here: %s" % (package, os.path.realpath(options.docdir))) 248 | except: 249 | traceback.print_exc() 250 | sys.exit(1) 251 | 252 | 253 | def get_pkg_desc(path): 254 | #Check whether we've got a catkin or non-catkin package 255 | if is_catkin(path): 256 | pkg_desc = parse_package(path) 257 | print("Documenting a catkin package") 258 | else: 259 | rp = rospkg.RosPack() 260 | package = os.path.basename(path) 261 | try: 262 | ros_path = os.path.realpath(rp.get_path(package)) 263 | except rospkg.common.ResourceNotFound as e: 264 | sys.stderr.write("Rospack could not find the %s. Are you sure it's on your ROS_PACKAGE_PATH?\n" % package) 265 | sys.exit(1) 266 | if ros_path != path: 267 | sys.stderr.write("The path passed in does not match that returned \ 268 | by rospack. Requested path: %s. Rospack path: %s.\n" % (path, ros_path)) 269 | sys.exit(1) 270 | pkg_desc = rp.get_manifest(package) 271 | print("Documenting a non-catkin package") 272 | return pkg_desc 273 | 274 | 275 | def get_generator_output_folders(path): 276 | pkg_desc = get_pkg_desc(path) 277 | manifest = rdcore.PackageInformation(pkg_desc) 278 | 279 | # load any rosdoc configuration files 280 | rd_config = load_rd_config(path, manifest) 281 | 282 | # put the rd_config into a form that's easier to use with plugins 283 | package = os.path.basename(path) 284 | build_params = generate_build_params(rd_config, package) 285 | print('build_params', build_params) 286 | 287 | data = {} 288 | for builder, params in build_params.items(): 289 | if 'output_dir' in params: 290 | output_dir = params['output_dir'] 291 | if output_dir != '.': 292 | data[builder] = output_dir 293 | return data 294 | -------------------------------------------------------------------------------- /src/rosdoc_lite/doxygenator.py: -------------------------------------------------------------------------------- 1 | # Software License Agreement (BSD License) 2 | # 3 | # Copyright (c) 2008, Willow Garage, Inc. 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions 8 | # are met: 9 | # 10 | # * Redistributions of source code must retain the above copyright 11 | # notice, this list of conditions and the following disclaimer. 12 | # * Redistributions in binary form must reproduce the above 13 | # copyright notice, this list of conditions and the following 14 | # disclaimer in the documentation and/or other materials provided 15 | # with the distribution. 16 | # * Neither the name of Willow Garage, Inc. nor the names of its 17 | # contributors may be used to endorse or promote products derived 18 | # from this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 23 | # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 24 | # COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 25 | # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 26 | # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 27 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 28 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 30 | # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | # POSSIBILITY OF SUCH DAMAGE. 32 | # 33 | 34 | from __future__ import with_statement 35 | from __future__ import print_function 36 | 37 | import os 38 | import subprocess 39 | import sys 40 | from subprocess import Popen, PIPE 41 | import tempfile 42 | import shutil 43 | import yaml 44 | 45 | from . import rdcore 46 | 47 | 48 | def run_doxygen(package, doxygen_file, quiet=False): 49 | try: 50 | command = ['doxygen', doxygen_file] 51 | if quiet: 52 | process = Popen(command, stdout=PIPE, stderr=PIPE) 53 | else: 54 | print("doxygen-ating %s [%s]" % (package, ' '.join(command))) 55 | process = Popen(command, stdout=PIPE) 56 | com = process.communicate() 57 | if process.returncode != 0: 58 | raise subprocess.CalledProcessError(process.returncode, command, com[0]) 59 | except OSError: 60 | #fatal 61 | print("""\nERROR: It appears that you do not have doxygen installed. 62 | If you are on Ubuntu/Debian, you can install doxygen by typing: 63 | 64 | sudo apt-get install doxygen 65 | """, file=sys.stderr) 66 | sys.exit(1) 67 | 68 | 69 | def write_to_file(f, tmpl): 70 | """utility to write string data to files and handle unicode""" 71 | try: 72 | if type(tmpl) == str: 73 | f.write(tmpl) 74 | else: # iso-8859-1 is the declared encoding of doxygen 75 | f.write(tmpl.encode('utf-8')) 76 | f.flush() 77 | except: 78 | print("ERROR, f[%s], tmpl[%s]" % (f, tmpl)) 79 | raise 80 | 81 | 82 | def load_manifest_vars(rd_config, package, manifest): 83 | """readies manifest information for inclusion in doxygen templates""" 84 | author = license_str = description = status = brief = '' 85 | 86 | # by default, assume that packages are on wiki 87 | home_url = 'http://wiki.ros.org/%s' % package 88 | home_url = rd_config.get('homepage', home_url) 89 | 90 | project_link = '%s' % (home_url, package) 91 | if manifest is not None: 92 | license_str = manifest.license or '' 93 | author = manifest.author or '' 94 | description = manifest.description or '' 95 | status = manifest.status or '' 96 | 97 | if manifest.brief: 98 | brief = ": " + manifest.brief 99 | else: 100 | print("no manifest [%s]" % (package)) 101 | 102 | return {'$package': package, 103 | '$projectlink': project_link, '$license': license_str, 104 | '$description': description, '$brief': brief, 105 | '$author': author, '$status': status, '$home_url': home_url 106 | } 107 | 108 | 109 | def prepare_tagfiles(tagfile_spec, tagfile_dir, output_subfolder): 110 | """A function that will load a tagfile from either a URL or the filesystem""" 111 | tagfile_list = [] 112 | with open(tagfile_spec) as f: 113 | tagfile_list = yaml.safe_load(f) 114 | tagfile_string = "" 115 | for tag_pair in tagfile_list: 116 | print(tag_pair) 117 | if tag_pair['location'].find("http://") == 0: 118 | #We need to download the file from somewhere online 119 | try: 120 | if sys.version_info.major < 3: 121 | # python 2 122 | from urllib2 import urlopen, URLError, HTTPError 123 | else: 124 | # python 3 125 | from urllib.request import urlopen 126 | from urllib.error import URLError, HTTPError 127 | except ImportError: 128 | print("Could not import urllib, skipping", file=sys.stderr) 129 | continue 130 | 131 | try: 132 | ret = urlopen(tag_pair['location']) 133 | if ret.code != 200: 134 | print("Could not fetch the tagfile from %s, skipping" % tag_pair['location'], file=sys.stderr) 135 | continue 136 | tagfile_name = os.path.basename(tag_pair['location']) 137 | tagfile_path = os.path.join(tagfile_dir, tagfile_name) 138 | tagfile = open(tagfile_path, 'w') 139 | if sys.version_info.major < 3: 140 | # python 2 141 | tagfile.write(ret.read()) 142 | else: 143 | # python 3 144 | tagfile.write(ret.read().decode(ret.headers.get_content_charset() or 'utf-8')) 145 | tagfile.close() 146 | tagfile_string += "%s=%s " % (tagfile_path, get_doc_path(output_subfolder, tag_pair)) 147 | except (URLError, HTTPError) as e: 148 | print("Could not fetch the tagfile from %s, skipping" % tag_pair['location'], file=sys.stderr) 149 | continue 150 | elif tag_pair['location'].find("file://") == 0: 151 | tagfile_path = tag_pair['location'][7:] 152 | tagfile_string += "%s=%s " % (tagfile_path, get_doc_path(output_subfolder, tag_pair)) 153 | else: 154 | print("Tagfile location only supports http// and file:// prefixes, but you specify %s, skipping" % tag_pair['location'], 155 | file=sys.stderr) 156 | return tagfile_string 157 | 158 | 159 | def get_doc_path(output_subfolder, tag_pair): 160 | """Gets path from output_subfolder to url of tag_pair 161 | 162 | If the url is a relative path from the root of documentation, the resulting 163 | path will be relative to the output_subfolder, otherwise the absolute url 164 | will be returned. 165 | """ 166 | path = tag_pair['docs_url'] 167 | # prefix the path with as many .. as the output_subfolder is deep 168 | if not path.startswith('http://') and not path.startswith('https://'): 169 | if output_subfolder != '.': 170 | output_subfolder_level = len(output_subfolder.split('/')) 171 | reverse_output_subfolder = output_subfolder_level * ['..'] 172 | reverse_output_subfolder = os.path.join(*reverse_output_subfolder) 173 | path = os.path.join(reverse_output_subfolder, path) 174 | # append generator specific output folder 175 | if 'doxygen_output_folder' in tag_pair: 176 | path = os.path.join(path, tag_pair['doxygen_output_folder']) 177 | return path 178 | 179 | 180 | def package_doxygen_template(template, rd_config, path, package, html_dir, header_filename, footer_filename, manifest_dir, tagfile_dir, output_subfolder): 181 | # set defaults for overridable keys 182 | file_patterns = '*.c *.cpp *.h *.cc *.hh *.hpp *.py *.dox *.java' 183 | excludes = '%s/build/' % path 184 | predefined = '' 185 | 186 | #Read tagfiles from configuration rather than hardcoding 187 | tagfiles = "" 188 | print(rd_config) 189 | if 'tagfile_spec' in rd_config: 190 | tagfiles = prepare_tagfiles(rd_config['tagfile_spec'], tagfile_dir, output_subfolder) 191 | 192 | generate_tagfile = '' 193 | if 'generate_tagfile' in rd_config: 194 | generate_tagfile = rd_config['generate_tagfile'] 195 | generate_dir = os.path.dirname(generate_tagfile) 196 | #Make sure that the directory to place the tagfile in exists 197 | if not os.path.isdir(generate_dir): 198 | os.makedirs(generate_dir) 199 | 200 | print("Generated the following tagfile string %s" % tagfiles) 201 | 202 | mdfile = rd_config.get('use_mdfile_as_mainpage', '') 203 | if mdfile: 204 | mdfile = os.path.join(path, mdfile) 205 | 206 | # example path is where htmlinclude operates, so we'll set it to the directory storying manifest.html 207 | dvars = { '$ALIASES': rd_config.get('aliases', ''), 208 | '$EXAMPLE_PATH': "%s %s" % (path, manifest_dir), 209 | '$EXAMPLE_PATTERNS': rd_config.get('example_patterns', ''), 210 | '$EXCLUDE_PATTERNS': rd_config.get('exclude_patterns', ''), 211 | '$EXCLUDE_PROP': rd_config.get('exclude', excludes), 212 | '$EXCLUDE_SYMBOLS': rd_config.get('exclude_symbols', ''), 213 | '$EXTRACT_ALL': rd_config.get('extract_all', 'YES'), 214 | '$FILE_PATTERNS': rd_config.get('file_patterns', file_patterns), 215 | '$GENERATE_TAGFILE': generate_tagfile, 216 | '$GENERATE_TREEVIEW': rd_config.get('generate_treeview', 'NO'), 217 | '$GENERATE_QHP': rd_config.get('generate_qhp', 'NO'), 218 | '$HTML_FOOTER': footer_filename, 219 | '$HTML_HEADER': header_filename, 220 | '$HTML_OUTPUT': os.path.realpath(html_dir), 221 | '$IMAGE_PATH': rd_config.get('image_path', path), #default to $INPUT 222 | '$INCLUDE_PATH': rd_config.get('include_path', ''), 223 | '$INPUT': ' '.join([path, mdfile]), 224 | '$INPUT_FILTER': rd_config.get('input_filter', ''), 225 | '$PROJECT_NAME': package, 226 | '$JAVADOC_AUTOBRIEF': rd_config.get('javadoc_autobrief', 'NO'), 227 | '$MULTILINE_CPP_IS_BRIEF': rd_config.get('multiline_cpp_is_brief', 'NO'), 228 | '$OUTPUT_DIRECTORY': html_dir, 229 | '$PREDEFINED': rd_config.get('predefined', predefined), 230 | '$QHP_NAMESPACE': 'org.ros.' + package, 231 | '$SEARCHENGINE': rd_config.get('searchengine', 'NO'), 232 | '$TAB_SIZE': rd_config.get('tab_size', '8'), 233 | '$TAGFILES': tagfiles, 234 | '$USE_MDFILE_AS_MAINPAGE': rd_config.get('use_mdfile_as_mainpage', '') 235 | } 236 | return rdcore.instantiate_template(template, dvars) 237 | 238 | 239 | def generate_doxygen(path, package, manifest, rd_config, output_dir, quiet): 240 | """ 241 | Main entrypoint into creating Doxygen documentation 242 | Will throw an exception if documentation generation fails 243 | """ 244 | #make sure that we create docs in a subdirectory if requested 245 | output_subfolder = rd_config.get('output_dir', '.') 246 | html_dir = os.path.join(output_dir, output_subfolder) 247 | 248 | #Storage for our tempfiles 249 | files = [] 250 | #We need a temp directory to be able to include the manifest file 251 | manifest_dir = tempfile.mkdtemp(prefix='rosdoc_lite_doxygen') 252 | tagfile_dir = tempfile.mkdtemp(prefix='rosdoc_lite_doxygen_tagfiles') 253 | try: 254 | if not os.path.isdir(html_dir): 255 | os.makedirs(html_dir) 256 | 257 | #Create files to write for doxygen generation, these files will be used 258 | #by doxygen from the command line 259 | header_file = tempfile.NamedTemporaryFile('w+') 260 | footer_file = tempfile.NamedTemporaryFile('w+') 261 | manifest_file = open(os.path.join(manifest_dir, 'manifest.html'), 'w') 262 | doxygen_file = tempfile.NamedTemporaryFile('w+') 263 | files = [header_file, footer_file, manifest_file, doxygen_file] 264 | 265 | #Generate our Doxygen templates and fill them in with the right info 266 | doxy_template = rdcore.load_tmpl('doxy.template') 267 | doxy = package_doxygen_template(doxy_template, rd_config, path, package, html_dir, header_file.name, footer_file.name, manifest_dir, tagfile_dir, output_subfolder) 268 | 269 | #Throw in manifest infomation into our including templates 270 | header_template = rdcore.load_tmpl('header.html') 271 | footer_template = rdcore.load_tmpl('footer.html') 272 | manifest_template = rdcore.load_tmpl('manifest.html') 273 | manifest_vars = load_manifest_vars(rd_config, package, manifest) 274 | header, footer, manifest_html = [rdcore.instantiate_template(t, manifest_vars) for t in [header_template, footer_template, manifest_template]] 275 | 276 | #Actually write files to disk so that doxygen can find them and use them 277 | for f, tmpl in zip(files, [header, footer, manifest_html, doxy]): 278 | write_to_file(f, tmpl) 279 | 280 | # doxygenate 281 | run_doxygen(package, doxygen_file.name, quiet) 282 | 283 | """ 284 | # support files (stylesheets) 285 | # Can uncomment this to get old ROS styles for doxygen, but I prefer the defaults 286 | # I just think they look better 287 | dstyles_in = os.path.join(rdcore.get_templates_dir(), 'doxygen.css') 288 | dstyles_css = os.path.join(html_dir, 'doxygen.css') 289 | shutil.copyfile(dstyles_in, dstyles_css) 290 | """ 291 | 292 | except Exception as e: 293 | print("ERROR: Doxygen of package [%s] failed: %s" % (package, str(e)), file=sys.stderr) 294 | #make sure to pass the exception up the stack 295 | raise 296 | finally: 297 | #make sure to clean up 298 | for f in files: 299 | f.close() 300 | shutil.rmtree(manifest_dir) 301 | shutil.rmtree(tagfile_dir) 302 | -------------------------------------------------------------------------------- /src/rosdoc_lite/templates/doxy.template: -------------------------------------------------------------------------------- 1 | # Doxyfile 1.8.6 2 | 3 | # This file describes the settings to be used by the documentation system 4 | # doxygen (www.doxygen.org) for a project. 5 | # 6 | # All text after a double hash (##) is considered a comment and is placed in 7 | # front of the TAG it is preceding. 8 | # 9 | # All text after a single hash (#) is considered a comment and will be ignored. 10 | # The format is: 11 | # TAG = value [value, ...] 12 | # For lists, items can also be appended using: 13 | # TAG += value [value, ...] 14 | # Values that contain spaces should be placed between quotes (\" \"). 15 | 16 | #--------------------------------------------------------------------------- 17 | # Project related configuration options 18 | #--------------------------------------------------------------------------- 19 | 20 | # This tag specifies the encoding used for all characters in the config file 21 | # that follow. The default is UTF-8 which is also the encoding used for all text 22 | # before the first occurrence of this tag. Doxygen uses libiconv (or the iconv 23 | # built into libc) for the transcoding. See http://www.gnu.org/software/libiconv 24 | # for the list of possible encodings. 25 | # The default value is: UTF-8. 26 | 27 | DOXYFILE_ENCODING = UTF-8 28 | 29 | # The PROJECT_NAME tag is a single word (or a sequence of words surrounded by 30 | # double-quotes, unless you are using Doxywizard) that should identify the 31 | # project for which the documentation is generated. This name is used in the 32 | # title of most generated pages and in a few other places. 33 | # The default value is: My Project. 34 | 35 | PROJECT_NAME = $PROJECT_NAME 36 | 37 | # The PROJECT_NUMBER tag can be used to enter a project or revision number. This 38 | # could be handy for archiving the generated documentation or if some version 39 | # control system is used. 40 | 41 | PROJECT_NUMBER = 42 | 43 | # Using the PROJECT_BRIEF tag one can provide an optional one line description 44 | # for a project that appears at the top of each page and should give viewer a 45 | # quick idea about the purpose of the project. Keep the description short. 46 | 47 | PROJECT_BRIEF = 48 | 49 | # With the PROJECT_LOGO tag one can specify an logo or icon that is included in 50 | # the documentation. The maximum height of the logo should not exceed 55 pixels 51 | # and the maximum width should not exceed 200 pixels. Doxygen will copy the logo 52 | # to the output directory. 53 | 54 | PROJECT_LOGO = 55 | 56 | # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path 57 | # into which the generated documentation will be written. If a relative path is 58 | # entered, it will be relative to the location where doxygen was started. If 59 | # left blank the current directory will be used. 60 | 61 | OUTPUT_DIRECTORY = $OUTPUT_DIRECTORY 62 | 63 | # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub- 64 | # directories (in 2 levels) under the output directory of each output format and 65 | # will distribute the generated files over these directories. Enabling this 66 | # option can be useful when feeding doxygen a huge amount of source files, where 67 | # putting all generated files in the same directory would otherwise causes 68 | # performance problems for the file system. 69 | # The default value is: NO. 70 | 71 | CREATE_SUBDIRS = NO 72 | 73 | # The OUTPUT_LANGUAGE tag is used to specify the language in which all 74 | # documentation generated by doxygen is written. Doxygen will use this 75 | # information to generate all constant output in the proper language. 76 | # Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, 77 | # Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), 78 | # Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, 79 | # Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), 80 | # Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, 81 | # Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, 82 | # Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, 83 | # Ukrainian and Vietnamese. 84 | # The default value is: English. 85 | 86 | OUTPUT_LANGUAGE = English 87 | 88 | # If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member 89 | # descriptions after the members that are listed in the file and class 90 | # documentation (similar to Javadoc). Set to NO to disable this. 91 | # The default value is: YES. 92 | 93 | BRIEF_MEMBER_DESC = YES 94 | 95 | # If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief 96 | # description of a member or function before the detailed description 97 | # 98 | # Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 99 | # brief descriptions will be completely suppressed. 100 | # The default value is: YES. 101 | 102 | REPEAT_BRIEF = YES 103 | 104 | # This tag implements a quasi-intelligent brief description abbreviator that is 105 | # used to form the text in various listings. Each string in this list, if found 106 | # as the leading text of the brief description, will be stripped from the text 107 | # and the result, after processing the whole list, is used as the annotated 108 | # text. Otherwise, the brief description is used as-is. If left blank, the 109 | # following values are used ($name is automatically replaced with the name of 110 | # the entity):The $name class, The $name widget, The $name file, is, provides, 111 | # specifies, contains, represents, a, an and the. 112 | 113 | ABBREVIATE_BRIEF = 114 | 115 | # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 116 | # doxygen will generate a detailed section even if there is only a brief 117 | # description. 118 | # The default value is: NO. 119 | 120 | ALWAYS_DETAILED_SEC = NO 121 | 122 | # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all 123 | # inherited members of a class in the documentation of that class as if those 124 | # members were ordinary class members. Constructors, destructors and assignment 125 | # operators of the base classes will not be shown. 126 | # The default value is: NO. 127 | 128 | INLINE_INHERITED_MEMB = NO 129 | 130 | # If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path 131 | # before files name in the file list and in the header files. If set to NO the 132 | # shortest path that makes the file name unique will be used 133 | # The default value is: YES. 134 | 135 | FULL_PATH_NAMES = NO 136 | 137 | # The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. 138 | # Stripping is only done if one of the specified strings matches the left-hand 139 | # part of the path. The tag can be used to show relative paths in the file list. 140 | # If left blank the directory from which doxygen is run is used as the path to 141 | # strip. 142 | # 143 | # Note that you can specify absolute paths here, but also relative paths, which 144 | # will be relative from the directory where doxygen is started. 145 | # This tag requires that the tag FULL_PATH_NAMES is set to YES. 146 | 147 | STRIP_FROM_PATH = 148 | 149 | # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the 150 | # path mentioned in the documentation of a class, which tells the reader which 151 | # header file to include in order to use a class. If left blank only the name of 152 | # the header file containing the class definition is used. Otherwise one should 153 | # specify the list of include paths that are normally passed to the compiler 154 | # using the -I flag. 155 | 156 | STRIP_FROM_INC_PATH = 157 | 158 | # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but 159 | # less readable) file names. This can be useful is your file systems doesn't 160 | # support long names like on DOS, Mac, or CD-ROM. 161 | # The default value is: NO. 162 | 163 | SHORT_NAMES = NO 164 | 165 | # If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the 166 | # first line (until the first dot) of a Javadoc-style comment as the brief 167 | # description. If set to NO, the Javadoc-style will behave just like regular Qt- 168 | # style comments (thus requiring an explicit @brief command for a brief 169 | # description.) 170 | # The default value is: NO. 171 | 172 | JAVADOC_AUTOBRIEF = $JAVADOC_AUTOBRIEF 173 | 174 | # If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first 175 | # line (until the first dot) of a Qt-style comment as the brief description. If 176 | # set to NO, the Qt-style will behave just like regular Qt-style comments (thus 177 | # requiring an explicit \brief command for a brief description.) 178 | # The default value is: NO. 179 | 180 | QT_AUTOBRIEF = NO 181 | 182 | # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a 183 | # multi-line C++ special comment block (i.e. a block of //! or /// comments) as 184 | # a brief description. This used to be the default behavior. The new default is 185 | # to treat a multi-line C++ comment block as a detailed description. Set this 186 | # tag to YES if you prefer the old behavior instead. 187 | # 188 | # Note that setting this tag to YES also means that rational rose comments are 189 | # not recognized any more. 190 | # The default value is: NO. 191 | 192 | MULTILINE_CPP_IS_BRIEF = $MULTILINE_CPP_IS_BRIEF 193 | 194 | # If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the 195 | # documentation from any documented member that it re-implements. 196 | # The default value is: YES. 197 | 198 | INHERIT_DOCS = YES 199 | 200 | # If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a 201 | # new page for each member. If set to NO, the documentation of a member will be 202 | # part of the file/class/namespace that contains it. 203 | # The default value is: NO. 204 | 205 | SEPARATE_MEMBER_PAGES = NO 206 | 207 | # The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen 208 | # uses this value to replace tabs by spaces in code fragments. 209 | # Minimum value: 1, maximum value: 16, default value: 4. 210 | 211 | TAB_SIZE = $TAB_SIZE 212 | 213 | # This tag can be used to specify a number of aliases that act as commands in 214 | # the documentation. An alias has the form: 215 | # name=value 216 | # For example adding 217 | # "sideeffect=@par Side Effects:\n" 218 | # will allow you to put the command \sideeffect (or @sideeffect) in the 219 | # documentation, which will result in a user-defined paragraph with heading 220 | # "Side Effects:". You can put \n's in the value part of an alias to insert 221 | # newlines. 222 | 223 | ALIASES = $ALIASES 224 | 225 | # This tag can be used to specify a number of word-keyword mappings (TCL only). 226 | # A mapping has the form "name=value". For example adding "class=itcl::class" 227 | # will allow you to use the command class in the itcl::class meaning. 228 | 229 | TCL_SUBST = 230 | 231 | # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources 232 | # only. Doxygen will then generate output that is more tailored for C. For 233 | # instance, some of the names that are used will be different. The list of all 234 | # members will be omitted, etc. 235 | # The default value is: NO. 236 | 237 | OPTIMIZE_OUTPUT_FOR_C = NO 238 | 239 | # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or 240 | # Python sources only. Doxygen will then generate output that is more tailored 241 | # for that language. For instance, namespaces will be presented as packages, 242 | # qualified scopes will look different, etc. 243 | # The default value is: NO. 244 | 245 | OPTIMIZE_OUTPUT_JAVA = NO 246 | 247 | # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran 248 | # sources. Doxygen will then generate output that is tailored for Fortran. 249 | # The default value is: NO. 250 | 251 | OPTIMIZE_FOR_FORTRAN = NO 252 | 253 | # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL 254 | # sources. Doxygen will then generate output that is tailored for VHDL. 255 | # The default value is: NO. 256 | 257 | OPTIMIZE_OUTPUT_VHDL = NO 258 | 259 | # Doxygen selects the parser to use depending on the extension of the files it 260 | # parses. With this tag you can assign which parser to use for a given 261 | # extension. Doxygen has a built-in mapping, but you can override or extend it 262 | # using this tag. The format is ext=language, where ext is a file extension, and 263 | # language is one of the parsers supported by doxygen: IDL, Java, Javascript, 264 | # C#, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL. For instance to make 265 | # doxygen treat .inc files as Fortran files (default is PHP), and .f files as C 266 | # (default is Fortran), use: inc=Fortran f=C. 267 | # 268 | # Note For files without extension you can use no_extension as a placeholder. 269 | # 270 | # Note that for custom extensions you also need to set FILE_PATTERNS otherwise 271 | # the files are not read by doxygen. 272 | 273 | EXTENSION_MAPPING = 274 | 275 | # If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments 276 | # according to the Markdown format, which allows for more readable 277 | # documentation. See http://daringfireball.net/projects/markdown/ for details. 278 | # The output of markdown processing is further processed by doxygen, so you can 279 | # mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in 280 | # case of backward compatibilities issues. 281 | # The default value is: YES. 282 | 283 | MARKDOWN_SUPPORT = YES 284 | 285 | # When enabled doxygen tries to link words that correspond to documented 286 | # classes, or namespaces to their corresponding documentation. Such a link can 287 | # be prevented in individual cases by by putting a % sign in front of the word 288 | # or globally by setting AUTOLINK_SUPPORT to NO. 289 | # The default value is: YES. 290 | 291 | AUTOLINK_SUPPORT = YES 292 | 293 | # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want 294 | # to include (a tag file for) the STL sources as input, then you should set this 295 | # tag to YES in order to let doxygen match functions declarations and 296 | # definitions whose arguments contain STL classes (e.g. func(std::string); 297 | # versus func(std::string) {}). This also make the inheritance and collaboration 298 | # diagrams that involve STL classes more complete and accurate. 299 | # The default value is: NO. 300 | 301 | BUILTIN_STL_SUPPORT = NO 302 | 303 | # If you use Microsoft's C++/CLI language, you should set this option to YES to 304 | # enable parsing support. 305 | # The default value is: NO. 306 | 307 | CPP_CLI_SUPPORT = NO 308 | 309 | # Set the SIP_SUPPORT tag to YES if your project consists of sip (see: 310 | # http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen 311 | # will parse them like normal C++ but will assume all classes use public instead 312 | # of private inheritance when no explicit protection keyword is present. 313 | # The default value is: NO. 314 | 315 | SIP_SUPPORT = NO 316 | 317 | # For Microsoft's IDL there are propget and propput attributes to indicate 318 | # getter and setter methods for a property. Setting this option to YES will make 319 | # doxygen to replace the get and set methods by a property in the documentation. 320 | # This will only work if the methods are indeed getting or setting a simple 321 | # type. If this is not the case, or you want to show the methods anyway, you 322 | # should set this option to NO. 323 | # The default value is: YES. 324 | 325 | IDL_PROPERTY_SUPPORT = YES 326 | 327 | # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 328 | # tag is set to YES, then doxygen will reuse the documentation of the first 329 | # member in the group (if any) for the other members of the group. By default 330 | # all members of a group must be documented explicitly. 331 | # The default value is: NO. 332 | 333 | DISTRIBUTE_GROUP_DOC = NO 334 | 335 | # Set the SUBGROUPING tag to YES to allow class member groups of the same type 336 | # (for instance a group of public functions) to be put as a subgroup of that 337 | # type (e.g. under the Public Functions section). Set it to NO to prevent 338 | # subgrouping. Alternatively, this can be done per class using the 339 | # \nosubgrouping command. 340 | # The default value is: YES. 341 | 342 | SUBGROUPING = YES 343 | 344 | # When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions 345 | # are shown inside the group in which they are included (e.g. using \ingroup) 346 | # instead of on a separate page (for HTML and Man pages) or section (for LaTeX 347 | # and RTF). 348 | # 349 | # Note that this feature does not work in combination with 350 | # SEPARATE_MEMBER_PAGES. 351 | # The default value is: NO. 352 | 353 | INLINE_GROUPED_CLASSES = NO 354 | 355 | # When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions 356 | # with only public data fields or simple typedef fields will be shown inline in 357 | # the documentation of the scope in which they are defined (i.e. file, 358 | # namespace, or group documentation), provided this scope is documented. If set 359 | # to NO, structs, classes, and unions are shown on a separate page (for HTML and 360 | # Man pages) or section (for LaTeX and RTF). 361 | # The default value is: NO. 362 | 363 | INLINE_SIMPLE_STRUCTS = NO 364 | 365 | # When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or 366 | # enum is documented as struct, union, or enum with the name of the typedef. So 367 | # typedef struct TypeS {} TypeT, will appear in the documentation as a struct 368 | # with name TypeT. When disabled the typedef will appear as a member of a file, 369 | # namespace, or class. And the struct will be named TypeS. This can typically be 370 | # useful for C code in case the coding convention dictates that all compound 371 | # types are typedef'ed and only the typedef is referenced, never the tag name. 372 | # The default value is: NO. 373 | 374 | TYPEDEF_HIDES_STRUCT = NO 375 | 376 | # The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This 377 | # cache is used to resolve symbols given their name and scope. Since this can be 378 | # an expensive process and often the same symbol appears multiple times in the 379 | # code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small 380 | # doxygen will become slower. If the cache is too large, memory is wasted. The 381 | # cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range 382 | # is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 383 | # symbols. At the end of a run doxygen will report the cache usage and suggest 384 | # the optimal cache size from a speed point of view. 385 | # Minimum value: 0, maximum value: 9, default value: 0. 386 | 387 | LOOKUP_CACHE_SIZE = 0 388 | 389 | #--------------------------------------------------------------------------- 390 | # Build related configuration options 391 | #--------------------------------------------------------------------------- 392 | 393 | # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 394 | # documentation are documented, even if no documentation was available. Private 395 | # class members and static file members will be hidden unless the 396 | # EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. 397 | # Note: This will also disable the warnings about undocumented members that are 398 | # normally produced when WARNINGS is set to YES. 399 | # The default value is: NO. 400 | 401 | EXTRACT_ALL = $EXTRACT_ALL 402 | 403 | # If the EXTRACT_PRIVATE tag is set to YES all private members of a class will 404 | # be included in the documentation. 405 | # The default value is: NO. 406 | 407 | EXTRACT_PRIVATE = YES 408 | 409 | # If the EXTRACT_PACKAGE tag is set to YES all members with package or internal 410 | # scope will be included in the documentation. 411 | # The default value is: NO. 412 | 413 | EXTRACT_PACKAGE = NO 414 | 415 | # If the EXTRACT_STATIC tag is set to YES all static members of a file will be 416 | # included in the documentation. 417 | # The default value is: NO. 418 | 419 | EXTRACT_STATIC = YES 420 | 421 | # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined 422 | # locally in source files will be included in the documentation. If set to NO 423 | # only classes defined in header files are included. Does not have any effect 424 | # for Java sources. 425 | # The default value is: YES. 426 | 427 | EXTRACT_LOCAL_CLASSES = YES 428 | 429 | # This flag is only useful for Objective-C code. When set to YES local methods, 430 | # which are defined in the implementation section but not in the interface are 431 | # included in the documentation. If set to NO only methods in the interface are 432 | # included. 433 | # The default value is: NO. 434 | 435 | EXTRACT_LOCAL_METHODS = NO 436 | 437 | # If this flag is set to YES, the members of anonymous namespaces will be 438 | # extracted and appear in the documentation as a namespace called 439 | # 'anonymous_namespace{file}', where file will be replaced with the base name of 440 | # the file that contains the anonymous namespace. By default anonymous namespace 441 | # are hidden. 442 | # The default value is: NO. 443 | 444 | EXTRACT_ANON_NSPACES = NO 445 | 446 | # If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all 447 | # undocumented members inside documented classes or files. If set to NO these 448 | # members will be included in the various overviews, but no documentation 449 | # section is generated. This option has no effect if EXTRACT_ALL is enabled. 450 | # The default value is: NO. 451 | 452 | HIDE_UNDOC_MEMBERS = NO 453 | 454 | # If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all 455 | # undocumented classes that are normally visible in the class hierarchy. If set 456 | # to NO these classes will be included in the various overviews. This option has 457 | # no effect if EXTRACT_ALL is enabled. 458 | # The default value is: NO. 459 | 460 | HIDE_UNDOC_CLASSES = NO 461 | 462 | # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend 463 | # (class|struct|union) declarations. If set to NO these declarations will be 464 | # included in the documentation. 465 | # The default value is: NO. 466 | 467 | HIDE_FRIEND_COMPOUNDS = NO 468 | 469 | # If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any 470 | # documentation blocks found inside the body of a function. If set to NO these 471 | # blocks will be appended to the function's detailed documentation block. 472 | # The default value is: NO. 473 | 474 | HIDE_IN_BODY_DOCS = NO 475 | 476 | # The INTERNAL_DOCS tag determines if documentation that is typed after a 477 | # \internal command is included. If the tag is set to NO then the documentation 478 | # will be excluded. Set it to YES to include the internal documentation. 479 | # The default value is: NO. 480 | 481 | INTERNAL_DOCS = NO 482 | 483 | # If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file 484 | # names in lower-case letters. If set to YES upper-case letters are also 485 | # allowed. This is useful if you have classes or files whose names only differ 486 | # in case and if your file system supports case sensitive file names. Windows 487 | # and Mac users are advised to set this option to NO. 488 | # The default value is: system dependent. 489 | 490 | CASE_SENSE_NAMES = YES 491 | 492 | # If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with 493 | # their full class and namespace scopes in the documentation. If set to YES the 494 | # scope will be hidden. 495 | # The default value is: NO. 496 | 497 | HIDE_SCOPE_NAMES = NO 498 | 499 | # If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of 500 | # the files that are included by a file in the documentation of that file. 501 | # The default value is: YES. 502 | 503 | SHOW_INCLUDE_FILES = YES 504 | 505 | # If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each 506 | # grouped member an include statement to the documentation, telling the reader 507 | # which file to include in order to use the member. 508 | # The default value is: NO. 509 | 510 | SHOW_GROUPED_MEMB_INC = NO 511 | 512 | # If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include 513 | # files with double quotes in the documentation rather than with sharp brackets. 514 | # The default value is: NO. 515 | 516 | FORCE_LOCAL_INCLUDES = NO 517 | 518 | # If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the 519 | # documentation for inline members. 520 | # The default value is: YES. 521 | 522 | INLINE_INFO = YES 523 | 524 | # If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the 525 | # (detailed) documentation of file and class members alphabetically by member 526 | # name. If set to NO the members will appear in declaration order. 527 | # The default value is: YES. 528 | 529 | SORT_MEMBER_DOCS = YES 530 | 531 | # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief 532 | # descriptions of file, namespace and class members alphabetically by member 533 | # name. If set to NO the members will appear in declaration order. Note that 534 | # this will also influence the order of the classes in the class list. 535 | # The default value is: NO. 536 | 537 | SORT_BRIEF_DOCS = YES 538 | 539 | # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the 540 | # (brief and detailed) documentation of class members so that constructors and 541 | # destructors are listed first. If set to NO the constructors will appear in the 542 | # respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. 543 | # Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief 544 | # member documentation. 545 | # Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting 546 | # detailed member documentation. 547 | # The default value is: NO. 548 | 549 | SORT_MEMBERS_CTORS_1ST = NO 550 | 551 | # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy 552 | # of group names into alphabetical order. If set to NO the group names will 553 | # appear in their defined order. 554 | # The default value is: NO. 555 | 556 | SORT_GROUP_NAMES = NO 557 | 558 | # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by 559 | # fully-qualified names, including namespaces. If set to NO, the class list will 560 | # be sorted only by class name, not including the namespace part. 561 | # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. 562 | # Note: This option applies only to the class list, not to the alphabetical 563 | # list. 564 | # The default value is: NO. 565 | 566 | SORT_BY_SCOPE_NAME = NO 567 | 568 | # If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper 569 | # type resolution of all parameters of a function it will reject a match between 570 | # the prototype and the implementation of a member function even if there is 571 | # only one candidate or it is obvious which candidate to choose by doing a 572 | # simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still 573 | # accept a match between prototype and implementation in such cases. 574 | # The default value is: NO. 575 | 576 | STRICT_PROTO_MATCHING = NO 577 | 578 | # The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the 579 | # todo list. This list is created by putting \todo commands in the 580 | # documentation. 581 | # The default value is: YES. 582 | 583 | GENERATE_TODOLIST = YES 584 | 585 | # The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the 586 | # test list. This list is created by putting \test commands in the 587 | # documentation. 588 | # The default value is: YES. 589 | 590 | GENERATE_TESTLIST = YES 591 | 592 | # The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug 593 | # list. This list is created by putting \bug commands in the documentation. 594 | # The default value is: YES. 595 | 596 | GENERATE_BUGLIST = YES 597 | 598 | # The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO) 599 | # the deprecated list. This list is created by putting \deprecated commands in 600 | # the documentation. 601 | # The default value is: YES. 602 | 603 | GENERATE_DEPRECATEDLIST= YES 604 | 605 | # The ENABLED_SECTIONS tag can be used to enable conditional documentation 606 | # sections, marked by \if ... \endif and \cond 607 | # ... \endcond blocks. 608 | 609 | ENABLED_SECTIONS = 610 | 611 | # The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the 612 | # initial value of a variable or macro / define can have for it to appear in the 613 | # documentation. If the initializer consists of more lines than specified here 614 | # it will be hidden. Use a value of 0 to hide initializers completely. The 615 | # appearance of the value of individual variables and macros / defines can be 616 | # controlled using \showinitializer or \hideinitializer command in the 617 | # documentation regardless of this setting. 618 | # Minimum value: 0, maximum value: 10000, default value: 30. 619 | 620 | MAX_INITIALIZER_LINES = 30 621 | 622 | # Set the SHOW_USED_FILES tag to NO to disable the list of files generated at 623 | # the bottom of the documentation of classes and structs. If set to YES the list 624 | # will mention the files that were used to generate the documentation. 625 | # The default value is: YES. 626 | 627 | SHOW_USED_FILES = YES 628 | 629 | # Set the SHOW_FILES tag to NO to disable the generation of the Files page. This 630 | # will remove the Files entry from the Quick Index and from the Folder Tree View 631 | # (if specified). 632 | # The default value is: YES. 633 | 634 | SHOW_FILES = YES 635 | 636 | # Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces 637 | # page. This will remove the Namespaces entry from the Quick Index and from the 638 | # Folder Tree View (if specified). 639 | # The default value is: YES. 640 | 641 | SHOW_NAMESPACES = YES 642 | 643 | # The FILE_VERSION_FILTER tag can be used to specify a program or script that 644 | # doxygen should invoke to get the current version for each file (typically from 645 | # the version control system). Doxygen will invoke the program by executing (via 646 | # popen()) the command command input-file, where command is the value of the 647 | # FILE_VERSION_FILTER tag, and input-file is the name of an input file provided 648 | # by doxygen. Whatever the program writes to standard output is used as the file 649 | # version. For an example see the documentation. 650 | 651 | FILE_VERSION_FILTER = 652 | 653 | # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed 654 | # by doxygen. The layout file controls the global structure of the generated 655 | # output files in an output format independent way. To create the layout file 656 | # that represents doxygen's defaults, run doxygen with the -l option. You can 657 | # optionally specify a file name after the option, if omitted DoxygenLayout.xml 658 | # will be used as the name of the layout file. 659 | # 660 | # Note that if you run doxygen from a directory containing a file called 661 | # DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE 662 | # tag is left empty. 663 | 664 | LAYOUT_FILE = 665 | 666 | # The CITE_BIB_FILES tag can be used to specify one or more bib files containing 667 | # the reference definitions. This must be a list of .bib files. The .bib 668 | # extension is automatically appended if omitted. This requires the bibtex tool 669 | # to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. 670 | # For LaTeX the style of the bibliography can be controlled using 671 | # LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the 672 | # search path. Do not use file names with spaces, bibtex cannot handle them. See 673 | # also \cite for info how to create references. 674 | 675 | CITE_BIB_FILES = 676 | 677 | #--------------------------------------------------------------------------- 678 | # Configuration options related to warning and progress messages 679 | #--------------------------------------------------------------------------- 680 | 681 | # The QUIET tag can be used to turn on/off the messages that are generated to 682 | # standard output by doxygen. If QUIET is set to YES this implies that the 683 | # messages are off. 684 | # The default value is: NO. 685 | 686 | QUIET = NO 687 | 688 | # The WARNINGS tag can be used to turn on/off the warning messages that are 689 | # generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES 690 | # this implies that the warnings are on. 691 | # 692 | # Tip: Turn warnings on while writing the documentation. 693 | # The default value is: YES. 694 | 695 | WARNINGS = YES 696 | 697 | # If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate 698 | # warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag 699 | # will automatically be disabled. 700 | # The default value is: YES. 701 | 702 | WARN_IF_UNDOCUMENTED = YES 703 | 704 | # If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for 705 | # potential errors in the documentation, such as not documenting some parameters 706 | # in a documented function, or documenting parameters that don't exist or using 707 | # markup commands wrongly. 708 | # The default value is: YES. 709 | 710 | WARN_IF_DOC_ERROR = YES 711 | 712 | # This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that 713 | # are documented, but have no documentation for their parameters or return 714 | # value. If set to NO doxygen will only warn about wrong or incomplete parameter 715 | # documentation, but not about the absence of documentation. 716 | # The default value is: NO. 717 | 718 | WARN_NO_PARAMDOC = NO 719 | 720 | # The WARN_FORMAT tag determines the format of the warning messages that doxygen 721 | # can produce. The string should contain the $file, $line, and $text tags, which 722 | # will be replaced by the file and line number from which the warning originated 723 | # and the warning text. Optionally the format may contain $version, which will 724 | # be replaced by the version of the file (if it could be obtained via 725 | # FILE_VERSION_FILTER) 726 | # The default value is: $file:$line: $text. 727 | 728 | WARN_FORMAT = "$file:$line: $text" 729 | 730 | # The WARN_LOGFILE tag can be used to specify a file to which warning and error 731 | # messages should be written. If left blank the output is written to standard 732 | # error (stderr). 733 | 734 | WARN_LOGFILE = 735 | 736 | #--------------------------------------------------------------------------- 737 | # Configuration options related to the input files 738 | #--------------------------------------------------------------------------- 739 | 740 | # The INPUT tag is used to specify the files and/or directories that contain 741 | # documented source files. You may enter file names like myfile.cpp or 742 | # directories like /usr/src/myproject. Separate the files or directories with 743 | # spaces. 744 | # Note: If this tag is empty the current directory is searched. 745 | 746 | INPUT = $INPUT 747 | 748 | # This tag can be used to specify the character encoding of the source files 749 | # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses 750 | # libiconv (or the iconv built into libc) for the transcoding. See the libiconv 751 | # documentation (see: http://www.gnu.org/software/libiconv) for the list of 752 | # possible encodings. 753 | # The default value is: UTF-8. 754 | 755 | INPUT_ENCODING = UTF-8 756 | 757 | # If the value of the INPUT tag contains directories, you can use the 758 | # FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and 759 | # *.h) to filter out the source-files in the directories. If left blank the 760 | # following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii, 761 | # *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, 762 | # *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, 763 | # *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, 764 | # *.qsf, *.as and *.js. 765 | 766 | FILE_PATTERNS = $FILE_PATTERNS 767 | 768 | # The RECURSIVE tag can be used to specify whether or not subdirectories should 769 | # be searched for input files as well. 770 | # The default value is: NO. 771 | 772 | RECURSIVE = YES 773 | 774 | # The EXCLUDE tag can be used to specify files and/or directories that should be 775 | # excluded from the INPUT source files. This way you can easily exclude a 776 | # subdirectory from a directory tree whose root is specified with the INPUT tag. 777 | # 778 | # Note that relative paths are relative to the directory from which doxygen is 779 | # run. 780 | 781 | EXCLUDE = $EXCLUDE_PROP 782 | 783 | # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or 784 | # directories that are symbolic links (a Unix file system feature) are excluded 785 | # from the input. 786 | # The default value is: NO. 787 | 788 | EXCLUDE_SYMLINKS = NO 789 | 790 | # If the value of the INPUT tag contains directories, you can use the 791 | # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 792 | # certain files from those directories. 793 | # 794 | # Note that the wildcards are matched against the file with absolute path, so to 795 | # exclude all test directories for example use the pattern */test/* 796 | 797 | EXCLUDE_PATTERNS = $EXCLUDE_PATTERNS 798 | 799 | # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names 800 | # (namespaces, classes, functions, etc.) that should be excluded from the 801 | # output. The symbol name can be a fully qualified name, a word, or if the 802 | # wildcard * is used, a substring. Examples: ANamespace, AClass, 803 | # AClass::ANamespace, ANamespace::*Test 804 | # 805 | # Note that the wildcards are matched against the file with absolute path, so to 806 | # exclude all test directories use the pattern */test/* 807 | 808 | EXCLUDE_SYMBOLS = $EXCLUDE_SYMBOLS 809 | 810 | # The EXAMPLE_PATH tag can be used to specify one or more files or directories 811 | # that contain example code fragments that are included (see the \include 812 | # command). 813 | 814 | EXAMPLE_PATH = $EXAMPLE_PATH 815 | 816 | # If the value of the EXAMPLE_PATH tag contains directories, you can use the 817 | # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and 818 | # *.h) to filter out the source-files in the directories. If left blank all 819 | # files are included. 820 | 821 | EXAMPLE_PATTERNS = $EXAMPLE_PATTERNS 822 | 823 | # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 824 | # searched for input files to be used with the \include or \dontinclude commands 825 | # irrespective of the value of the RECURSIVE tag. 826 | # The default value is: NO. 827 | 828 | EXAMPLE_RECURSIVE = YES 829 | 830 | # The IMAGE_PATH tag can be used to specify one or more files or directories 831 | # that contain images that are to be included in the documentation (see the 832 | # \image command). 833 | 834 | IMAGE_PATH = $IMAGE_PATH 835 | 836 | # The INPUT_FILTER tag can be used to specify a program that doxygen should 837 | # invoke to filter for each input file. Doxygen will invoke the filter program 838 | # by executing (via popen()) the command: 839 | # 840 | # 841 | # 842 | # where is the value of the INPUT_FILTER tag, and is the 843 | # name of an input file. Doxygen will then use the output that the filter 844 | # program writes to standard output. If FILTER_PATTERNS is specified, this tag 845 | # will be ignored. 846 | # 847 | # Note that the filter must not add or remove lines; it is applied before the 848 | # code is scanned, but not when the output code is generated. If lines are added 849 | # or removed, the anchors will not be placed correctly. 850 | 851 | INPUT_FILTER = 852 | 853 | # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern 854 | # basis. Doxygen will compare the file name with each pattern and apply the 855 | # filter if there is a match. The filters are a list of the form: pattern=filter 856 | # (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how 857 | # filters are used. If the FILTER_PATTERNS tag is empty or if none of the 858 | # patterns match the file name, INPUT_FILTER is applied. 859 | 860 | FILTER_PATTERNS = 861 | 862 | # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 863 | # INPUT_FILTER ) will also be used to filter the input files that are used for 864 | # producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). 865 | # The default value is: NO. 866 | 867 | FILTER_SOURCE_FILES = NO 868 | 869 | # The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file 870 | # pattern. A pattern will override the setting for FILTER_PATTERN (if any) and 871 | # it is also possible to disable source filtering for a specific pattern using 872 | # *.ext= (so without naming a filter). 873 | # This tag requires that the tag FILTER_SOURCE_FILES is set to YES. 874 | 875 | FILTER_SOURCE_PATTERNS = 876 | 877 | # If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that 878 | # is part of the input, its contents will be placed on the main page 879 | # (index.html). This can be useful if you have a project on for instance GitHub 880 | # and want to reuse the introduction page also for the doxygen output. 881 | 882 | USE_MDFILE_AS_MAINPAGE = $USE_MDFILE_AS_MAINPAGE 883 | 884 | #--------------------------------------------------------------------------- 885 | # Configuration options related to source browsing 886 | #--------------------------------------------------------------------------- 887 | 888 | # If the SOURCE_BROWSER tag is set to YES then a list of source files will be 889 | # generated. Documented entities will be cross-referenced with these sources. 890 | # 891 | # Note: To get rid of all source code in the generated output, make sure that 892 | # also VERBATIM_HEADERS is set to NO. 893 | # The default value is: NO. 894 | 895 | SOURCE_BROWSER = YES 896 | 897 | # Setting the INLINE_SOURCES tag to YES will include the body of functions, 898 | # classes and enums directly into the documentation. 899 | # The default value is: NO. 900 | 901 | INLINE_SOURCES = NO 902 | 903 | # Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any 904 | # special comment blocks from generated source code fragments. Normal C, C++ and 905 | # Fortran comments will always remain visible. 906 | # The default value is: YES. 907 | 908 | STRIP_CODE_COMMENTS = YES 909 | 910 | # If the REFERENCED_BY_RELATION tag is set to YES then for each documented 911 | # function all documented functions referencing it will be listed. 912 | # The default value is: NO. 913 | 914 | REFERENCED_BY_RELATION = NO 915 | 916 | # If the REFERENCES_RELATION tag is set to YES then for each documented function 917 | # all documented entities called/used by that function will be listed. 918 | # The default value is: NO. 919 | 920 | REFERENCES_RELATION = NO 921 | 922 | # If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set 923 | # to YES, then the hyperlinks from functions in REFERENCES_RELATION and 924 | # REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will 925 | # link to the documentation. 926 | # The default value is: YES. 927 | 928 | REFERENCES_LINK_SOURCE = YES 929 | 930 | # If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the 931 | # source code will show a tooltip with additional information such as prototype, 932 | # brief description and links to the definition and documentation. Since this 933 | # will make the HTML file larger and loading of large files a bit slower, you 934 | # can opt to disable this feature. 935 | # The default value is: YES. 936 | # This tag requires that the tag SOURCE_BROWSER is set to YES. 937 | 938 | SOURCE_TOOLTIPS = YES 939 | 940 | # If the USE_HTAGS tag is set to YES then the references to source code will 941 | # point to the HTML generated by the htags(1) tool instead of doxygen built-in 942 | # source browser. The htags tool is part of GNU's global source tagging system 943 | # (see http://www.gnu.org/software/global/global.html). You will need version 944 | # 4.8.6 or higher. 945 | # 946 | # To use it do the following: 947 | # - Install the latest version of global 948 | # - Enable SOURCE_BROWSER and USE_HTAGS in the config file 949 | # - Make sure the INPUT points to the root of the source tree 950 | # - Run doxygen as normal 951 | # 952 | # Doxygen will invoke htags (and that will in turn invoke gtags), so these 953 | # tools must be available from the command line (i.e. in the search path). 954 | # 955 | # The result: instead of the source browser generated by doxygen, the links to 956 | # source code will now point to the output of htags. 957 | # The default value is: NO. 958 | # This tag requires that the tag SOURCE_BROWSER is set to YES. 959 | 960 | USE_HTAGS = NO 961 | 962 | # If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a 963 | # verbatim copy of the header file for each class for which an include is 964 | # specified. Set to NO to disable this. 965 | # See also: Section \class. 966 | # The default value is: YES. 967 | 968 | VERBATIM_HEADERS = NO 969 | 970 | #--------------------------------------------------------------------------- 971 | # Configuration options related to the alphabetical class index 972 | #--------------------------------------------------------------------------- 973 | 974 | # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all 975 | # compounds will be generated. Enable this if the project contains a lot of 976 | # classes, structs, unions or interfaces. 977 | # The default value is: YES. 978 | 979 | ALPHABETICAL_INDEX = NO 980 | 981 | # The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in 982 | # which the alphabetical index list will be split. 983 | # Minimum value: 1, maximum value: 20, default value: 5. 984 | # This tag requires that the tag ALPHABETICAL_INDEX is set to YES. 985 | 986 | COLS_IN_ALPHA_INDEX = 5 987 | 988 | # In case all classes in a project start with a common prefix, all classes will 989 | # be put under the same header in the alphabetical index. The IGNORE_PREFIX tag 990 | # can be used to specify a prefix (or a list of prefixes) that should be ignored 991 | # while generating the index headers. 992 | # This tag requires that the tag ALPHABETICAL_INDEX is set to YES. 993 | 994 | IGNORE_PREFIX = 995 | 996 | #--------------------------------------------------------------------------- 997 | # Configuration options related to the HTML output 998 | #--------------------------------------------------------------------------- 999 | 1000 | # If the GENERATE_HTML tag is set to YES doxygen will generate HTML output 1001 | # The default value is: YES. 1002 | 1003 | GENERATE_HTML = YES 1004 | 1005 | # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a 1006 | # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of 1007 | # it. 1008 | # The default directory is: html. 1009 | # This tag requires that the tag GENERATE_HTML is set to YES. 1010 | 1011 | HTML_OUTPUT = $HTML_OUTPUT 1012 | 1013 | # The HTML_FILE_EXTENSION tag can be used to specify the file extension for each 1014 | # generated HTML page (for example: .htm, .php, .asp). 1015 | # The default value is: .html. 1016 | # This tag requires that the tag GENERATE_HTML is set to YES. 1017 | 1018 | HTML_FILE_EXTENSION = .html 1019 | 1020 | # The HTML_HEADER tag can be used to specify a user-defined HTML header file for 1021 | # each generated HTML page. If the tag is left blank doxygen will generate a 1022 | # standard header. 1023 | # 1024 | # To get valid HTML the header file that includes any scripts and style sheets 1025 | # that doxygen needs, which is dependent on the configuration options used (e.g. 1026 | # the setting GENERATE_TREEVIEW). It is highly recommended to start with a 1027 | # default header using 1028 | # doxygen -w html new_header.html new_footer.html new_stylesheet.css 1029 | # YourConfigFile 1030 | # and then modify the file new_header.html. See also section "Doxygen usage" 1031 | # for information on how to generate the default header that doxygen normally 1032 | # uses. 1033 | # Note: The header is subject to change so you typically have to regenerate the 1034 | # default header when upgrading to a newer version of doxygen. For a description 1035 | # of the possible markers and block names see the documentation. 1036 | # This tag requires that the tag GENERATE_HTML is set to YES. 1037 | 1038 | HTML_HEADER = $HTML_HEADER 1039 | 1040 | # The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each 1041 | # generated HTML page. If the tag is left blank doxygen will generate a standard 1042 | # footer. See HTML_HEADER for more information on how to generate a default 1043 | # footer and what special commands can be used inside the footer. See also 1044 | # section "Doxygen usage" for information on how to generate the default footer 1045 | # that doxygen normally uses. 1046 | # This tag requires that the tag GENERATE_HTML is set to YES. 1047 | 1048 | HTML_FOOTER = $HTML_FOOTER 1049 | 1050 | # The HTML_STYLESHEET tag can be used to specify a user-defined cascading style 1051 | # sheet that is used by each HTML page. It can be used to fine-tune the look of 1052 | # the HTML output. If left blank doxygen will generate a default style sheet. 1053 | # See also section "Doxygen usage" for information on how to generate the style 1054 | # sheet that doxygen normally uses. 1055 | # Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as 1056 | # it is more robust and this tag (HTML_STYLESHEET) will in the future become 1057 | # obsolete. 1058 | # This tag requires that the tag GENERATE_HTML is set to YES. 1059 | 1060 | HTML_STYLESHEET = 1061 | 1062 | # The HTML_EXTRA_STYLESHEET tag can be used to specify an additional user- 1063 | # defined cascading style sheet that is included after the standard style sheets 1064 | # created by doxygen. Using this option one can overrule certain style aspects. 1065 | # This is preferred over using HTML_STYLESHEET since it does not replace the 1066 | # standard style sheet and is therefor more robust against future updates. 1067 | # Doxygen will copy the style sheet file to the output directory. For an example 1068 | # see the documentation. 1069 | # This tag requires that the tag GENERATE_HTML is set to YES. 1070 | 1071 | HTML_EXTRA_STYLESHEET = 1072 | 1073 | # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or 1074 | # other source files which should be copied to the HTML output directory. Note 1075 | # that these files will be copied to the base HTML output directory. Use the 1076 | # $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these 1077 | # files. In the HTML_STYLESHEET file, use the file name only. Also note that the 1078 | # files will be copied as-is; there are no commands or markers available. 1079 | # This tag requires that the tag GENERATE_HTML is set to YES. 1080 | 1081 | HTML_EXTRA_FILES = 1082 | 1083 | # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen 1084 | # will adjust the colors in the stylesheet and background images according to 1085 | # this color. Hue is specified as an angle on a colorwheel, see 1086 | # http://en.wikipedia.org/wiki/Hue for more information. For instance the value 1087 | # 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 1088 | # purple, and 360 is red again. 1089 | # Minimum value: 0, maximum value: 359, default value: 220. 1090 | # This tag requires that the tag GENERATE_HTML is set to YES. 1091 | 1092 | HTML_COLORSTYLE_HUE = 220 1093 | 1094 | # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors 1095 | # in the HTML output. For a value of 0 the output will use grayscales only. A 1096 | # value of 255 will produce the most vivid colors. 1097 | # Minimum value: 0, maximum value: 255, default value: 100. 1098 | # This tag requires that the tag GENERATE_HTML is set to YES. 1099 | 1100 | HTML_COLORSTYLE_SAT = 100 1101 | 1102 | # The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the 1103 | # luminance component of the colors in the HTML output. Values below 100 1104 | # gradually make the output lighter, whereas values above 100 make the output 1105 | # darker. The value divided by 100 is the actual gamma applied, so 80 represents 1106 | # a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not 1107 | # change the gamma. 1108 | # Minimum value: 40, maximum value: 240, default value: 80. 1109 | # This tag requires that the tag GENERATE_HTML is set to YES. 1110 | 1111 | HTML_COLORSTYLE_GAMMA = 80 1112 | 1113 | # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML 1114 | # page will contain the date and time when the page was generated. Setting this 1115 | # to NO can help when comparing the output of multiple runs. 1116 | # The default value is: YES. 1117 | # This tag requires that the tag GENERATE_HTML is set to YES. 1118 | 1119 | HTML_TIMESTAMP = YES 1120 | 1121 | # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML 1122 | # documentation will contain sections that can be hidden and shown after the 1123 | # page has loaded. 1124 | # The default value is: NO. 1125 | # This tag requires that the tag GENERATE_HTML is set to YES. 1126 | 1127 | HTML_DYNAMIC_SECTIONS = NO 1128 | 1129 | # With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries 1130 | # shown in the various tree structured indices initially; the user can expand 1131 | # and collapse entries dynamically later on. Doxygen will expand the tree to 1132 | # such a level that at most the specified number of entries are visible (unless 1133 | # a fully collapsed tree already exceeds this amount). So setting the number of 1134 | # entries 1 will produce a full collapsed tree by default. 0 is a special value 1135 | # representing an infinite number of entries and will result in a full expanded 1136 | # tree by default. 1137 | # Minimum value: 0, maximum value: 9999, default value: 100. 1138 | # This tag requires that the tag GENERATE_HTML is set to YES. 1139 | 1140 | HTML_INDEX_NUM_ENTRIES = 100 1141 | 1142 | # If the GENERATE_DOCSET tag is set to YES, additional index files will be 1143 | # generated that can be used as input for Apple's Xcode 3 integrated development 1144 | # environment (see: http://developer.apple.com/tools/xcode/), introduced with 1145 | # OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a 1146 | # Makefile in the HTML output directory. Running make will produce the docset in 1147 | # that directory and running make install will install the docset in 1148 | # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at 1149 | # startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html 1150 | # for more information. 1151 | # The default value is: NO. 1152 | # This tag requires that the tag GENERATE_HTML is set to YES. 1153 | 1154 | GENERATE_DOCSET = NO 1155 | 1156 | # This tag determines the name of the docset feed. A documentation feed provides 1157 | # an umbrella under which multiple documentation sets from a single provider 1158 | # (such as a company or product suite) can be grouped. 1159 | # The default value is: Doxygen generated docs. 1160 | # This tag requires that the tag GENERATE_DOCSET is set to YES. 1161 | 1162 | DOCSET_FEEDNAME = "Doxygen generated docs" 1163 | 1164 | # This tag specifies a string that should uniquely identify the documentation 1165 | # set bundle. This should be a reverse domain-name style string, e.g. 1166 | # com.mycompany.MyDocSet. Doxygen will append .docset to the name. 1167 | # The default value is: org.doxygen.Project. 1168 | # This tag requires that the tag GENERATE_DOCSET is set to YES. 1169 | 1170 | DOCSET_BUNDLE_ID = org.doxygen.Project 1171 | 1172 | # The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify 1173 | # the documentation publisher. This should be a reverse domain-name style 1174 | # string, e.g. com.mycompany.MyDocSet.documentation. 1175 | # The default value is: org.doxygen.Publisher. 1176 | # This tag requires that the tag GENERATE_DOCSET is set to YES. 1177 | 1178 | DOCSET_PUBLISHER_ID = org.doxygen.Publisher 1179 | 1180 | # The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. 1181 | # The default value is: Publisher. 1182 | # This tag requires that the tag GENERATE_DOCSET is set to YES. 1183 | 1184 | DOCSET_PUBLISHER_NAME = Publisher 1185 | 1186 | # If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three 1187 | # additional HTML index files: index.hhp, index.hhc, and index.hhk. The 1188 | # index.hhp is a project file that can be read by Microsoft's HTML Help Workshop 1189 | # (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on 1190 | # Windows. 1191 | # 1192 | # The HTML Help Workshop contains a compiler that can convert all HTML output 1193 | # generated by doxygen into a single compiled HTML file (.chm). Compiled HTML 1194 | # files are now used as the Windows 98 help format, and will replace the old 1195 | # Windows help format (.hlp) on all Windows platforms in the future. Compressed 1196 | # HTML files also contain an index, a table of contents, and you can search for 1197 | # words in the documentation. The HTML workshop also contains a viewer for 1198 | # compressed HTML files. 1199 | # The default value is: NO. 1200 | # This tag requires that the tag GENERATE_HTML is set to YES. 1201 | 1202 | GENERATE_HTMLHELP = NO 1203 | 1204 | # The CHM_FILE tag can be used to specify the file name of the resulting .chm 1205 | # file. You can add a path in front of the file if the result should not be 1206 | # written to the html output directory. 1207 | # This tag requires that the tag GENERATE_HTMLHELP is set to YES. 1208 | 1209 | CHM_FILE = 1210 | 1211 | # The HHC_LOCATION tag can be used to specify the location (absolute path 1212 | # including file name) of the HTML help compiler ( hhc.exe). If non-empty 1213 | # doxygen will try to run the HTML help compiler on the generated index.hhp. 1214 | # The file has to be specified with full path. 1215 | # This tag requires that the tag GENERATE_HTMLHELP is set to YES. 1216 | 1217 | HHC_LOCATION = 1218 | 1219 | # The GENERATE_CHI flag controls if a separate .chi index file is generated ( 1220 | # YES) or that it should be included in the master .chm file ( NO). 1221 | # The default value is: NO. 1222 | # This tag requires that the tag GENERATE_HTMLHELP is set to YES. 1223 | 1224 | GENERATE_CHI = NO 1225 | 1226 | # The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc) 1227 | # and project file content. 1228 | # This tag requires that the tag GENERATE_HTMLHELP is set to YES. 1229 | 1230 | CHM_INDEX_ENCODING = 1231 | 1232 | # The BINARY_TOC flag controls whether a binary table of contents is generated ( 1233 | # YES) or a normal table of contents ( NO) in the .chm file. 1234 | # The default value is: NO. 1235 | # This tag requires that the tag GENERATE_HTMLHELP is set to YES. 1236 | 1237 | BINARY_TOC = NO 1238 | 1239 | # The TOC_EXPAND flag can be set to YES to add extra items for group members to 1240 | # the table of contents of the HTML help documentation and to the tree view. 1241 | # The default value is: NO. 1242 | # This tag requires that the tag GENERATE_HTMLHELP is set to YES. 1243 | 1244 | TOC_EXPAND = NO 1245 | 1246 | # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and 1247 | # QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that 1248 | # can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help 1249 | # (.qch) of the generated HTML documentation. 1250 | # The default value is: NO. 1251 | # This tag requires that the tag GENERATE_HTML is set to YES. 1252 | 1253 | GENERATE_QHP = $GENERATE_QHP 1254 | 1255 | # If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify 1256 | # the file name of the resulting .qch file. The path specified is relative to 1257 | # the HTML output folder. 1258 | # This tag requires that the tag GENERATE_QHP is set to YES. 1259 | 1260 | QCH_FILE = 1261 | 1262 | # The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help 1263 | # Project output. For more information please see Qt Help Project / Namespace 1264 | # (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). 1265 | # The default value is: org.doxygen.Project. 1266 | # This tag requires that the tag GENERATE_QHP is set to YES. 1267 | 1268 | QHP_NAMESPACE = $QHP_NAMESPACE 1269 | 1270 | # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt 1271 | # Help Project output. For more information please see Qt Help Project / Virtual 1272 | # Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- 1273 | # folders). 1274 | # The default value is: doc. 1275 | # This tag requires that the tag GENERATE_QHP is set to YES. 1276 | 1277 | QHP_VIRTUAL_FOLDER = doc 1278 | 1279 | # If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom 1280 | # filter to add. For more information please see Qt Help Project / Custom 1281 | # Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- 1282 | # filters). 1283 | # This tag requires that the tag GENERATE_QHP is set to YES. 1284 | 1285 | QHP_CUST_FILTER_NAME = 1286 | 1287 | # The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the 1288 | # custom filter to add. For more information please see Qt Help Project / Custom 1289 | # Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- 1290 | # filters). 1291 | # This tag requires that the tag GENERATE_QHP is set to YES. 1292 | 1293 | QHP_CUST_FILTER_ATTRS = 1294 | 1295 | # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this 1296 | # project's filter section matches. Qt Help Project / Filter Attributes (see: 1297 | # http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). 1298 | # This tag requires that the tag GENERATE_QHP is set to YES. 1299 | 1300 | QHP_SECT_FILTER_ATTRS = 1301 | 1302 | # The QHG_LOCATION tag can be used to specify the location of Qt's 1303 | # qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the 1304 | # generated .qhp file. 1305 | # This tag requires that the tag GENERATE_QHP is set to YES. 1306 | 1307 | QHG_LOCATION = 1308 | 1309 | # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be 1310 | # generated, together with the HTML files, they form an Eclipse help plugin. To 1311 | # install this plugin and make it available under the help contents menu in 1312 | # Eclipse, the contents of the directory containing the HTML and XML files needs 1313 | # to be copied into the plugins directory of eclipse. The name of the directory 1314 | # within the plugins directory should be the same as the ECLIPSE_DOC_ID value. 1315 | # After copying Eclipse needs to be restarted before the help appears. 1316 | # The default value is: NO. 1317 | # This tag requires that the tag GENERATE_HTML is set to YES. 1318 | 1319 | GENERATE_ECLIPSEHELP = NO 1320 | 1321 | # A unique identifier for the Eclipse help plugin. When installing the plugin 1322 | # the directory name containing the HTML and XML files should also have this 1323 | # name. Each documentation set should have its own identifier. 1324 | # The default value is: org.doxygen.Project. 1325 | # This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. 1326 | 1327 | ECLIPSE_DOC_ID = org.doxygen.Project 1328 | 1329 | # If you want full control over the layout of the generated HTML pages it might 1330 | # be necessary to disable the index and replace it with your own. The 1331 | # DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top 1332 | # of each HTML page. A value of NO enables the index and the value YES disables 1333 | # it. Since the tabs in the index contain the same information as the navigation 1334 | # tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. 1335 | # The default value is: NO. 1336 | # This tag requires that the tag GENERATE_HTML is set to YES. 1337 | 1338 | DISABLE_INDEX = NO 1339 | 1340 | # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index 1341 | # structure should be generated to display hierarchical information. If the tag 1342 | # value is set to YES, a side panel will be generated containing a tree-like 1343 | # index structure (just like the one that is generated for HTML Help). For this 1344 | # to work a browser that supports JavaScript, DHTML, CSS and frames is required 1345 | # (i.e. any modern browser). Windows users are probably better off using the 1346 | # HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can 1347 | # further fine-tune the look of the index. As an example, the default style 1348 | # sheet generated by doxygen has an example that shows how to put an image at 1349 | # the root of the tree instead of the PROJECT_NAME. Since the tree basically has 1350 | # the same information as the tab index, you could consider setting 1351 | # DISABLE_INDEX to YES when enabling this option. 1352 | # The default value is: NO. 1353 | # This tag requires that the tag GENERATE_HTML is set to YES. 1354 | 1355 | GENERATE_TREEVIEW = $GENERATE_TREEVIEW 1356 | 1357 | # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that 1358 | # doxygen will group on one line in the generated HTML documentation. 1359 | # 1360 | # Note that a value of 0 will completely suppress the enum values from appearing 1361 | # in the overview section. 1362 | # Minimum value: 0, maximum value: 20, default value: 4. 1363 | # This tag requires that the tag GENERATE_HTML is set to YES. 1364 | 1365 | ENUM_VALUES_PER_LINE = 4 1366 | 1367 | # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used 1368 | # to set the initial width (in pixels) of the frame in which the tree is shown. 1369 | # Minimum value: 0, maximum value: 1500, default value: 250. 1370 | # This tag requires that the tag GENERATE_HTML is set to YES. 1371 | 1372 | TREEVIEW_WIDTH = 250 1373 | 1374 | # When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to 1375 | # external symbols imported via tag files in a separate window. 1376 | # The default value is: NO. 1377 | # This tag requires that the tag GENERATE_HTML is set to YES. 1378 | 1379 | EXT_LINKS_IN_WINDOW = NO 1380 | 1381 | # Use this tag to change the font size of LaTeX formulas included as images in 1382 | # the HTML documentation. When you change the font size after a successful 1383 | # doxygen run you need to manually remove any form_*.png images from the HTML 1384 | # output directory to force them to be regenerated. 1385 | # Minimum value: 8, maximum value: 50, default value: 10. 1386 | # This tag requires that the tag GENERATE_HTML is set to YES. 1387 | 1388 | FORMULA_FONTSIZE = 10 1389 | 1390 | # Use the FORMULA_TRANPARENT tag to determine whether or not the images 1391 | # generated for formulas are transparent PNGs. Transparent PNGs are not 1392 | # supported properly for IE 6.0, but are supported on all modern browsers. 1393 | # 1394 | # Note that when changing this option you need to delete any form_*.png files in 1395 | # the HTML output directory before the changes have effect. 1396 | # The default value is: YES. 1397 | # This tag requires that the tag GENERATE_HTML is set to YES. 1398 | 1399 | FORMULA_TRANSPARENT = YES 1400 | 1401 | # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see 1402 | # http://www.mathjax.org) which uses client side Javascript for the rendering 1403 | # instead of using prerendered bitmaps. Use this if you do not have LaTeX 1404 | # installed or if you want to formulas look prettier in the HTML output. When 1405 | # enabled you may also need to install MathJax separately and configure the path 1406 | # to it using the MATHJAX_RELPATH option. 1407 | # The default value is: NO. 1408 | # This tag requires that the tag GENERATE_HTML is set to YES. 1409 | 1410 | USE_MATHJAX = NO 1411 | 1412 | # When MathJax is enabled you can set the default output format to be used for 1413 | # the MathJax output. See the MathJax site (see: 1414 | # http://docs.mathjax.org/en/latest/output.html) for more details. 1415 | # Possible values are: HTML-CSS (which is slower, but has the best 1416 | # compatibility), NativeMML (i.e. MathML) and SVG. 1417 | # The default value is: HTML-CSS. 1418 | # This tag requires that the tag USE_MATHJAX is set to YES. 1419 | 1420 | MATHJAX_FORMAT = HTML-CSS 1421 | 1422 | # When MathJax is enabled you need to specify the location relative to the HTML 1423 | # output directory using the MATHJAX_RELPATH option. The destination directory 1424 | # should contain the MathJax.js script. For instance, if the mathjax directory 1425 | # is located at the same level as the HTML output directory, then 1426 | # MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax 1427 | # Content Delivery Network so you can quickly see the result without installing 1428 | # MathJax. However, it is strongly recommended to install a local copy of 1429 | # MathJax from http://www.mathjax.org before deployment. 1430 | # The default value is: http://cdn.mathjax.org/mathjax/latest. 1431 | # This tag requires that the tag USE_MATHJAX is set to YES. 1432 | 1433 | MATHJAX_RELPATH = http://www.mathjax.org/mathjax 1434 | 1435 | # The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax 1436 | # extension names that should be enabled during MathJax rendering. For example 1437 | # MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols 1438 | # This tag requires that the tag USE_MATHJAX is set to YES. 1439 | 1440 | MATHJAX_EXTENSIONS = 1441 | 1442 | # The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces 1443 | # of code that will be used on startup of the MathJax code. See the MathJax site 1444 | # (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an 1445 | # example see the documentation. 1446 | # This tag requires that the tag USE_MATHJAX is set to YES. 1447 | 1448 | MATHJAX_CODEFILE = 1449 | 1450 | # When the SEARCHENGINE tag is enabled doxygen will generate a search box for 1451 | # the HTML output. The underlying search engine uses javascript and DHTML and 1452 | # should work on any modern browser. Note that when using HTML help 1453 | # (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) 1454 | # there is already a search function so this one should typically be disabled. 1455 | # For large projects the javascript based search engine can be slow, then 1456 | # enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to 1457 | # search using the keyboard; to jump to the search box use + S 1458 | # (what the is depends on the OS and browser, but it is typically 1459 | # , /