doxygen batch file

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@3 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2006-10-01 15:16:44 +00:00
parent ddfb1a5089
commit a9b6c73407
7 changed files with 780 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
#! /usr/bin/perl
@html = <../../doc/*.html>;
# for each html file
foreach $file (@html) {
# read
open F, "< $file";
$_ = join('',<F>);
close F;
# cleanup : globals heading
# in globals?
$in_globals = m{<li id="current"><a href="globals.html"><span>Globals</span></a></li>};
$glob_cur = $in_globals ? ' id="current"' : '';
# in files
$in_files = !$in_globals && m{<li id="current"><a href="files.html"><span>Files</span></a></li>};
$files_cur = $in_files ? ' id="current"' : '';
# add link to top level
s {<li( id="current")?><a href="files.html"><span>Files</span></a></li>}
{<li$glob_cur><a href="globals.html"><span>Globals</span></a></li>
<li$files_cur><a href="files.html"><span>Files</span></a></li>
};
# remove second level bar
if ($in_globals || $in_files) {
s {(<div class="tabs">.*?</div>)(.*?<div class="tabs">.*?</div>)}
{$1}s;
}
# write
open F, "> $file";
print F $_;
close F;
}