[Pkg-doc-linux-devel] r213 - in trunk: . website

Frank Lichtenheld djpig at costa.debian.org
Sun Apr 9 19:39:11 UTC 2006


Author: djpig
Date: 2006-04-09 19:39:10 +0000 (Sun, 09 Apr 2006)
New Revision: 213

Added:
   trunk/website/
   trunk/website/create_index_pages.pl
   trunk/website/cron.sh
   trunk/website/index.html
Log:
Create a little, somewhat usefull website for the project


Added: trunk/website/create_index_pages.pl
===================================================================
--- trunk/website/create_index_pages.pl	2006-04-09 00:52:57 UTC (rev 212)
+++ trunk/website/create_index_pages.pl	2006-04-09 19:39:10 UTC (rev 213)
@@ -0,0 +1,65 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use CGI qw( :standard );
+
+my $dir = $ARGV[0];
+my $html_dir = $ARGV[1];
+
+opendir DIR, $dir or die "couldn't open $dir: $!";
+
+while (my $category = readdir DIR) {
+    next unless -d "$dir/$category";
+    next if $category =~ /^\./;
+
+    print "Found Category Directory $category\n";
+    opendir CAT, "$dir/$category" or die "couldn't open $dir/$category: $!";
+
+    my @licenses = ();
+    my @licensetexts = ();
+    my %howtos;
+    my $howtos;
+    while (my $license = readdir CAT) {
+	next unless -f "$dir/$category/$license";
+	next if $license =~ /^\./;
+
+	push @licenses, $license;
+
+	print "$#licenses\tFound License File $license\n";
+	open LICENSE, "$dir/$category/$license"
+	    or die "couldn't open $dir/$category/$license: $!";
+	while (<LICENSE>) {
+	    last unless /^HOWTO:\s+(\S+)/;
+	    print "\t\tFound HOWTO $1\n";
+	    push @{$howtos{$license}}, $1;
+	    $howtos++;
+	}
+	my $text = '';
+	while (<LICENSE>) {
+	    $text .= $_;
+	}
+	push @licensetexts, $text || 'N/A';
+    }
+
+    print "Create File $html_dir/cat_$category.html\n";
+    open CATFILE, '>', "$html_dir/cat_$category.html"
+	or die "couldn't open $html_dir/cat_$category.html: $!";
+    print CATFILE start_html("$category HOWTO licenses");
+    print CATFILE h1("$category HOWTO licenses");
+    print CATFILE p( "Follow the links to get a list of HOWTOs currently distributed under the license. There are currently $howtos HOWTOs in this category." );
+    print CATFILE ul(li( [ map { a({-href=>"lic_$_.html"},$_)." (".scalar(@{$howtos{$_}}).")"} sort @licenses ] ));
+    print CATFILE end_html();
+
+    foreach (0 .. $#licenses) {
+	print "\tCreate File $html_dir/lic_$licenses[$_].html\n";
+	open LICFILE, '>', "$html_dir/lic_$licenses[$_].html"
+	    or die "couldn't open $html_dir/lic_$licenses[$_].html: $!";
+	print LICFILE start_html($licenses[$_]);
+	print LICFILE h1($licenses[$_]);
+	print LICFILE ul( li( [ sort @{$howtos{$licenses[$_]}} ] ) );
+	print LICFILE pre( $licensetexts[$_] );
+	print LICFILE end_html();
+    }
+} 


Property changes on: trunk/website/create_index_pages.pl
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/website/cron.sh
===================================================================
--- trunk/website/cron.sh	2006-04-09 00:52:57 UTC (rev 212)
+++ trunk/website/cron.sh	2006-04-09 19:39:10 UTC (rev 213)
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+set -e
+
+cd ..
+svn update
+cp -a *.html ../htdocs
+./website/create_index_pages.pl doc-linux/debian/copyrights ../htdocs


Property changes on: trunk/website/cron.sh
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/website/index.html
===================================================================
--- trunk/website/index.html	2006-04-09 00:52:57 UTC (rev 212)
+++ trunk/website/index.html	2006-04-09 19:39:10 UTC (rev 213)
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+   "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
+<title>Debian packaging of the LDP-Howtos</title>
+</head>
+<body>
+<h1>Debian packaging of the LDP-Howtos</h1>
+
+<h2>List of HOWTOs, by license</h2>
+<ul>
+<li><a href="cat_free.html">free HOWTOs</a>
+<li><a href="cat_non-free.html">non-free HOWTOs</a>
+<li><a href="cat_undistributable.html">undistributable HOWTOs</a>
+</ul>
+
+<h2>Other useful links</h2>
+<ul>
+<li><a href="http://en.tldp.org">LDP Homepage</a>
+<li><a href="http://alioth.debian.org/projects/pkg-doc-linux/">Alioth Project Page</a>
+<li><a href="http://svn.debian.org/wsvn/pkg-doc-linux/">Project SVN Repository</a>
+<li><a href="http://bugs.debian.org/src:doc-linux">doc-linux Bugs</a>, 
+<a href="http://bugs.debian.org/src:doc-linux-nonfre">doc-linux-nonfree Bugs</a>
+</ul>
+<hr>
+<address>In case of problems please contact the pkg-doc-linux maintainers at
+<tt>pkg-doc-linux-devel -#- lists.alioth.debian.org</tt></address>
+<p>
+    <a href="http://validator.w3.org/check?uri=referer"><img
+        src="http://www.w3.org/Icons/valid-html401"
+        alt="Valid HTML 4.01 Strict" height="31" width="88"></a>
+</p>
+</body>
+</html>




More information about the Pkg-doc-linux-devel mailing list