X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9e37d6124f4ba1933336113a42d8ae63b6d4503b..c76d7d45ccc2414eb226e35a6119f1dde58ed758:/tools/doxygen/doxygen_postprocesser.pl diff --git a/tools/doxygen/doxygen_postprocesser.pl b/tools/doxygen/doxygen_postprocesser.pl index 16425d0994..29c500f479 100755 --- a/tools/doxygen/doxygen_postprocesser.pl +++ b/tools/doxygen/doxygen_postprocesser.pl @@ -2,9 +2,24 @@ 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/history.html html/contrib.html html/people.html + html/publis.html html/publis_core.html html/publis_extern.html html/publis_intra.html + html/pages.html html/modules.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; @@ -26,9 +41,9 @@ my $entry; $current->{'label'}="ROOT"; push @{$top->{'down'}},$current; +print "Push $current as child of $top\n" if $debug{'parse'}; $current=$top; -print "Push $current as child of $top\n" if $debug{'parse'}; while () { if (/|; +# print "--Read $_"; + # add "current" to the module API granfather page + s|
  • [^<]*
  • |
  • Modules API
  • |; +# print "++Write $_"; + print TO "$_"; + last if (m||); } foreach (@tabs) { - print TO $_; +# print "TAB: $_"; + print TO "$_"; + } + if ($current->{'file'} =~ m/^class/) { + while () { + last if (m||); + } + print TO "$_"; } while () { - print TO $_; + if (m/The documentation for/) { + while () { + last if (m/

    /); + } + } + print TO "$_"; } close FROM; close TO; @@ -194,35 +266,46 @@ 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; +print "All files: ".(join(", ",@allfiles))."\n" if $debug{'parse'}; foreach my $file (@allfiles) { + $file =~ s/.html/.handlepage.html/ if $debug{'rename'}; # Take right name if debugging + 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"; + print TO ' People'."\n"; + print TO ' History'."\n"; + print TO ' Contrib'."\n"; next; } s|Modules|Modules API|g; - s|
  • Directories
  • ||g; + s|Related Pages|Site Plan|g; print TO $_; } @@ -231,9 +314,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