[Pkg-doc-linux-devel] r225 - trunk/website
Frank Lichtenheld
djpig at costa.debian.org
Thu Sep 28 15:43:09 UTC 2006
Author: djpig
Date: 2006-09-28 15:43:09 +0000 (Thu, 28 Sep 2006)
New Revision: 225
Modified:
trunk/website/create_index_pages.pl
trunk/website/index.html
Log:
Add two additional pages: A list of all licenses and a list of all HOWTOs
Modified: trunk/website/create_index_pages.pl
===================================================================
--- trunk/website/create_index_pages.pl 2006-09-28 15:10:53 UTC (rev 224)
+++ trunk/website/create_index_pages.pl 2006-09-28 15:43:09 UTC (rev 225)
@@ -16,6 +16,9 @@
return $text;
}
+my %all_howtos;
+my %all_licenses;
+
opendir DIR, $dir or die "couldn't open $dir: $!";
while (my $category = readdir DIR) {
@@ -34,6 +37,7 @@
next if $license =~ /^\./;
push @licenses, $license;
+ $all_licenses{$license} = [ $category, 0 ];
print "$#licenses\tFound License File $license\n";
open LICENSE, "$dir/$category/$license"
@@ -42,8 +46,10 @@
last unless /^HOWTO:\s+(\S+)/;
print "\t\tFound HOWTO $1\n";
push @{$howtos{$license}}, $1;
+ $all_howtos{$1} = [ $category, $license ];
$howtos++;
}
+ $all_licenses{$license}[1] = scalar @{$howtos{$license}};
my $text = '';
while (<LICENSE>) {
$text .= $_;
@@ -75,4 +81,27 @@
print LICFILE footer();
print LICFILE end_html();
}
-}
+}
+
+print "Create File $html_dir/all_licenses.html\n";
+open ALLLFILE, '>', "$html_dir/all_licenses.html"
+ or die "couldn't open $html_dir/all_licenses.html: $!";
+print ALLLFILE start_html("HOWTO licenses");
+print ALLLFILE p( a({-href=>"index.html"},'Home') );
+print ALLLFILE h1("HOWTO licenses");
+print ALLLFILE p( "Follow the links to get a list of HOWTOs currently distributed under the license." );
+print ALLLFILE ul(li( [ map { a({-href=>"lic_$_.html"},$_)." (".a({-href=>"cat_$all_licenses{$_}[0].html"},$all_licenses{$_}[0]).", $all_licenses{$_}[1])"} sort keys %all_licenses ] ));
+print ALLLFILE footer();
+print ALLLFILE end_html();
+
+print "Create File $html_dir/all_howtos.html\n";
+open ALLHFILE, '>', "$html_dir/all_howtos.html"
+ or die "couldn't open $html_dir/all_howtos.html: $!";
+print ALLHFILE start_html("HOWTOs");
+print ALLHFILE p( a({-href=>"index.html"},'Home') );
+print ALLHFILE h1("HOWTOs");
+#print ALLHFILE p( "Follow the links to get the text of a HOWTO's license." );
+print ALLHFILE ul(li( [ map { "$_ (".a({-href=>"cat_$all_howtos{$_}[0].html"},$all_howtos{$_}[0]).", ".a({-href=>"lic_$all_howtos{$_}[1].html"},$all_howtos{$_}[1]).")"} sort keys %all_howtos ] ));
+print ALLHFILE footer();
+print ALLHFILE end_html();
+
Modified: trunk/website/index.html
===================================================================
--- trunk/website/index.html 2006-09-28 15:10:53 UTC (rev 224)
+++ trunk/website/index.html 2006-09-28 15:43:09 UTC (rev 225)
@@ -15,6 +15,13 @@
<li><a href="cat_undistributable.html">undistributable HOWTOs</a>
</ul>
+<h2>More lists</h2>
+<ul>
+ <li><a href="all_licenses.html">Complete alphabetical list of all licenses</a>
+ <li><a href="all_howtos.html">Complete alphabetical list of all
+ howtos</a>
+</ul>
+
<h2>Other useful links</h2>
<ul>
<li><a href="http://en.tldp.org">LDP Homepage</a>
More information about the Pkg-doc-linux-devel
mailing list