X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/0a86432f4011e79a1a6f0f7d463a9020fd08fe30..7b98df0790cc3fec26293ba257f64d94135098c4:/tools/doxygen/doxygen_postprocesser.pl diff --git a/tools/doxygen/doxygen_postprocesser.pl b/tools/doxygen/doxygen_postprocesser.pl index da9a38cabf..80e8fc93f4 100755 --- a/tools/doxygen/doxygen_postprocesser.pl +++ b/tools/doxygen/doxygen_postprocesser.pl @@ -3,10 +3,10 @@ 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 html/annotated.html index.php - html/GRAS_tut.html); +my @extra_files = qw(html/index.html html/pages.html html/modules.html html/annotated.html html/functions.html + html/functions_vars.html index.php + html/GRAS_tut.html html/tracing.html html/install.html html/bindings.html + html/options.html html/use.html html/pls.html html/FAQ.html); # GRAS tutorial map {push @extra_files, "html/GRAS_tut_$_.html"} qw (intro @@ -211,7 +211,8 @@ sub handle_page { # 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 = (); - + my $found_div_tabs=0; + if (defined ($current->{'label'}) and $current->{'label'} ne 'ROOT') { # print "handle $current->{'file'}, at level $level\n"; # generate the tabs @@ -246,11 +247,13 @@ sub handle_page { # add "current" to the module API granfather page s|
  • [^<]*
  • |
  • Modules API
  • |; # print "++Write $_"; + $found_div_tabs=1 if m/div.*class="tabs"/; print TO "$_"; - last if (m||); + last if ((m||)&&($found_div_tabs)); } - + print TO "\n\n"; + foreach (@tabs) { # print "TAB: $_"; print TO "$_"; @@ -258,26 +261,26 @@ sub handle_page { print TO "\n\n"; if ($current->{'file'} =~ m/^class/) { - while () { - last if (m||); - } + while () { + last if (m||); + } print TO "$_"; } while () { if (m/POST-PROCESSED TABS/) { - while () { + while () { last if (m/END OF POST-PROCESSED TABS/); - } - next; + } + next; } if (m/The documentation for/) { - while () { + while () { last if (m/

    /); - } + } } print TO "$_"; - } + } close FROM; close TO; rename("$newname","html/$current->{'file'}") unless $debug{'rename'}; @@ -292,15 +295,51 @@ sub handle_page { ### ### Launch the modules navbar reworking ### -handle_page($top,-2);# skip roots (we have 2 roots) in level counting +handle_page($top,-1);# skip roots (we have 2 roots) in level counting + +### +### Add the modules navbar reworking to the modules.html file +### +sub add_tabs_to_module_html { + my $found_div_tabs=0; + my $module_tabs = "

    \n
    \n"; + + my $oldname = "html/modules.html"; + open FROM,$oldname || die; + my $newname=$oldname; + $newname =~ s/.html/.handlepage.html/; + open TO,">$newname" || die; + while () { + $found_div_tabs=1 if m/div.*class="tabs"/; + print TO "$_"; + last if ((m||)&&($found_div_tabs)); + } + + print TO "\n\n"; + print TO $module_tabs; + print TO "\n\n"; + + while () { + print TO "$_"; + } + close FROM; + close TO; + rename($newname, $oldname) unless $debug{'rename'}; + + # die; +} +add_tabs_to_module_html; ### ### Post-processsing common to all pages ### map {push @allfiles,$_} @extra_files; print "All files: ".(join(", ",@allfiles))."\n" if $debug{'parse'}; - my $tabs; foreach my $file (@allfiles) { @@ -316,46 +355,116 @@ foreach my $file (@allfiles) { print TO ''."\n" if (m||); + if($tabs){ + if($file =~ /^html\/index\..*/){ + $_ =~ s/
  • /
  • /g; + $_ =~ s/
  • /
  • /g; + } + $_ =~ s/
  • /
  • /g; + + if($file =~ /^html\/pages\..*/){ + $_ =~ s/
  • /
  • /g; + } + } + + if($file =~ /^html\/publis.*/){ + $_ =~ s/
    /
    /g; + $_ =~ s/
    /
    /g; + } + + # Add the FAQ PUBLIS PEOPLE HISTORY and CONTRIB to the top navbar. + if( $_ =~ //){ + $tabs = 1; + } + if( $_ =~ /<\/div>/){ + $tabs = 0; + } + if( $_ =~ /<\/ul>/ && $tabs){ + my $tmp_buff=""; + $tmp_buff .= '
  • Using SimGrid
  • '."\n"; + $tmp_buff .= '
  • Forge
  • '."\n"; + $tmp_buff .= '
  • Website
  • '."\n"; + $tmp_buff .= '
  • Documentation index
  • '."\n"; + $tmp_buff .= '
  • FAQ
  • '."\n"; + $tmp_buff .= $_; + $tabs = 0; + + # Rework the navbar and add menu for use.html + # Fix the current "button" of buggy Doxygen tabs + if($file =~ /^html\/use.*/ + || $file =~ /^html\/install.*/ + || $file =~ /^html\/options.*/ + || $file =~ /^html\/tracing.*/ + || $file =~ /^html\/bindings.*/ + || $file =~ /^html\/pls.*/ + || $file =~ /^html\/modules.*/ + || $file =~ /^html\/annotated.*/ + || $file =~ /^html\/group__.*/ + || $file =~ /^html\/functions.*/) + { + $tmp_buff .= '
    '."\n"; + $tmp_buff .= '
    '."\n"; + $tmp_buff .= ' '."\n"; + + my $filename = $file; + $filename =~ s/html\///g; + $filename =~ s/\.html//g; + $filename =~ s/publis_.*/publis/g; + $tmp_buff =~ s/
  • /
  • /g; + $tmp_buff =~ s/
  • /
  • /g; + $tmp_buff =~ s/
  • /
  • /g; + + } - # Rework the navbar - if($file =~ "^html/index.*"){ - if ($_ =~ /
  • Main Page<\/span><\/a><\/li>/) { - print TO '
  • Main Page
  • '."\n"; - next; + # Rework the navbar + # Fix the current "button" of buggy Doxygen tabs + if($file =~ /^html\/pages.*/ + || $file =~ /^html\/FAQ.*/) + { + my $filename = $file; + $filename =~ s/html\///g; + $filename =~ s/\.html//g; + $tmp_buff =~ s/
  • /
  • /g; + $tmp_buff =~ s/
  • /
  • /g; } - elsif ($_ =~ /[\ ]*
  • .*/) { - $_ =~ s/ class="current"//g; - print TO $_; - next; + if($file =~ /^html\/group__.*/) + { + $tmp_buff =~ s/
  • /
  • /g; } - } - if($file =~ "^html/faq.*"){ - if ($_ =~ /[\ ]*
  • .*/) { - $_ =~ s/ class="current"//g; - print TO $_; - next; + if($file =~ /^html\/functions.*/) + { + $tmp_buff =~ s/
  • /
  • /g; } + + + print TO $tmp_buff; + next; + } + s|Modules|Modules API|g; + s|Related Pages
  • \n||g; + s|
  • Modules API
  • \n||g; + s|
  • Modules API
  • \n||g; + if($file =~ /^html\/group__.*/) + { + s|
  • |
  • |g; + s|
  • Modules API
  • \n|
  • Modules API
  • \n|g; } - if( $_ =~ //){$tabs = 1;} - if( $_ =~ /<\/div>/){$tabs = 0;} - if( $_ =~ /<\/ul>/ && $tabs){ - if($file =~ "^html/faq.*"){ - print TO '
  • FAQ Page
  • '."\n";} - else{ - print TO '
  • FAQ Page
  • '."\n";} - print TO $_; - next; + else + { + s|
  • Modules API
  • \n||g; } -# 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|Related Pages|Site Plan|g; - + s|
  • Data Structures
  • \n||g; + s|
  • Data Structures
  • \n||g; + s|Related Pages<|Documentation index<|g; + print TO $_; } close FROM;