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/publis.html html/pages.html html/modules.html html/contrib.html index.php html/GRAS_tut.html);
+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
close IN;
rename("html/modules.new.html","html/modules.html") unless $debug{'rename'};
+# the publication pages deserves some special handling too
+my %pub_tabs = ("publis.html" =>"Reference publications",
+ "publis_core.html" =>"Other publication about SimGrid",
+ "publis_extern.html"=>"External papers using SimGrid",
+ "publis_intra.html"=>"Internal papers using SimGrid");
+# force ordering
+my @pub_titles = ("publis.html", "publis_core.html", "publis_extern.html", "publis_intra.html");
+sub handle_pub{
+ my $oldname = shift;
+ my $newname = $oldname;
+ $newname =~ s/\.html$/.new.html/;
+
+# print "Handle_pub($oldname -> $newname)\n";
+
+ open IN,"html/$oldname" || die "Cannot open $oldname";
+ open OUT,">html/$newname" || die "Cannot open $newname";
+ my $line;
+ while ($line = <IN>) {
+ last if $line =~ /<h1>/;
+ print OUT $line;
+ }
+
+ print OUT "<div class=\"tabs\">\n <ul>\n";
+ foreach my $page (@pub_titles) {
+ print OUT " <li".($page eq $oldname? " class=\"current\"":"" )."> <a href=\"$page\"><span>".($pub_tabs{$page})."</span></a></li>\n";
+ }
+
+ print OUT " </ul></div>\n";
+ print OUT $line;
+ while ($line = <IN>) {
+ print OUT $line;
+ }
+ close OUT;
+ close IN;
+ rename("html/$newname","html/$oldname") unless $debug{'rename'};
+}
+map {handle_pub($_)} @pub_titles;
+
+
# Operate the recursion
sub handle_page {
my $current=shift;
# print "TAB: $_";
print TO "$_";
}
+ if ($current->{'file'} =~ m/^class/) {
+ while (<FROM>) {
+ last if (m|</div>|);
+ }
+ print TO "$_";
+ }
while (<FROM>) {
+ if (m/The documentation for/) {
+ while (<FROM>) {
+ last if (m/<p>/);
+ }
+ }
print TO "$_";
}
close FROM;
### Post-processsing common to all pages
###
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
next;
}
if (m,<li><a href="(doc/)?annotated.html"><span>Data\ Structures</span></a></li>,) {
- print TO ' <li'.($file =~ m,(doc/)?publis.html, ? " class='current'" :"").'><a href="'.$1.'publis.html"><span>Publications</span></a></li>'."\n";
+ print TO ' <li'.($file =~ m,(doc/)?publis(_[^.]*)?.html, ? " class='current'" :"").'><a href="'.$1.'publis.html"><span>Publications</span></a></li>'."\n";
+ print TO ' <li'.($file =~ m,(doc/)?people.html, ? " class='current'" :"").'><a href="'.$1.'people.html"><span>People</span></a></li>'."\n";
print TO ' <li'.($file =~ m,(doc/)?history.html, ? " class='current'" :"").'><a href="'.$1.'history.html"><span>History</span></a></li>'."\n";
+ print TO ' <li'.($file =~ m,(doc/)?contrib.html, ? " class='current'" :"").'><a href="'.$1.'contrib.html"><span>Contrib</span></a></li>'."\n";
next;
}
s|<span>Modules</span>|<span>Modules API</span>|g;
-# s|<li><a href="(doc/)?dirs.html"><span>Directories</span></a></li>||g;
+ s|<span>Related Pages</span>|<span>Site Plan</span>|g;
print TO $_;
}