Added project templates.

Added -u and -q to build.pl to enable "Update only" and "Quiet".

svn path=/trunk/; revision=3021
This commit is contained in:
jonas 2003-01-25 10:53:14 +00:00
parent c8c1c0eb9e
commit 1b23d038cf
12 changed files with 93 additions and 13 deletions

View File

@ -50,6 +50,10 @@ TD.menu {
vertical-align: top; vertical-align: top;
} }
TH.projects {
width: 20%;
}
h3.menu { h3.menu {
color: #ffffff; color: #ffffff;
border-bottom: solid white; border-bottom: solid white;

10
coposys/project.en.xml Normal file
View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="iso-8859-1" ?>
<projectset>
<project type="other">
<title>FSF Geographical Positioning System</title>
<description>
</description>
<link>/coposys/coposys.html</link>
</project>
</projectset>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="iso-8859-1" ?>
<projectset>
<project type="technical">
<title>Der Büergerturm</title>
<description>
</description>
<link>/de/buergerturm/buergerturm.html</link>
</project>
</projectset>

10
education/project.en.xml Normal file
View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="iso-8859-1" ?>
<projectset>
<project type="awareness">
<title>Education</title>
<description>
</description>
<link>/education/education.html</link>
</project>
</projectset>

10
fr/eucd/project.en.xml Normal file
View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="iso-8859-1" ?>
<projectset>
<project type="legal">
<title>EUCD - Copyright extensions that harm</title>
<description>
</description>
<link>/law/eucd/eucd.html</link>
</project>
</projectset>

10
law/siae/project.en.xml Normal file
View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="iso-8859-1" ?>
<projectset>
<project type="legal">
<title>The Italian law 248/2000</title>
<description>
</description>
<link>/law/siae/siae.html</link>
</project>
</projectset>

View File

@ -4,7 +4,6 @@
<project type="technical"> <project type="technical">
<title>A GNU/Linux Audio distribution</title> <title>A GNU/Linux Audio distribution</title>
<description> <description>
something
</description> </description>
<link>/projects/agnula/agnula.html</link> <link>/projects/agnula/agnula.html</link>
</project> </project>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="iso-8859-1" ?>
<projectset>
<project type="awareness">
<title>Classification of Free Software as a World Cultural Heritage</title>
<description>
</description>
<link>/projects/mankind/mankind.html</link>
</project>
</projectset>

View File

@ -5,8 +5,7 @@
<title>Free Software Foundation Europe</title> <title>Free Software Foundation Europe</title>
</head> </head>
<body> <body>
A list of projects.
</body> </body>
</html> </html>

View File

@ -19,7 +19,10 @@
<xsl:apply-templates /> <xsl:apply-templates />
<table> <table>
<tr> <tr>
<th>Technical</th><th>Legal</th><th>Sociological</th><th>Other</th> <th class="projects">Technical</th>
<th class="projects">Legal</th>
<th class="projects">Sociological</th>
<th class="projects">Other</th>
</tr> </tr>
<tr> <tr>
<td> <td>

10
swpat/project.en.xml Normal file
View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="iso-8859-1" ?>
<projectset>
<project type="legal">
<title>Software Patents in Europe</title>
<description>
</description>
<link>/swpat/swpat.html</link>
</project>
</projectset>

View File

@ -60,9 +60,12 @@ our %languages = (
# Parse the command line options. We need two; where to put the finished # Parse the command line options. We need two; where to put the finished
# pages and what to use as base for the input. # pages and what to use as base for the input.
# #
getopts('o:i:d', \%opts); getopts('o:i:duq', \%opts);
unless ($opts{o} && $opts{i}) { unless ($opts{o} && $opts{i}) {
print STDERR "Usage: $0 [-d] -o <output directory> -i <input directory>\n"; print STDERR "Usage: $0 [-q] [-u] [-d] -o <output directory> -i <input directory>\n";
print STDERR " -q Quiet\n";
print STDERR " -u Update only\n";
print STDERR " -d Print some debug information\n";
exit 1; exit 1;
} }
@ -79,8 +82,8 @@ my @dirs = File::Find::Rule->directory()
->in($opts{i}); ->in($opts{i});
while (my ($path, undef) = each %countries) { while (my ($path, undef) = each %countries) {
print STDERR "Reseting path for $path\n"; print STDERR "Reseting path for $path\n" unless $opts{q};
rmtree($opts{o}.'/'.$path); rmtree($opts{o}.'/'.$path) unless $opts{u};
my @paths = map { $opts{o}."/$path/".$_ } grep(!/^\.\.?$/, @dirs); my @paths = map { $opts{o}."/$path/".$_ } grep(!/^\.\.?$/, @dirs);
foreach (@paths) { foreach (@paths) {
print "Creating $_\n" if $opts{d}; print "Creating $_\n" if $opts{d};
@ -141,7 +144,7 @@ foreach (grep(/\.xhtml$/, @files)) {
# document/@language The language that this documents is in # document/@language The language that this documents is in
# #
while (my ($file, $langs) = each %bases) { while (my ($file, $langs) = each %bases) {
print STDERR "Building $file.. "; print STDERR "Building $file.. " unless $opts{q};
# #
# Create XML and XSLT parser contexts. Also create the root note for the # Create XML and XSLT parser contexts. Also create the root note for the
@ -182,7 +185,7 @@ while (my ($file, $langs) = each %bases) {
# Transform it, once for every focus! # Transform it, once for every focus!
# #
while (my ($dir, undef) = each %countries) { while (my ($dir, undef) = each %countries) {
print STDERR "$dir "; print STDERR "$dir " unless $opts{q};
# #
# And once for every language! # And once for every language!
@ -218,6 +221,8 @@ while (my ($file, $langs) = each %bases) {
} }
} }
next if ( (stat("$opts{o}/$dir/$file.$lang.html"))[9] >
(stat($source))[9] && $opts{u} && ! -f "$opts{i}/$file.xsl" );
# #
# Here begins automated magic for those pages which we need to # Here begins automated magic for those pages which we need to
@ -389,7 +394,7 @@ while (my ($file, $langs) = each %bases) {
$stylesheet->output_file($results, "$opts{o}/$dir/$file.$lang.html"); $stylesheet->output_file($results, "$opts{o}/$dir/$file.$lang.html");
} }
} }
print STDERR "\n"; print STDERR "\n" unless $opts{q};
} }
# #
@ -397,10 +402,10 @@ while (my ($file, $langs) = each %bases) {
# the final location, for each focus. These should be links instead to # the final location, for each focus. These should be links instead to
# prevent us from vasting disk space. # prevent us from vasting disk space.
# #
print STDERR "Copying misc files\n"; print STDERR "Copying misc files\n" unless $opts{q};
foreach (grep(!/\.xhtml$/, @files)) { foreach (grep(!/\.xhtml$/, @files)) {
while (my ($dir, undef) = each %countries) { while (my ($dir, undef) = each %countries) {
copy("$opts{i}/$_", "$opts{o}/$dir/$_") if -f "$opts{i}/$_"; link("$opts{i}/$_", "$opts{o}/$dir/$_") if -f "$opts{i}/$_";
} }
} }