Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Added index.tt and first draft of buildsite
- Loading branch information
Showing
2 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/perl | ||
|
||
use strict; | ||
use warnings; | ||
use 5.010; | ||
|
||
use Template; | ||
|
||
open my $cd_fh, '<', 'cds.txt' or die $!; | ||
my $cds; | ||
|
||
my @cols = qw[code year title]; | ||
while (<$cd_fh>) { | ||
chomp; | ||
my %cd; | ||
@cd{@cols} = split /\t/; | ||
push @$cds, \%cd; | ||
} | ||
|
||
my $tt = Template->new; | ||
$tt->process('index.tt', { cds => $cds }, 'index.html') | ||
or die $tt->error; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<html> | ||
<head> | ||
<title>Cooking Vinyl Compilation CDs</title> | ||
<link rel="stylesheet" href="style.css" type="text/css" /> | ||
</head> | ||
<body> | ||
<h1>Cooking Vinyl Compilation CDs</h1> | ||
<p>A list of compilations released by | ||
<a href="http://www.cookingvinyl.com/">Cooking Vinyl</a> records.</p> | ||
<table> | ||
[% FOREACH cd IN cds -%] | ||
<tr> | ||
[% IF cd.title; | ||
code = cd.code.split(' ') -%] | ||
<td><a href="grillcd[% code.2 %].html">[% cd.code IF cd.code %]</a></td> | ||
[% ELSE -%] | ||
<td>[% cd.code IF cd.code -%]</td> | ||
[% END -%] | ||
<td>[% cd.year IF cd.year %]</td> | ||
<td>[% cd.title IF cd.title %]</td> | ||
</tr> | ||
[% END -%] | ||
</table> | ||
<address> | ||
Site created by <a href="mailto:dave@dave.org.uk">Dave Cross</a> | ||
</address> | ||
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> | ||
</script> | ||
|
||
<script type="text/javascript"> | ||
_uacct = "UA-56332-2"; | ||
urchinTracker(); | ||
</script> | ||
</body> | ||
</html> |