Mercurial > hg > soundsoftware-site
comparison extra/soundsoftware/matlab-docs.pl @ 382:baff1c482d98 feature_113
First cut at making frames optional in mtree output
author | Chris Cannam |
---|---|
date | Mon, 04 Apr 2011 10:48:08 +0100 |
parents | 2dc8163e9150 |
children | 47ae83ce8db8 |
comparison
equal
deleted
inserted
replaced
381:2dc8163e9150 | 382:baff1c482d98 |
---|---|
3 @echo off | 3 @echo off |
4 perl -w -S %0.bat %1 %2 %3 %4 %5 %6 %7 %8 %9 | 4 perl -w -S %0.bat %1 %2 %3 %4 %5 %6 %7 %8 %9 |
5 goto endofperl | 5 goto endofperl |
6 @rem '; | 6 @rem '; |
7 # perl -w -S %0.bat "$@" | 7 # perl -w -S %0.bat "$@" |
8 #!/usr/pdsoft/bin/perl5 | 8 #!/usr/bin/perl |
9 # | 9 # |
10 # mtree2html_2000 - produce html files from Matlab m-files. | 10 # mtree2html_2000 - produce html files from Matlab m-files. |
11 # use configuration file for flexibility | 11 # use configuration file for flexibility |
12 # can process tree of directories | 12 # can process tree of directories |
13 # | 13 # |
69 # generated html code now all lower case | 69 # generated html code now all lower case |
70 # inclusion of meta-description and meta-keywords in html files | 70 # inclusion of meta-description and meta-keywords in html files |
71 # HTML4 compliance done (should be strict HTML4.0, quite near XHTML) | 71 # HTML4 compliance done (should be strict HTML4.0, quite near XHTML) |
72 # version 1.23 | 72 # version 1.23 |
73 # | 73 # |
74 # Latest version is available as: | 74 # 29.03.2011 (Chris Cannam) add frames option |
75 # | |
76 # | 75 # |
77 | 76 |
78 $VERSION = '1.23'; | 77 $VERSION = '1.23'; |
79 ($PROGRAM = $0) =~ s@.*/@@; $PROGRAM = "\U$PROGRAM\E"; | 78 ($PROGRAM = $0) =~ s@.*/@@; $PROGRAM = "\U$PROGRAM\E"; |
80 $debug = 0; | 79 $debug = 0; |
91 $dirsep = "/"; | 90 $dirsep = "/"; |
92 # what is the current directory | 91 # what is the current directory |
93 $diract = "."; | 92 $diract = "."; |
94 | 93 |
95 #------------------------------------------------------------------------ | 94 #------------------------------------------------------------------------ |
96 # Define all variables and there standard settings | 95 # Define all variables and their standard settings |
97 # documentation of variables is contained in accompanying rc file | 96 # documentation of variables is contained in accompanying rc file |
98 #------------------------------------------------------------------------ | 97 #------------------------------------------------------------------------ |
99 %var = | 98 %var = |
100 ( | 99 ( |
101 'authorfile', '', | 100 'authorfile', '', |
107 'configfile', 'mtree2html2001_rc.txt', | 106 'configfile', 'mtree2html2001_rc.txt', |
108 'csslink', '', | 107 'csslink', '', |
109 'dirmfiles', $diract, | 108 'dirmfiles', $diract, |
110 'dirhtml', $diract, | 109 'dirhtml', $diract, |
111 'exthtml', '.html', | 110 'exthtml', '.html', |
111 'frames', 'yes', | |
112 'filenametopframe', 'index', | 112 'filenametopframe', 'index', |
113 'filenameindexlongglobal', 'indexlg', | 113 'filenameindexlongglobal', 'indexlg', |
114 'filenameindexlonglocal', 'indexll', | 114 'filenameindexlonglocal', 'indexll', |
115 'filenameindexshortglobal', 'indexsg', | 115 'filenameindexshortglobal', 'indexsg', |
116 'filenameindexshortlocal', 'indexsl', | 116 'filenameindexshortlocal', 'indexsl', |
209 $var{'processtree'} = $opt_processtree if $opt_processtree; | 209 $var{'processtree'} = $opt_processtree if $opt_processtree; |
210 if ($var{'processtree'} ne 'no') { $var{'processtree'} = 'yes'; } | 210 if ($var{'processtree'} ne 'no') { $var{'processtree'} = 'yes'; } |
211 $var{'producetree'} = $opt_producetree if $opt_producetree; | 211 $var{'producetree'} = $opt_producetree if $opt_producetree; |
212 if ($var{'producetree'} ne 'no') { $var{'producetree'} = 'yes'; } | 212 if ($var{'producetree'} ne 'no') { $var{'producetree'} = 'yes'; } |
213 if ($var{'processtree'} eq 'no') { $var{'producetree'} = 'no'; } | 213 if ($var{'processtree'} eq 'no') { $var{'producetree'} = 'no'; } |
214 if ($var{'frames'} ne 'no') { $var{'frames'} = 'yes'; } | |
214 # if (($var{'processtree'} eq 'yes') && ($var{'producetree'} eq 'no')) { $var{'usecontentsm'} = 'no'; } | 215 # if (($var{'processtree'} eq 'yes') && ($var{'producetree'} eq 'no')) { $var{'usecontentsm'} = 'no'; } |
215 | 216 |
216 $var{'writecontentsm'} = $opt_writecontentsm if $opt_writecontentsm; | 217 $var{'writecontentsm'} = $opt_writecontentsm if $opt_writecontentsm; |
217 | 218 |
218 #------------------------------------------------------------------------ | 219 #------------------------------------------------------------------------ |
640 | 641 |
641 # Build the frame layout file, this files includes the layout of the frames | 642 # Build the frame layout file, this files includes the layout of the frames |
642 # Build the frame layout file name (highest one) | 643 # Build the frame layout file name (highest one) |
643 $indexfile = $var{'dirhtml'}.$var{'filenametopframe'}.$var{'exthtml'}; | 644 $indexfile = $var{'dirhtml'}.$var{'filenametopframe'}.$var{'exthtml'}; |
644 | 645 |
645 open(IFILE,">$indexfile") || die("Cannot open frame layout file $indexfile\n"); | 646 if ($var{'frames'} eq 'yes') { |
646 # Write the header of frame file | 647 |
647 print IFILE "$TextDocTypeFrame\n<html>\n<head>\n$var{'codeheadmeta'}\n$TextMetaCharset\n"; | 648 open(IFILE,">$indexfile") || die("Cannot open frame layout file $indexfile\n"); |
648 print IFILE " <title>$var{'texttitleframelayout'}</title>\n"; | 649 |
649 print IFILE "</head>\n"; | 650 # Write the header of frame file |
650 | 651 print IFILE "$TextDocTypeFrame\n<html>\n<head>\n$var{'codeheadmeta'}\n$TextMetaCharset\n"; |
651 # definition of 2 frames, left the tree of directories, | 652 print IFILE " <title>$var{'texttitleframelayout'}</title>\n"; |
652 # right the index of that directory or the docu of a file | 653 print IFILE "</head>\n"; |
653 print IFILE "<frameset cols=\"25%,75%\">\n"; | 654 |
654 print IFILE " <frame src=\"$var{'filenamedirshort'}$var{'exthtml'}\" name=\"$GlobalNameFrameMainLeft\" />\n"; | 655 # definition of 2 frames, left the tree of directories, |
655 print IFILE " <frame src=\"$var{'filenameindexshortglobal'}$var{'filenameextensionframe'}$var{'exthtml'}\" name=\"$GlobalNameFrameMainRight\" />\n"; print IFILE "</frameset>\n"; | 656 # right the index of that directory or the docu of a file |
656 | 657 print IFILE "<frameset cols=\"25%,75%\">\n"; |
657 print IFILE "</html>\n"; | 658 print IFILE " <frame src=\"$var{'filenamedirshort'}$var{'exthtml'}\" name=\"$GlobalNameFrameMainLeft\" />\n"; |
658 | 659 print IFILE " <frame src=\"$var{'filenameindexshortglobal'}$var{'filenameextensionframe'}$var{'exthtml'}\" name=\"$GlobalNameFrameMainRight\" />\n"; print IFILE "</frameset>\n"; |
659 close(IFILE); | 660 |
660 | 661 print IFILE "</html>\n"; |
661 if ($opt_silent) { print "\r"; } | 662 |
662 print " Frame layout file created: $indexfile\t"; | 663 close(IFILE); |
663 if (!$opt_silent) { print "\n"; } | 664 |
665 if ($opt_silent) { print "\r"; } | |
666 print " Frame layout file created: $indexfile\t"; | |
667 if (!$opt_silent) { print "\n"; } | |
668 } | |
664 | 669 |
665 for($irun=0; $irun <= 2; $irun++) { | 670 for($irun=0; $irun <= 2; $irun++) { |
666 # Build the top directory index file, these files include the directory tree | 671 # Build the top directory index file, these files include the directory tree |
667 # Build the directory tree index file name | 672 # Build the directory tree index file name |
668 | 673 |
683 if ($var{'texttitleindexalldirs'} eq '') { | 688 if ($var{'texttitleindexalldirs'} eq '') { |
684 print IFILE "<title>Index of Directories of $var{'dirmfiles'}</title>\n"; | 689 print IFILE "<title>Index of Directories of $var{'dirmfiles'}</title>\n"; |
685 } else { | 690 } else { |
686 print IFILE "<title>$var{'texttitleindexalldirs'}</title>\n"; | 691 print IFILE "<title>$var{'texttitleindexalldirs'}</title>\n"; |
687 } | 692 } |
688 print IFILE "<base target=\"$GlobalNameFrameMainRight\" />\n"; | 693 |
689 | 694 if ($var{'frames'} eq 'yes') { |
695 print IFILE "<base target=\"$GlobalNameFrameMainRight\" />\n"; | |
696 } | |
697 | |
690 print IFILE "</head>\n"; | 698 print IFILE "</head>\n"; |
691 print IFILE "<body $var{'codebodyindex'}>\n"; | 699 print IFILE "<body $var{'codebodyindex'}>\n"; |
692 if ($var{'textheaderindexalldirs'} eq '') { | 700 if ($var{'textheaderindexalldirs'} eq '') { |
693 print IFILE "<h1 $var{'codeheader'}>Index of Directories of <em>$var{'dirmfiles'}</em></h1>\n"; | 701 print IFILE "<h1 $var{'codeheader'}>Index of Directories of <em>$var{'dirmfiles'}</em></h1>\n"; |
694 } else { | 702 } else { |
695 print IFILE "<h1 $var{'codeheader'}>$var{'textheaderindexalldirs'}</h1>\n"; | 703 print IFILE "<h1 $var{'codeheader'}>$var{'textheaderindexalldirs'}</h1>\n"; |
696 } | 704 } |
697 print IFILE "<p align=\"center\">\n"; | 705 print IFILE "<p align=\"center\">\n"; |
698 if ($irun == 0) { print IFILE "<strong>short</strong>\n"; } | 706 |
699 else { print IFILE "<a href=\"$var{'filenamedirshort'}$var{'exthtml'}\" target=\"$GlobalNameFrameMainLeft\">short</a>\n"; } | 707 if ($var{'frames'} eq 'yes') { |
700 if ($irun == 1) { print IFILE " | <strong>long</strong>\n"; } | 708 if ($irun == 0) { print IFILE "<strong>short</strong>\n"; } |
701 else { print IFILE " | <a href=\"$var{'filenamedirlong'}$var{'exthtml'}\" target=\"$GlobalNameFrameMainLeft\">long</a>\n"; } | 709 else { print IFILE "<a href=\"$var{'filenamedirshort'}$var{'exthtml'}\" target=\"$GlobalNameFrameMainLeft\">short</a>\n"; } |
702 if ($var{'usecontentsm'} eq 'yes') { | 710 if ($irun == 1) { print IFILE " | <strong>long</strong>\n"; } |
703 if ($irun == 2) { print IFILE " | <strong>contents</strong>\n"; } | 711 else { print IFILE " | <a href=\"$var{'filenamedirlong'}$var{'exthtml'}\" target=\"$GlobalNameFrameMainLeft\">long</a>\n"; } |
704 else { print IFILE " | <a href=\"$var{'filenamedircontents'}$var{'exthtml'}\" target=\"$GlobalNameFrameMainLeft\">contents</a>\n"; } | 712 if ($var{'usecontentsm'} eq 'yes') { |
713 if ($irun == 2) { print IFILE " | <strong>contents</strong>\n"; } | |
714 else { print IFILE " | <a href=\"$var{'filenamedircontents'}$var{'exthtml'}\" target=\"$GlobalNameFrameMainLeft\">contents</a>\n"; } | |
715 } | |
716 } else { | |
717 if ($irun == 0) { print IFILE "<strong>short</strong>\n"; } | |
718 else { print IFILE "<a href=\"$var{'filenamedirshort'}$var{'exthtml'}\">short</a>\n"; } | |
719 if ($irun == 1) { print IFILE " | <strong>long</strong>\n"; } | |
720 else { print IFILE " | <a href=\"$var{'filenamedirlong'}$var{'exthtml'}\">long</a>\n"; } | |
721 if ($var{'usecontentsm'} eq 'yes') { | |
722 if ($irun == 2) { print IFILE " | <strong>contents</strong>\n"; } | |
723 else { print IFILE " | <a href=\"$var{'filenamedircontents'}$var{'exthtml'}\">contents</a>\n"; } | |
724 } | |
705 } | 725 } |
706 | 726 |
707 print IFILE "</p><br />\n\n"; | 727 print IFILE "</p><br />\n\n"; |
708 print IFILE "<ul>\n"; | 728 print IFILE "<ul>\n"; |
709 | 729 |
779 # handle the global index file case separately (no extra directory name in file) | 799 # handle the global index file case separately (no extra directory name in file) |
780 # the local index file name must be extended by the name of the directory | 800 # the local index file name must be extended by the name of the directory |
781 if ($LocalGlobalLocal eq 'global') { $extradirfilename = ''; } | 801 if ($LocalGlobalLocal eq 'global') { $extradirfilename = ''; } |
782 else { $extradirfilename = $dirnamesingle{$LocalActDir}; } | 802 else { $extradirfilename = $dirnamesingle{$LocalActDir}; } |
783 $indexfile = $var{'dirhtml'}.$dirnamerelpath{$LocalActDir}.$indexfilename.$var{'filenameextensionindex'}.$extradirfilename.$var{'exthtml'}; | 803 $indexfile = $var{'dirhtml'}.$dirnamerelpath{$LocalActDir}.$indexfilename.$var{'filenameextensionindex'}.$extradirfilename.$var{'exthtml'}; |
804 | |
805 if ($LocalShortLong eq 'short' and $var{'frames'} ne 'yes') { | |
806 # With no frames, this must go in the top-level index file instead | |
807 $indexfile = $var{'dirhtml'}.$var{'filenametopframe'}.$var{'exthtml'}; | |
808 } | |
809 | |
784 if ($debug > 2) { print " indexfilename (a-z small): $indexfile\n"; } | 810 if ($debug > 2) { print " indexfilename (a-z small): $indexfile\n"; } |
785 | 811 |
786 open(IFILE,">$indexfile") || die("Cannot open index file $indexfile: $!\n"); | 812 open(IFILE,">$indexfile") || die("Cannot open index file $indexfile: $!\n"); |
787 | 813 |
788 # Write the header of HTML file | 814 # Write the header of HTML file |
792 print IFILE "<title>Index of Matlab Files in Directory $LocalActDir</title>\n"; | 818 print IFILE "<title>Index of Matlab Files in Directory $LocalActDir</title>\n"; |
793 } else { | 819 } else { |
794 if ($LocalGlobalLocal eq 'global') { print IFILE "<title>$var{'texttitleindex'}</title>\n"; } | 820 if ($LocalGlobalLocal eq 'global') { print IFILE "<title>$var{'texttitleindex'}</title>\n"; } |
795 else { print IFILE "<title>$var{'texttitleindex'} in Directory $LocalActDir</title>\n"; } | 821 else { print IFILE "<title>$var{'texttitleindex'} in Directory $LocalActDir</title>\n"; } |
796 } | 822 } |
797 print IFILE "<base target=\"$GlobalNameFrameMainRight\" />\n"; | 823 |
824 if ($var{'frames'} eq 'yes') { | |
825 print IFILE "<base target=\"$GlobalNameFrameMainRight\" />\n"; | |
826 } | |
798 print IFILE "</head>\n"; | 827 print IFILE "</head>\n"; |
828 | |
799 print IFILE "<body $var{'codebodyindex'}>\n"; | 829 print IFILE "<body $var{'codebodyindex'}>\n"; |
800 if ($var{'textheaderindex'} eq '') { | 830 if ($var{'textheaderindex'} eq '') { |
801 print IFILE "<h1 $var{'codeheader'}>Index of Matlab Files in Directory $LocalActDir</h1>\n"; | 831 print IFILE "<h1 $var{'codeheader'}>Index of Matlab Files in Directory $LocalActDir</h1>\n"; |
802 } else { | 832 } else { |
803 if ($LocalGlobalLocal eq 'global') { print IFILE "<h1 $var{'codeheader'}>$var{'textheaderindex'}</h1>\n"; } | 833 if ($LocalGlobalLocal eq 'global') { print IFILE "<h1 $var{'codeheader'}>$var{'textheaderindex'}</h1>\n"; } |
885 | 915 |
886 # Build the A-Z jump index file name | 916 # Build the A-Z jump index file name |
887 # handle the global index file case separately (no extra directory name in file) | 917 # handle the global index file case separately (no extra directory name in file) |
888 if ($LocalGlobalLocal eq 'global') { $extradirfilename = ''; } | 918 if ($LocalGlobalLocal eq 'global') { $extradirfilename = ''; } |
889 else { $extradirfilename = $dirnamesingle{$LocalActDir}; } | 919 else { $extradirfilename = $dirnamesingle{$LocalActDir}; } |
890 $indexfile = $var{'dirhtml'}.$dirnamerelpath{$LocalActDir}.$indexfilename.$var{'filenameextensionjump'}.$extradirfilename.$var{'exthtml'}; | 920 |
891 if ($debug > 2) { print " indexfilename (a-z jump): $indexfile\n"; } | 921 if ($var{'frames'} eq 'yes') { |
892 open(IFILE,">$indexfile") || die("Cannot open jump index file $indexfile: $!\n"); | 922 |
893 | 923 $indexfile = $var{'dirhtml'}.$dirnamerelpath{$LocalActDir}.$indexfilename.$var{'filenameextensionjump'}.$extradirfilename.$var{'exthtml'}; |
894 # Write the header of HTML file | 924 if ($debug > 2) { print " indexfilename (a-z jump): $indexfile\n"; } |
895 print IFILE "$TextDocTypeHTML\n<html>\n<head>\n$var{'codeheadmeta'}\n$TextMetaCharset\n$var{'csslink'}\n"; | 925 open(IFILE,">$indexfile") || die("Cannot open jump index file $indexfile: $!\n"); |
896 | 926 |
897 if ($var{'texttitleindex'} eq '') { | 927 # Write the header of HTML file |
898 print IFILE "<title>A-Z jump index in directory $LocalActDir</title>\n"; | 928 print IFILE "$TextDocTypeHTML\n<html>\n<head>\n$var{'codeheadmeta'}\n$TextMetaCharset\n$var{'csslink'}\n"; |
899 } else { | 929 |
900 if ($LocalGlobalLocal eq 'global') { print IFILE "<title>$var{'texttitleindex'}</title>\n"; } | 930 if ($var{'texttitleindex'} eq '') { |
901 else { print IFILE "<title>$var{'texttitleindex'} in Directory $LocalActDir</title>\n"; } | 931 print IFILE "<title>A-Z jump index in directory $LocalActDir</title>\n"; |
902 } | 932 } else { |
903 print IFILE "<base target=\"$GlobalNameFrameAZIndexsmall\" />\n"; | 933 if ($LocalGlobalLocal eq 'global') { print IFILE "<title>$var{'texttitleindex'}</title>\n"; } |
904 print IFILE "</head>\n"; | 934 else { print IFILE "<title>$var{'texttitleindex'} in Directory $LocalActDir</title>\n"; } |
905 print IFILE "<body $var{'codebodyindex'}>\n"; | 935 } |
906 | 936 |
907 # Write the A-Z jump line, generate link for letters with files starting with this letter | 937 if ($var{'frames'} eq 'yes') { |
908 # and only letters for no files starting with this letter | 938 print IFILE "<base target=\"$GlobalNameFrameAZIndexsmall\" />\n"; |
909 # use previously generated arrays with names of files sorted by starting letter | 939 } |
910 for('a'..'z') { | 940 print IFILE "</head>\n"; |
911 $numberofletter = $#{$_}+1; | 941 print IFILE "<body $var{'codebodyindex'}>\n"; |
912 if ($numberofletter > 0) { | 942 |
913 print IFILE "<strong><a href=\"$indexfilename$var{'filenameextensionindex'}$extradirfilename$var{'exthtml'}#\U$_\E$_\">\U$_\E</a> </strong>\n"; | 943 # Write the A-Z jump line, generate link for letters with files starting with this letter |
914 } else { | 944 # and only letters for no files starting with this letter |
915 print IFILE "\U$_\E \n"; | 945 # use previously generated arrays with names of files sorted by starting letter |
916 } | 946 for('a'..'z') { |
917 } | 947 $numberofletter = $#{$_}+1; |
918 | 948 if ($numberofletter > 0) { |
919 print IFILE "</body>\n</html>\n"; | 949 print IFILE "<strong><a href=\"$indexfilename$var{'filenameextensionindex'}$extradirfilename$var{'exthtml'}#\U$_\E$_\">\U$_\E</a> </strong>\n"; |
920 | 950 } else { |
921 close(IFILE); | 951 print IFILE "\U$_\E \n"; |
922 | 952 } |
923 if ($opt_silent) { print "\r"; } | 953 } |
924 print " Indexfile small (A-Z jump) created: $indexfile\t"; | 954 |
925 if (!$opt_silent) { print "\n"; } | 955 print IFILE "</body>\n</html>\n"; |
956 | |
957 close(IFILE); | |
958 | |
959 if ($opt_silent) { print "\r"; } | |
960 print " Indexfile small (A-Z jump) created: $indexfile\t"; | |
961 if (!$opt_silent) { print "\n"; } | |
962 } | |
926 | 963 |
927 | 964 |
928 # Build the frame layout file, this file includes the layout of the frames | 965 # Build the frame layout file, this file includes the layout of the frames |
929 # Build the frame layout file name (for small/compact A-Z index) | 966 # Build the frame layout file name (for small/compact A-Z index) |
930 # handle the global index file case separately (no extra directory name in file) | 967 # handle the global index file case separately (no extra directory name in file) |
931 if ($LocalGlobalLocal eq 'global') { $extradirfilename = ''; } | 968 if ($LocalGlobalLocal eq 'global') { $extradirfilename = ''; } |
932 else { $extradirfilename = $dirnamesingle{$LocalActDir}; } | 969 else { $extradirfilename = $dirnamesingle{$LocalActDir}; } |
933 $indexfile = $var{'dirhtml'}.$dirnamerelpath{$LocalActDir}.$indexfilename.$var{'filenameextensionframe'}.$extradirfilename.$var{'exthtml'}; | 970 |
934 if ($debug > 2) { print " indexfilename (a-z frame): $indexfile\n"; } | 971 if ($var{'frames'} eq 'yes') { |
935 | 972 |
936 open(IFILE,">$indexfile") || die("Cannot open jump index frame file $indexfile: $!\n"); | 973 $indexfile = $var{'dirhtml'}.$dirnamerelpath{$LocalActDir}.$indexfilename.$var{'filenameextensionframe'}.$extradirfilename.$var{'exthtml'}; |
937 | 974 if ($debug > 2) { print " indexfilename (a-z frame): $indexfile\n"; } |
938 # Write the header of Frame file | 975 |
939 print IFILE "$TextDocTypeHTML\n<html>\n<head>\n$var{'codeheadmeta'}\n$TextMetaCharset\n$var{'csslink'}\n"; | 976 open(IFILE,">$indexfile") || die("Cannot open jump index frame file $indexfile: $!\n"); |
940 | 977 |
941 if ($var{'texttitleindex'} eq '') { | 978 # Write the header of Frame file |
942 print IFILE "<title>Index of Matlab Files in Directory $LocalActDir</title>\n"; | 979 print IFILE "$TextDocTypeHTML\n<html>\n<head>\n$var{'codeheadmeta'}\n$TextMetaCharset\n$var{'csslink'}\n"; |
943 } else { | 980 |
944 if ($LocalGlobalLocal eq 'global') { print IFILE "<title>$var{'texttitleindex'}</title>\n"; } | 981 if ($var{'texttitleindex'} eq '') { |
945 else { print IFILE "<title>$var{'texttitleindex'} in Directory $LocalActDir</title>\n"; } | 982 print IFILE "<title>Index of Matlab Files in Directory $LocalActDir</title>\n"; |
946 } | 983 } else { |
947 print IFILE "</head>\n"; | 984 if ($LocalGlobalLocal eq 'global') { print IFILE "<title>$var{'texttitleindex'}</title>\n"; } |
948 | 985 else { print IFILE "<title>$var{'texttitleindex'} in Directory $LocalActDir</title>\n"; } |
949 # definition of 2 frames, top the A-Z index, below the jump letter line | 986 } |
950 print IFILE "<frameset rows=\"90%,10%\">\n"; | 987 print IFILE "</head>\n"; |
951 print IFILE " <frame src=\"$indexfilename$var{'filenameextensionindex'}$extradirfilename$var{'exthtml'}\" name=\"$GlobalNameFrameAZIndexsmall\" />\n"; | 988 |
952 print IFILE " <frame src=\"$indexfilename$var{'filenameextensionjump'}$extradirfilename$var{'exthtml'}\" name=\"$GlobalNameFrameAZIndexjump\" />\n"; | 989 # definition of 2 frames, top the A-Z index, below the jump letter line |
953 print IFILE "</frameset>\n"; | 990 print IFILE "<frameset rows=\"90%,10%\">\n"; |
954 | 991 print IFILE " <frame src=\"$indexfilename$var{'filenameextensionindex'}$extradirfilename$var{'exthtml'}\" name=\"$GlobalNameFrameAZIndexsmall\" />\n"; |
955 print IFILE "</html>\n"; | 992 print IFILE " <frame src=\"$indexfilename$var{'filenameextensionjump'}$extradirfilename$var{'exthtml'}\" name=\"$GlobalNameFrameAZIndexjump\" />\n"; |
956 | 993 print IFILE "</frameset>\n"; |
957 close(IFILE); | 994 |
958 | 995 print IFILE "</html>\n"; |
959 if ($opt_silent) { print "\r"; } | 996 |
960 print " Frame layout file created: $indexfile\t"; | 997 close(IFILE); |
961 if (!$opt_silent) { print "\n"; } | 998 |
962 } | 999 if ($opt_silent) { print "\r"; } |
963 | 1000 print " Frame layout file created: $indexfile\t"; |
1001 if (!$opt_silent) { print "\n"; } | |
1002 } | |
1003 } | |
1004 | |
964 | 1005 |
965 #======================================================================== | 1006 #======================================================================== |
966 # Construct the links to all indexes | 1007 # Construct the links to all indexes |
967 #======================================================================== | 1008 #======================================================================== |
968 sub ConstructLinks2Index | 1009 sub ConstructLinks2Index |
970 local(*WRITEFILE, $LocalPath2Index, $PathContents, $LocalGlobalLocal) = @_; | 1011 local(*WRITEFILE, $LocalPath2Index, $PathContents, $LocalGlobalLocal) = @_; |
971 | 1012 |
972 # include links to short/long - local/global index and C|contents.m | 1013 # include links to short/long - local/global index and C|contents.m |
973 print WRITEFILE "\n<p align=\"center\">"; | 1014 print WRITEFILE "\n<p align=\"center\">"; |
974 print WRITEFILE "$var{'textjumpindexglobal'} ("; | 1015 print WRITEFILE "$var{'textjumpindexglobal'} ("; |
975 print WRITEFILE "<a href = \"$LocalPath2Index$var{'filenameindexshortglobal'}$var{'filenameextensionframe'}$var{'exthtml'}\">short</a> | "; | 1016 |
976 print WRITEFILE "<a href = \"$LocalPath2Index$var{'filenameindexlongglobal'}$var{'filenameextensionframe'}$var{'exthtml'}\">long</a>)\n"; | 1017 if ($var{'frames'} eq 'yes') { |
1018 print WRITEFILE "<a href=\"$LocalPath2Index$var{'filenameindexshortglobal'}$var{'filenameextensionframe'}$var{'exthtml'}\">short</a> | "; | |
1019 } else { | |
1020 print WRITEFILE "<a href=\"$LocalPath2Index$var{'filenametopframe'}.$var{'exthtml'}\">short</a> | "; | |
1021 } | |
1022 | |
1023 print WRITEFILE "<a href=\"$LocalPath2Index$var{'filenameindexlongglobal'}$var{'filenameextensionframe'}$var{'exthtml'}\">long</a>)\n"; | |
977 if ($LocalGlobalLocal eq 'local') { | 1024 if ($LocalGlobalLocal eq 'local') { |
978 if ($var{'usecontentsm'} eq 'yes') { | 1025 if ($var{'usecontentsm'} eq 'yes') { |
979 print WRITEFILE " | <a href=\"$contentsname{$PathContents}$dirnamesingle{$PathContents}$var{'exthtml'}\">Local contents</a>\n"; | 1026 print WRITEFILE " | <a href=\"$contentsname{$PathContents}$dirnamesingle{$PathContents}$var{'exthtml'}\">Local contents</a>\n"; |
980 } | 1027 } |
981 # if ($var{'producetree'} eq 'yes') { | 1028 # if ($var{'producetree'} eq 'yes') { |
982 print WRITEFILE " | $var{'textjumpindexlocal'} ("; | 1029 print WRITEFILE " | $var{'textjumpindexlocal'} ("; |
983 print WRITEFILE "<a href = \"$var{'filenameindexshortlocal'}$var{'filenameextensionframe'}$dirnamesingle{$PathContents}$var{'exthtml'}\">short</a> | "; | 1030 print WRITEFILE "<a href=\"$var{'filenameindexshortlocal'}$var{'filenameextensionframe'}$dirnamesingle{$PathContents}$var{'exthtml'}\">short</a> | "; |
984 print WRITEFILE "<a href = \"$var{'filenameindexlonglocal'}$var{'filenameextensionframe'}$dirnamesingle{$PathContents}$var{'exthtml'}\">long</a>)\n"; | 1031 print WRITEFILE "<a href=\"$var{'filenameindexlonglocal'}$var{'filenameextensionframe'}$dirnamesingle{$PathContents}$var{'exthtml'}\">long</a>)\n"; |
985 # } | 1032 # } |
986 } | 1033 } |
987 print WRITEFILE "</p>\n\n"; | 1034 print WRITEFILE "</p>\n\n"; |
988 print WRITEFILE "$var{'codehr'}\n"; | 1035 print WRITEFILE "$var{'codehr'}\n"; |
989 } | 1036 } |