Skip to content

Commit

Permalink
Add photo pages and photo index
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Hilton committed Sep 27, 2012
1 parent 1c643b1 commit c7a6ef4
Show file tree
Hide file tree
Showing 197 changed files with 1,664 additions and 1 deletion.
47 changes: 47 additions & 0 deletions _layouts/photo.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<!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>{{ page.caption }} - HH photos</TITLE>
<link rel="contents" href="../contents.html">
<link rel="top" href="../">
<link rel="index" href="../titles.html">
<link rel="author" href="../about_ph.html"/>
<link rel="stylesheet" type="text/css" href="../style/hh_photos.css">
<script type="text/javascript">

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-3676019-6']);
_gaq.push(['_trackPageview']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();

</script>
</head>

<body>

<h1 style="text-align:center; font-size:120%">{{ page.caption }}</h1>

<p style="text-align:center">
<img src="../picture/{{ page.path }}" alt="{{ page.caption }}" />
</p>

<p class="footer">
Hilton Harbour:
<a href="../index.html" title="Hilton Harbour main page">home</a> |
<a href="../new.html" title="what's newest on Hilton Harbour, and the site history">what's new</a> |
<a href="../contents.html" title="Hilton Harbour - table of contents">contents</a> |
<a href="../titles.html" title="an alphabetical index of every page on Hilton Harbour">index</a> |
<a href="../about_hh.html" title="about Hilton Harbour">about</a> |
<a href="../about_ph.html#where" title="Peter Hilton's home page">contact</a> |
</p>

{% include footer.html %}

</body>
</html>
68 changes: 68 additions & 0 deletions _scripts/scala/ImportPhoto.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
/**
* Create GitHub pages files for HH Madrid pages.
*/

import io.Source
import java.io.{PrintWriter, File}

val SOURCE_DIR = "/Users/pedro/Dropbox/hh/picture/data"
val TARGET_DIR = "/Users/pedro/Documents/code/hilton/hilton.github.com/photo/_posts"

// Extract metadata from a set of PHP variables.
def readData(file: File): Map[String, String] = {
if (file.exists()) {
val Assignment = """\s*\$(\w+)\s*=\s*["']?([^"']+)["']?;\s*""".r
var data: Map[String, String] = Map()

for (line <- Source.fromFile(file).getLines) {
line match {
case Assignment(name, value) => data = data + (name -> value)
case _ => {}
}
}
data
}
else {
error("File not found: " + file.getName)
Map()
}
}

def write(out: PrintWriter, data: Option[String]) {
if (data.isEmpty) error("missing data")
println(" " + data.get)
out.println(data.get)
}

for (file <- new File(SOURCE_DIR).listFiles if file.getName().endsWith(".data")) {

println(file.getName)
val data = readData(file)

val path = data.get("big_version") match {
case Some(value) => Some("path: %s" format value)
case None => data.get("thumbnail").map(value => "path: %s" format value)
}

val thumbnail = data.get("big_version") match {
case Some(value) => data.get("thumbnail").map(value => "thumbnail: %s" format value)
case None => None
}

val width = data.get("width").map(value => "width: %s" format value)
val height = data.get("height").map(value => "height: %s" format value)
val caption = data.get("caption").map(value => "caption: \"%s\"" format value)

// Generate
val outputFile = new File(TARGET_DIR, "2000-01-01-" + file.getName.replace(".data", ".html"))
val out = new java.io.PrintWriter(outputFile)
out.println("---")
write(out, path)
if (thumbnail.isDefined) write(out, thumbnail)
if (width.isDefined) write(out, width)
if (height.isDefined) write(out, height)
write(out, caption)
out.println("layout: photo")
out.println("---")
out.close()
}
1 change: 0 additions & 1 deletion _todo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ _includes/footer.html
file modification
current year
Photo pages
sitemap.xml
8 changes: 8 additions & 0 deletions photo/_posts/2000-01-01-alex_and_jessica.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
path: photo/england/alex_and_jessica.jpeg
thumbnail: photo/england/alex_and_jessica_s.jpeg
width: 125
height: 198
caption: "Alex and Jessica acting up"
layout: photo
---
8 changes: 8 additions & 0 deletions photo/_posts/2000-01-01-algonquin-camera.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
path: photo/canada/algonquin-camera.jpeg
thumbnail: photo/canada/algonquin-camera-l.jpeg
width: 198
height: 125
caption: "Algonquin Provincial Park, Canada: Marion getting better shots than this one"
layout: photo
---
8 changes: 8 additions & 0 deletions photo/_posts/2000-01-01-algonquin-camp.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
path: photo/canada/algonquin-campsite.jpeg
thumbnail: photo/canada/algonquin-campsite-l.jpeg
width: 198
height: 125
caption: "Algonquin Provincial Park, Canada: our camp site for the Above &amp; Beyond Adventures trip"
layout: photo
---
8 changes: 8 additions & 0 deletions photo/_posts/2000-01-01-algonquin-campfire-day.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
path: photo/canada/algonquin-campfire-day.jpeg
thumbnail: photo/canada/algonquin-campfire-day-p.jpeg
width: 125
height: 198
caption: "Algonquin Provincial Park, Canada: sitting by the camp fire in the afternoon"
layout: photo
---
8 changes: 8 additions & 0 deletions photo/_posts/2000-01-01-algonquin-campfire-night.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
path: photo/canada/algonquin-campfire-night.jpeg
thumbnail: photo/canada/algonquin-campfire-night-p.jpeg
width: 125
height: 198
caption: "Algonquin Provincial Park, Canada: sitting by the camp fire in the evening"
layout: photo
---
8 changes: 8 additions & 0 deletions photo/_posts/2000-01-01-algonquin-canoe.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
path: photo/canada/algonquin-canoe.jpeg
thumbnail: photo/canada/algonquin-canoe-l.jpeg
width: 198
height: 125
caption: "Algonquin Provincial Park, Canada: &quot;Yes Marion, all the way to the other side&quot;"
layout: photo
---
8 changes: 8 additions & 0 deletions photo/_posts/2000-01-01-algonquin-fleur.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
path: photo/canada/algonquin-fleur.jpeg
thumbnail: photo/canada/algonquin-fleur-p.jpeg
width: 125
height: 198
caption: "Algonquin Provincial Park, Canada: Fleur puts our wet stuff to dry in the sun after the rain"
layout: photo
---
8 changes: 8 additions & 0 deletions photo/_posts/2000-01-01-algonquin-moose.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
path: photo/canada/algonquin-moose.jpeg
thumbnail: photo/canada/algonquin-moose-l.jpeg
width: 198
height: 125
caption: "Algonquin Provincial Park, Canada: Ray, Emily and Fleur find a moose"
layout: photo
---
8 changes: 8 additions & 0 deletions photo/_posts/2000-01-01-algonquin-ray.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
path: photo/canada/algonquin-ray.jpeg
thumbnail: photo/canada/algonquin-ray-l.jpeg
width: 198
height: 125
caption: "Algonquin Provincial Park, Canada: Ray Desjardins has a rare quiet moment"
layout: photo
---
8 changes: 8 additions & 0 deletions photo/_posts/2000-01-01-algonquin-start.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
path: photo/canada/algonquin-start.jpeg
thumbnail: photo/canada/algonquin-start-l.jpeg
width: 198
height: 125
caption: "The water taxi leaves Marion, Emily, Ray and Fleur, lots of bags and two canoes in Algonquin Provincial Park, Canada"
layout: photo
---
8 changes: 8 additions & 0 deletions photo/_posts/2000-01-01-algonquin-tree.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
path: photo/canada/algonquin-tree.jpeg
thumbnail: photo/canada/algonquin-tree-p.jpeg
width: 125
height: 198
caption: "Algonquin Provincial Park, Canada: a really big tree - one of the old pines"
layout: photo
---
8 changes: 8 additions & 0 deletions photo/_posts/2000-01-01-algonquin-treetops.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
path: photo/canada/algonquin-treetops.jpeg
thumbnail: photo/canada/algonquin-treetops-l.jpeg
width: 198
height: 125
caption: "Algonquin Provincial Park, Canada: tree tops - the view from the ground at our camp site"
layout: photo
---
8 changes: 8 additions & 0 deletions photo/_posts/2000-01-01-amsterdam_dam_crowd.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
path: photo/netherlands/amsterdam_dam_crowd.jpeg
thumbnail: photo/netherlands/amsterdam_dam_crowd_s.jpeg
width: 125
height: 198
caption: "Amsterdam: the crowd at the millennium celebrations"
layout: photo
---
8 changes: 8 additions & 0 deletions photo/_posts/2000-01-01-amsterdam_dam_fireworks.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
path: photo/netherlands/amsterdam_dam_fireworks.jpeg
thumbnail: photo/netherlands/amsterdam_dam_fireworks_s.jpeg
width: 198
height: 125
caption: "Amsterdam: fireworks at the millennium celebrations"
layout: photo
---
8 changes: 8 additions & 0 deletions photo/_posts/2000-01-01-amsterdam_dam_stage.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
path: photo/netherlands/amsterdam_dam_stage.jpeg
thumbnail: photo/netherlands/amsterdam_dam_stage_s.jpeg
width: 198
height: 125
caption: "Amsterdam: the stage at the millennium celebrations"
layout: photo
---
8 changes: 8 additions & 0 deletions photo/_posts/2000-01-01-amsterdam_shutters.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
path: photo/netherlands/amsterdam_shutters.jpeg
thumbnail: photo/netherlands/amsterdam_shutters_s.jpeg
width: 125
height: 198
caption: "Amsterdam: shutters on the front of a house"
layout: photo
---
8 changes: 8 additions & 0 deletions photo/_posts/2000-01-01-amsterdam_statue.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
path: photo/netherlands/amsterdam_statue.jpeg
thumbnail: photo/netherlands/amsterdam_statue_s.jpeg
width: 198
height: 125
caption: "Amsterdam: a statue near the maritime museum"
layout: photo
---
8 changes: 8 additions & 0 deletions photo/_posts/2000-01-01-amsterdam_wtc_construction.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
path: photo/netherlands/zuid_wtc_construction.jpg
thumbnail: photo/netherlands/zuid_wtc_construction_s.jpg
width: 198
height: 125
caption: "Construction at the World Trade Center south of Amsterdam, the Netherlands"
layout: photo
---
8 changes: 8 additions & 0 deletions photo/_posts/2000-01-01-antwerp_hilton_l.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
path: photo/belgium/antwerp_hilton_l.jpeg
thumbnail: photo/belgium/antwerp_hilton_ls.jpeg
width: 198
height: 117
caption: "Antwerp: the Antwerp Hilton - no connection to Hilton Harbour whatsoever"
layout: photo
---
8 changes: 8 additions & 0 deletions photo/_posts/2000-01-01-antwerp_hilton_p.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
path: photo/belgium/antwerp_hilton_p.jpeg
thumbnail: photo/belgium/antwerp_hilton_ps.jpeg
width: 125
height: 198
caption: "Antwerp: the Antwerp Hilton - no connection to Hilton Harbour whatsoever"
layout: photo
---
8 changes: 8 additions & 0 deletions photo/_posts/2000-01-01-antwerp_statue.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
path: photo/belgium/antwerp_statue.jpeg
thumbnail: photo/belgium/antwerp_statue_s.jpeg
width: 125
height: 198
caption: "Antwerp: one of the more unusual statues at the toll house by the river"
layout: photo
---
8 changes: 8 additions & 0 deletions photo/_posts/2000-01-01-antwerp_statue_people.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
path: photo/belgium/antwerp_statue_people.jpeg
thumbnail: photo/belgium/antwerp_statue_people_s.jpeg
width: 125
height: 198
caption: "Antwerp: they thought it was a game so they joined in - Marion, Mukund and Chris"
layout: photo
---
7 changes: 7 additions & 0 deletions photo/_posts/2000-01-01-aubeterre.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
path: photo/france/aubeterre.jpeg
width: 358
height: 200
caption: "five cold people in Aubeterre"
layout: photo
---
7 changes: 7 additions & 0 deletions photo/_posts/2000-01-01-avenue_de_la_liberte.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
path: photo/luxembourg/avenue_de_la_liberte.jpeg
width: 244
height: 184
caption: "Av&eacute;nue de la Libert&eacute;, Luxembourg"
layout: photo
---
8 changes: 8 additions & 0 deletions photo/_posts/2000-01-01-ball_games_sign.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
path: photo/luxembourg/ball_games_sign.jpeg
thumbnail: photo/luxembourg/ball_games_sign_s.jpeg
width: 125
height: 198
caption: "my favourite road sign: ball games allowed, in Luxembourg"
layout: photo
---
7 changes: 7 additions & 0 deletions photo/_posts/2000-01-01-bear_sign.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
path: photo/luxembourg/bear_sign.gif
width: 124
height: 164
caption: "a sign somewhere in Luxembourg"
layout: photo
---
8 changes: 8 additions & 0 deletions photo/_posts/2000-01-01-beer_and_snow.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
path: photo/luxembourg/beer_and_snow.jpeg
thumbnail: photo/luxembourg/beer_and_snow_s.jpeg
width: 198
height: 115
caption: "Judith, her car, Takeshi and our beers"
layout: photo
---
8 changes: 8 additions & 0 deletions photo/_posts/2000-01-01-berlin_tacheles.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
path: photo/germany/berlin_tacheles.jpeg
thumbnail: photo/germany/berlin_tacheles_s.jpeg
width: 169
height: 125
caption: "the Tacheles captures the grimmer side of Berlin’s Oranienburgerstrasse, where all the best cafes are"
layout: photo
---
8 changes: 8 additions & 0 deletions photo/_posts/2000-01-01-betzdorf_station.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
path: photo/luxembourg/betzdorf_station.jpeg
thumbnail: photo/luxembourg/betzdorf_station_s.jpeg
width: 198
height: 130
caption: "the railway station at Betzdorf, Luxembourg"
layout: photo
---
8 changes: 8 additions & 0 deletions photo/_posts/2000-01-01-big_red_bridge_l.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
path: photo/luxembourg/big_red_bridge_l.jpeg
thumbnail: photo/luxembourg/big_red_bridge_ls.jpeg
width: 198
height: 125
caption: "Luxembourg’s big red bridge, also known as the Pont Grand-Duchesse Charlotte"
layout: photo
---
8 changes: 8 additions & 0 deletions photo/_posts/2000-01-01-big_red_bridge_p.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
path: photo/luxembourg/big_red_bridge_p.jpeg
thumbnail: photo/luxembourg/big_red_bridge_ps.jpeg
width: 198
height: 552
caption: "Luxembourg’s big red bridge, also known as the Pont Grand-Duchesse Charlotte"
layout: photo
---
Loading

0 comments on commit c7a6ef4

Please sign in to comment.