From df88b47cdafcc2e04452456942ea572a7b72e2f2 Mon Sep 17 00:00:00 2001 From: Lars G Thorsen Date: Tue, 26 Jan 2010 10:13:35 +0000 Subject: OTP-8343 The documentation is now possible to build in an open source environment after a number of bugs are fixed and some features are added in the documentation build process. - The arity calculation is updated. - The module prefix used in the function names for bif's are removed in the generated links so the links will look like http://www.erlang.org/doc/man/erlang.html#append_element-2 instead of http://www.erlang.org/doc/man/erlang.html#erlang:append_element-2 - Enhanced the menu positioning in the html documentation when a new page is loaded. - A number of corrections in the generation of man pages (thanks to Sergei Golovan) - Moved some man pages to more apropriate sections, pages in section 4 moved to 5 and pages in 6 moved to 7. - The legal notice is taken from the xml book file so OTP's build process can be used for non OTP applications. --- system/doc/top/bin/otp_man_index | 107 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 106 insertions(+), 1 deletion(-) mode change 120000 => 100755 system/doc/top/bin/otp_man_index (limited to 'system/doc/top/bin/otp_man_index') diff --git a/system/doc/top/bin/otp_man_index b/system/doc/top/bin/otp_man_index deleted file mode 120000 index bb913b25df..0000000000 --- a/system/doc/top/bin/otp_man_index +++ /dev/null @@ -1 +0,0 @@ -../../../../internal_tools/integration/scripts/otp_man_index \ No newline at end of file diff --git a/system/doc/top/bin/otp_man_index b/system/doc/top/bin/otp_man_index new file mode 100755 index 0000000000..57a0f12d32 --- /dev/null +++ b/system/doc/top/bin/otp_man_index @@ -0,0 +1,106 @@ +#!/opt/local/bin/perl + +use File::Find; +use strict; + +######################################### +# Usage: +# $ cd $ERLANG_RELEASE +# otp_man_index > doc/man_index.html +######################################### + +my (@list,$info); + +find(\&wanted,'.'); + +header(); + +foreach $info (sort {lc($a->[0]) cmp lc($b->[0])} @list) { + my ($module,$application,$dir,$path) = @$info; + + my $idx = -f "$dir/index.html" ? "$dir/index.html" : "$dir/../index.html"; + # Remove .html extension from module name, if there is one + if ($module =~ /(\w+).html$/) { + $module = "$1"; + } + print " \n"; + print " $module\n"; + print " $application\n"; + print " \n"; +} + +footer(); + +########################################################################### + +sub wanted { + return unless /\.html$/ and -f $_; + + open(FILE,$_) or die "ERROR: Can't open $File::Find::name: $!\n"; + my $line; + + while (defined ($line = )) { + if ($line =~ //) { + close FILE; + my $path = $File::Find::name; + $path =~ s/\.\///; # Remove './' prefix + my $dir = $File::Find::dir; + $dir =~ s/\.\///; # Remove './' prefix + $dir =~ m&([^/]+)/doc/html$&; + my $application = $1; + push(@list, [$_,$application,$dir,$path]); + return; + } + } + close FILE; +} + + +sub header { + print < + + + + + Erlang/OTP Manual Page Index + + +
+ + +[Up | +Erlang] +
+

Manual Page Index
+

+
+

+ + + + +EOS +} + +sub footer { + my $year = (localtime)[5] + 1900; + print < + +

+

+
+ +Copyright © 1991-$year + +Ericsson AB + +
+ + +EOS +} -- cgit v1.2.3
Manual PageApplication