X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9e37d6124f4ba1933336113a42d8ae63b6d4503b..fc0b5cbe2f4272deac718cb99e2c765745c26408:/tools/doxygen/doxygen_postprocesser.pl diff --git a/tools/doxygen/doxygen_postprocesser.pl b/tools/doxygen/doxygen_postprocesser.pl index 16425d0994..83e3ee74e3 100755 --- a/tools/doxygen/doxygen_postprocesser.pl +++ b/tools/doxygen/doxygen_postprocesser.pl @@ -2,9 +2,21 @@ use strict; +# Add here the pages of the documentation generated by a @page doxygen macro +my @extra_files = qw(html/index.html html/faq.html html/publis.html html/pages.html html/modules.html html/contrib.html index.php html/GRAS_tut.html); + +# GRAS tutorial +map {push @extra_files, "html/GRAS_tut_$_.html"} qw (intro + tour tour_install tour_setup tour_simpleexchange tour_args tour_callbacks tour_globals + tour_logs tour_timers tour_exceptions tour_rpc); + +# GRAS examples +map {push @extra_files, "html/GRAS_ex_$_.html"} qw (ping mmrpc token timer); + my %debug; $debug{'parse'} = 0; # show how we parse the module tree $debug{'input'} = 0; # display the resulting tree +$debug{'handle'}= 0; # Be verbose on the post-processing $debug{'rename'}= 0; # do not overwrite the files (allows several debuging runs without rerunning doxygen) my @allfiles; @@ -54,7 +66,7 @@ while () { $entry->{'up'} = $current; push @{$current->{'down'}},$entry; print "Push $1 $2 as child of $current\n" if $debug{'parse'}; - push @allfiles,$1; + push @allfiles,"html/$1"; } close IN; @@ -138,6 +150,8 @@ sub handle_page { my $current=shift; my $level=shift; + print "Handle $current->{'file'} at level $level\n" if $debug{'handle'}; + # we generate the tabs bottom up begining from where we are in the tree # and display them top down, as it should in a file my @tabs = (); @@ -171,9 +185,8 @@ sub handle_page { $newname =~ s/.html/.new.html/; open TO,">$newname" || die; while () { - # add "current" to the module API granfather page - s|
  • Modules API
  • |
  • Modules API
  • |; - + # add "current" to the module API granfather page + s|
  • [^<]*
  • |
  • Modules API
  • |; print TO $_; last if m||; } @@ -186,6 +199,7 @@ sub handle_page { close FROM; close TO; rename("$newname","html/$current->{'file'}") unless $debug{'rename'}; +# print "mv $newname html/$current->{'file'}\n"; } # recurse on childs @@ -194,35 +208,40 @@ sub handle_page { } } +### +### Launch the modules navbar reworking +### +handle_page($top,-2);# skip roots (we have 2 roots) in level counting ### ### Post-processsing common to all pages ### -map {push @allfiles,$_} qw(html/index.html html/faq.html html/publis.html html/pages.html); +map {push @allfiles,$_} @extra_files; foreach my $file (@allfiles) { open FROM,"$file" || die; my $outfile = "$file"; - $outfile =~ s/.html/.new.html/; + $outfile =~ s/.(html|php)$/.new.$1/; open TO,">$outfile" || die; +# print "POSTPROCESSING $file (tmp=$outfile)\n"; 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
  • '; + if (m,
  • Main\ Page
  • ,) { + print TO '
  • Overview
  • '."\n"; + print TO '
  • FAQ
  • '."\n"; next; } - if (m,
  • Data\ Structures
  • ,) { - print TO '
  • Publications
  • '; + if (m,
  • Data\ Structures
  • ,) { + print TO '
  • Publications
  • '."\n"; next; } s|Modules|Modules API|g; - s|
  • Directories
  • ||g; +# s|
  • Directories
  • ||g; print TO $_; } @@ -231,9 +250,5 @@ foreach my $file (@allfiles) { rename("$outfile", "$file") unless $debug{'rename'}; } -### -### Launch the modules navbar reworking -### -handle_page($top,-2);# skip roots (we have 2 roots) in level counting