Permalink
Browse files

use www instead of html

  • Loading branch information...
1 parent b4784f7 commit 9e8ecb1fb54b15e4e8340bea58ae52099ccdfcac leon committed Jan 30, 2005
Showing with 21 additions and 14 deletions.
  1. +5 −5 perlmongers/README
  2. +1 −1 perlmongers/bin/build
  3. +7 −0 perlmongers/bin/makelive
  4. +8 −8 perlmongers/bin/xml
View
@@ -10,18 +10,18 @@ bin/
contains programs to build the site etc.
etc/
contains configuration files
-html/
- the output goes here
lib/
contains Template Toolkit templates
src/
contains the actual text of the site
+www/
+ the output goes here
-To build the site, run "bin/build" from this directory.
+To build the site, run "bin/build" and "bin/xml" from this directory.
What this does is it takes the source files from src/ applies any
-templates to them (from lib/), and writes the output to the html/
-directory. Now have a look at the HTML directory - it contains the
+templates to them (from lib/), and writes the output to the www/
+directory. Now have a look at the www directory - it contains the
site!
lib/layout is the template which is applied to every page.
View
@@ -24,7 +24,7 @@ my $tt_plain = Template->new({
});
my $source = 'src';
-my $destination = 'html';
+my $destination = 'www';
my $parms;
my $rule = File::Find::Rule->new;
View
@@ -0,0 +1,7 @@
+#!/usr/bin/perl -w
+use strict;
+
+system('rm pm.tgz');
+system('tar fzcv pm.tgz www/');
+system('scp pm.tgz leon@hfb.pm.org:');
+system('ssh leon@hfb.pm.org "cd /web/gocho.pm.org/80/htdocs/pm.org; tar fvzx ~/pm.tgz"');
View
@@ -22,7 +22,7 @@ my $tt = Template->new({
# Array containing all the group names order by continent
my %groups;
-mkdir "html/groups/graphics";
+mkdir "www/groups/graphics";
foreach my $name (keys %$xml) {
my $group = $xml->{$name};
@@ -54,34 +54,34 @@ foreach my $name (keys %$xml) {
map { $group->{location}->{$_} }
qw(city region state country continent);
- if (!-f "html/groups/graphics/$id.png"
+ if (!-f "www/groups/graphics/$id.png"
&& $group->{location}->{longitude}
&& $group->{location}->{latitude}) {
my $map = Image::WorldMap->new("titchy.png");
$map->add($group->{location}->{longitude}, $group->{location}->{latitude});
$map->draw("foo.png");
- system("pngtopnm foo.png | ppmquant 64 | pnmtopng -compression 9 > html/groups/graphics/$id.png");
+ system("pngtopnm foo.png | ppmquant 64 | pnmtopng -compression 9 > www/groups/graphics/$id.png");
$group->{image} = "graphics/$id.png";
}
my $continent = $group->{location}->{continent};
my $country = $group->{location}->{country};
push @{$groups{$continent}->{$country}}, $group;
- if (!-f "html/groups/$id.html") {
- $tt->process('src/groups/group.html', $group, "html/groups/$id.html")
+ if (!-f "www/groups/$id.html") {
+ $tt->process('src/groups/group.html', $group, "www/groups/$id.html")
|| die $tt->error();
}
}
-copy("./perl_mongers.xml", "html/groups/perl_mongers.xml");
-copy("./perl_mongers.dtd", "html/groups/perl_mongers.dtd");
+copy("./perl_mongers.xml", "www/groups/perl_mongers.xml");
+copy("./perl_mongers.dtd", "www/groups/perl_mongers.dtd");
#use YAML; die Dump(\%groups);
foreach my $continent (sort keys %groups) {
my $file = lc $continent;
$file =~ s/\W/_/g;
- $file = "html/groups/$file.html";
+ $file = "www/groups/$file.html";
warn "$continent -> $file\n";
my $groups;
foreach my $country (sort keys %{$groups{$continent}}) {

0 comments on commit 9e8ecb1

Please sign in to comment.