1#! /usr/bin/env python 2# -*- coding: utf-8 -*- 3# =========================================================================== 4# Copyright (c) 2010 Barend Gehrels, Amsterdam, the Netherlands. 5# 6# Use, modification and distribution is subject to the Boost Software License, 7# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 8# http://www.boost.org/LICENSE_1_0.txt)9 9# ============================================================================ 10 11import sys 12 13args = sys.argv[1:] 14if len(args) != 1: 15 raise SystemExit("Usage: doxygen_enhance <html filename>") 16 17 18# 1) set variable for doxygen_contents to be posted 19file_in = open(args[0], 'r') 20doxygen_contents = file_in.read() 21 22doxygen_contents = doxygen_contents.replace('<span>Modules</span>', '<span>Function overview</span>') 23doxygen_contents = doxygen_contents.replace('<span>Related Pages</span>', '<span>Main pages</span>') 24doxygen_contents = doxygen_contents.replace('<span>Main Page</span>', '<span>Introduction</span>') 25doxygen_contents = doxygen_contents.replace('<li><a href="namespaces.html"><span>Namespaces</span></a></li>', '') 26 27doxygen_contents = doxygen_contents.replace('<h1>Modules</h1>Here is a list of all modules:<ul>', '<h1>Function overview</h1>Here is a list of all functions:<ul>') 28doxygen_contents = doxygen_contents.replace('<h1>Related Pages</h1>Here is a list of all related documentation pages:<ul>', '<h1>Main pages</h1>The following pages give backgrounds on Boost.Geometry:<ul>') 29 30 31file_out = file (args[0], 'w') 32file_out.write(doxygen_contents) 33file_out.close() 34