From c33b60fba9958748a202db96d88ce9263cde884b Mon Sep 17 00:00:00 2001 From: mquinson Date: Mon, 2 Jan 2006 20:56:14 +0000 Subject: [PATCH] Do the post-processing of all pages (first line of navbar rewrite) here instead of with sed in makefile, it's ways faster so git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@1884 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- tools/doxygen/doxygen_postprocesser.pl | 44 ++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/tools/doxygen/doxygen_postprocesser.pl b/tools/doxygen/doxygen_postprocesser.pl index b5c4803613..0a126bd114 100755 --- a/tools/doxygen/doxygen_postprocesser.pl +++ b/tools/doxygen/doxygen_postprocesser.pl @@ -7,6 +7,7 @@ $debug{'parse'} = 0; # show how we parse the module tree $debug{'input'} = 0; # display the resulting tree $debug{'rename'}= 0; # do not overwrite the files (allows several debuging runs without rerunning doxygen) +my @allfiles; ### ### Get the module definitions ### @@ -53,6 +54,7 @@ while () { $entry->{'up'} = $current; push @{$current->{'down'}},$entry; print "Push $1 $2 as child of $current\n" if $debug{'parse'}; + push @allfiles,$1; } close IN; @@ -192,4 +194,46 @@ sub handle_page { } } + + +### +### Post-processsing common to all pages +### +map {push @allfiles,$_} qw(html/index.html html/faq.html html/publis.html); + +foreach my $file (@allfiles) { + open FROM,"$file" || die; + my $outfile = "$file"; + $outfile =~ s/.html/.new.html/; + open TO,">$outfile" || die; + while () { + # Add the simgrid css, just in case + print TO ''."\n" + if (m||); + + # Rework the navbar + if (m,
  • Main\ Page
  • ,) { + print TO '
  • Overview
  • '; + print TO '
  • FAQ
  • '; + next; + } + if (m,
  • Data\ Structures
  • ,) { + print TO '
  • Publications
  • '; + next; + } + s|Modules|Modules API|g; + s|
  • Directories
  • ||g; + + print TO $_; + } + close FROM; + close TO; + rename("$outfile", "$file") unless $debug{'rename'}; +} + +### +### Launch the modules navbar reworking +### handle_page($top,-2);# skip roots (we have 2 roots) in level counting + + -- 2.20.1