#!/usr/bin/env python """Create index file to access documentation components.""" # Generate an html file ("index.html") to allow easy access to the # documentation for the various components. # This file is run automatically at the end of "generate_MAUS_doc.py" and # generally does not need to be run by itself. # For more information see README. import os def main(): """Main""" create_index_html() def commonprefix(*args): """Fix behaviour of commonprefix function""" return os.path.commonprefix(*args).rpartition('/')[0] def create_index_html(): """Create the html file""" paths = [os.environ.get('MAUS_THIRD_PARTY'), os.environ.get('MAUS_ROOT_DIR')] # Get the locations of the local MAUS installation and the location of the # third party libraries relative to the point where their absolute paths # branch. tppath_segment = paths[0][len(commonprefix(paths))+1:] maus_path_segment = paths[1][len(commonprefix(paths))+1:] # Need to deal with the case where the two paths are the same if tppath_segment == maus_path_segment: rel_tppath = '' # Generate the appropriate paths to link to the third party libaries. else: rel_tppath = tppath_segment + '/doc/' dir_prepend = '../'*(maus_path_segment.count('/')+2) rel_tppath = dir_prepend + rel_tppath # These need to be defined manually because it is possible that third party # and MAUS documentation are in the same directory. root_segment = ('
Use the links below to access the doxygen documentation for the various components of MAUS and some third party libraries
If links don't work, the documentation likely hasn't been compiled yet.