A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove all xbt_assert.*(0,FALSE or NULL for xbt_die
[simgrid.git]
/
tools
/
doxygen
/
doxygen_postprocesser.pl
diff --git
a/tools/doxygen/doxygen_postprocesser.pl
b/tools/doxygen/doxygen_postprocesser.pl
index
aecd155
..
fb7a566
100755
(executable)
--- a/
tools/doxygen/doxygen_postprocesser.pl
+++ b/
tools/doxygen/doxygen_postprocesser.pl
@@
-3,9
+3,9
@@
use strict;
# Add here the pages of the documentation generated by a @page doxygen macro
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
+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/publis.html html/publis_core.html html/publis_extern.html html/publis_intra.html
- html/pages.html html/modules.html
html/contrib.html
index.php
+ html/pages.html html/modules.html index.php
html/GRAS_tut.html);
# GRAS tutorial
html/GRAS_tut.html);
# GRAS tutorial
@@
-39,22
+39,34
@@
my $top;
my $current;
my $entry;
my $current;
my $entry;
-$current->{'label'}="ROOT";
-push @{$top->{'down'}},$current;
-print "Push $current as child of $top\n" if $debug{'parse'};
+# $current->{'label'}="ROOT";
+# push @{$top->{'down'}},$current;
+# print "Push $current '".($current->{'label'})."' as child of $top '".($top->{'label'})."'\n" if $debug{'parse'};
+# $current=$top;
+$top->{'label'}="ROOT";
+print "Create ROOT $top\n" if $debug{'parse'};
$current=$top;
$current=$top;
+# Read the whole data to postprocess it a bit
+my $in;
while (<IN>) {
while (<IN>) {
+ $in .= $_;
+}
+$in =~ s/<ul>/\n<ul>\n/sg;
+foreach $_ (split(/\n/,$in)) {
+ next unless length($_);
+ next if ($_ =~ m|^</li>$|);
+ print " Seen '$_'\n" if $debug{'parse'};
if (/<ul>/) {
if (/<ul>/) {
- print "DOWN: $current -> " if $debug{'parse'};
+ print "DOWN: $current
'$current->{'label'}'
-> " if $debug{'parse'};
$current = $current->{'down'}[scalar @{$current->{'down'}} - 1];
$current = $current->{'down'}[scalar @{$current->{'down'}} - 1];
- print "$current\n" if $debug{'parse'};
+ print "$current
'$current->{'label'}'
\n" if $debug{'parse'};
next;
}
if (/<\/ul>/) {
$current = $current->{'up'};
next;
}
if (/<\/ul>/) {
$current = $current->{'up'};
- print "UP\n" if $debug{'parse'};
+ print "UP
to $current '$current->{'label'}'
\n" if $debug{'parse'};
next;
}
if (/<p>/) {
next;
}
if (/<p>/) {
@@
-68,7
+80,7
@@
while (<IN>) {
$entry->{'label'} = $2;
$entry->{'up'} = $current;
push @{$current->{'down'}},$entry;
$entry->{'label'} = $2;
$entry->{'up'} = $current;
push @{$current->{'down'}},$entry;
- print "Push
$1 $2 as child of $current
\n" if $debug{'parse'};
+ print "Push
file:$1 label:'$2' as child of $current '$current->{'label'}'
\n" if $debug{'parse'};
push @allfiles,"html/$1";
}
close IN;
push @allfiles,"html/$1";
}
close IN;
@@
-136,7
+148,7
@@
while ($line = <IN>) {
print OUT $line;
}
print OUT $line;
}
-print OUT "<div class=\"tabs\">\n <ul>\n";
+print OUT "<div class=\"tabs\">\n <ul
class=\"tablist\"
>\n";
foreach $current (@{ ${$top->{'down'}}[0]->{'down'} }) {
print OUT " <li><a href=\"$current->{'file'}\"><span>$current->{'label'}</span></a></li>\n";
}
foreach $current (@{ ${$top->{'down'}}[0]->{'down'} }) {
print OUT " <li><a href=\"$current->{'file'}\"><span>$current->{'label'}</span></a></li>\n";
}
@@
-172,7
+184,7
@@
sub handle_pub{
print OUT $line;
}
print OUT $line;
}
- print OUT "<div class=\"tabs\">\n
<ul
>\n";
+ print OUT "<div class=\"tabs\">\n
<ul class=\"tablist\"
>\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";
}
foreach my $page (@pub_titles) {
print OUT " <li".($page eq $oldname? " class=\"current\"":"" )."> <a href=\"$page\"><span>".($pub_tabs{$page})."</span></a></li>\n";
}
@@
-207,7
+219,7
@@
sub handle_page {
my $lvl_it=$level;
while ($lvl_it >= 0) {
my $father = $iterator->{'up'};
my $lvl_it=$level;
while ($lvl_it >= 0) {
my $father = $iterator->{'up'};
- $tabs[$lvl_it] = "<div class=\"tabs
\">\n <ul
>\n";
+ $tabs[$lvl_it] = "<div class=\"tabs
2\">\n<ul class=\"tablist\"
>\n";
foreach my $bro (@{$father->{'down'}}) {
$tabs[$lvl_it] .= " <li".($bro==$iterator?" class=\"current\"":"")."> <a href=\"$bro->{'file'}\"><span>$bro->{'label'}</span></a></li>\n";
}
foreach my $bro (@{$father->{'down'}}) {
$tabs[$lvl_it] .= " <li".($bro==$iterator?" class=\"current\"":"")."> <a href=\"$bro->{'file'}\"><span>$bro->{'label'}</span></a></li>\n";
}
@@
-216,7
+228,7
@@
sub handle_page {
$lvl_it--;
}
if (defined $current->{'down'}) { # there's some kid. Display them too
$lvl_it--;
}
if (defined $current->{'down'}) { # there's some kid. Display them too
- $tabs[$level+1] = "<div class=\"tabs
\">\n <ul
>\n";
+ $tabs[$level+1] = "<div class=\"tabs
2\">\n <ul class=\"tablist\"
>\n";
foreach my $kid (@{$current->{'down'}}) {
$tabs[$level+1] .= " <li> <a href=\"$kid->{'file'}\"><span>$kid->{'label'}</span></a></li>\n";
}
foreach my $kid (@{$current->{'down'}}) {
$tabs[$level+1] .= " <li> <a href=\"$kid->{'file'}\"><span>$kid->{'label'}</span></a></li>\n";
}
@@
-237,11
+249,33
@@
sub handle_page {
print TO "$_";
last if (m|</div>|);
}
print TO "$_";
last if (m|</div>|);
}
+
+ print TO "\n<!-- POST-PROCESSED TABS -->\n";
foreach (@tabs) {
# print "TAB: $_";
print TO "$_";
}
foreach (@tabs) {
# print "TAB: $_";
print TO "$_";
}
+ print TO "\n<!-- END OF POST-PROCESSED TABS -->\n";
+
+ if ($current->{'file'} =~ m/^class/) {
+ while (<FROM>) {
+ last if (m|</div>|);
+ }
+ print TO "$_";
+ }
while (<FROM>) {
while (<FROM>) {
+ if (m/POST-PROCESSED TABS/) {
+ while (<FROM>) {
+ last if (m/END OF POST-PROCESSED TABS/);
+ }
+ next;
+ }
+
+ if (m/The documentation for/) {
+ while (<FROM>) {
+ last if (m/<p>/);
+ }
+ }
print TO "$_";
}
close FROM;
print TO "$_";
}
close FROM;
@@
-288,11
+322,13
@@
foreach my $file (@allfiles) {
}
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";
}
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/)?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/)?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;
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 $_;
}
print TO $_;
}