4 # Read in the references, and put into an associative array
6 open FILE, "<refs" || die "Error opening refs: $!\n";
16 # now loop over the input RFC's.
18 foreach $file (@ARGV) {
19 open FILE, "<$file" || die "Error opening $file: $!\n";
23 # get the current reference
27 open OUTPUT, ">$ref.html" || die "Error creating $ref.html: $!\n";
30 # Print out the HTML header
33 <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
36 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
37 <meta name="GENERATOR" content="Perl">
38 <title>$ref.html</title>
45 # loop over the input file
65 # Attribute name header.
67 if (/^\d+\./ && !/\d$/) {
70 if ($refs{$_[1]} ne "") {
73 print OUTPUT "<A NAME=\"$attribute\"><H2>$_</H2></a>\n";
76 print OUTPUT "<H2>$_</H2>\n";
83 # Mark these up special.
85 if ((/^ Description/) ||
89 print OUTPUT "<B>$_</B>\n";
93 # Make the current attribute name bold
94 s/$attribute/<B>$attribute<\/B>/g;
99 # Re-write the output with links to where-ever
102 $word =~ s/[^-a-zA-Z]//g;
104 if ($refs{$word} ne "") {
105 if ($refs{$word} eq $ref) {
106 s/$word/<A HREF="#$word">$word<\/A>/g;
108 s/$word/<A HREF="$refs{$word}.html#$word">$word<\/A>/g;
113 print OUTPUT $_, "\n";
116 print OUTPUT "</PRE>\n";
117 print OUTPUT "</BODY>\n";
123 # And finally, create the index.
125 open OUTPUT, ">attributes.html" || die "Error creating attributes.html: $!\n";
128 # Print out the HTML header
131 <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
134 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
135 <meta name="GENERATOR" content="Perl">
136 <title>$ref.html</title>
140 <H2>RADIUS Attribute List</H2>
145 foreach $key (sort keys %refs) {
146 if (substr($key,0,1) ne $letter) {
147 print OUTPUT "</UL>\n" if ($letter ne "@");
148 $letter = substr($key,0,1);
149 print OUTPUT "\n<H3>$letter</H3>\n\n";
150 print OUTPUT "<UL>\n";
153 print OUTPUT "<A HREF=\"$refs{$key}.html#$key\">$key</A><BR>\n";
156 print OUTPUT "</UL>\n";
158 print OUTPUT "</BODY>\n";