Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

use www instead of html

  • Loading branch information...
commit 9e8ecb1fb54b15e4e8340bea58ae52099ccdfcac 1 parent b4784f7
leon authored
View
10 perlmongers/README
@@ -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
2  perlmongers/bin/build
@@ -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
7 perlmongers/bin/makelive
@@ -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
16 perlmongers/bin/xml
@@ -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,13 +54,13 @@ 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";
}
@@ -68,20 +68,20 @@ foreach my $name (keys %$xml) {
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}}) {
Please sign in to comment.
Something went wrong with that request. Please try again.