Skip to content

Commit

Permalink
Rewrite local link file extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Hilton committed Sep 9, 2012
1 parent 8cee7cf commit cd2bc39
Show file tree
Hide file tree
Showing 16 changed files with 1,733 additions and 77 deletions.
14 changes: 12 additions & 2 deletions _scripts/scala/PhtmlImport.scala
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ if (!targetDirectory.isDirectory) error("Not a directory: " + TARGET_DIR)

// Regular expressions for matching page content lines
val Thumbnail = """(.*?)<\?php Thumbnail \('([^']+)', '([^']*)', '([^']*)'\); \?>(.*)""".r
val LocalLink = """(.*?href=['"])([a-z0-9_]+?)\.phtml(.*)""".r


// Get list of source files from the directory or command line arguments
val files =
Expand All @@ -36,9 +38,9 @@ for (file <- files) {

val page = readPage(file)

// Output: don’t overwrite existing files.
// Output: if files weren’t specified explicitly, don’t overwrite existing files.
val outputFile = new File(targetDirectory, file.getName.replace(".phtml", ".html"))
if (outputFile.exists()) {
if (args.isEmpty && outputFile.exists()) {
println("Skipping " + file.getName.replace(".phtml", ".html"))
}
else {
Expand All @@ -53,6 +55,7 @@ for (file <- files) {
println("Create " + outputFile)
val out = new java.io.PrintWriter(outputFile)

// Metadata
out.println("---")
page.title.foreach((value) => out.println("title: " + value))
page.description.foreach((value) => out.println("description: " + value))
Expand All @@ -61,8 +64,10 @@ for (file <- files) {
out.println("---")
out.println()

// Page content
val pageFile = new File(SOURCE_DIR, page.path.get)
if (pageFile.exists()) {
println(" reading " + pageFile.getName)
for (line <- Source.fromFile(pageFile).getLines) {
line match {
case Thumbnail(prefix, name, align, target, suffix) => {
Expand All @@ -71,6 +76,10 @@ for (file <- files) {
out.print(suffix)
out.println
}
case LocalLink(prefix, baseName, suffix) => {
out.println(prefix + baseName + ".html" + suffix)
println(" " + line)
}

case _ => out.println(line)
}
Expand Down Expand Up @@ -120,6 +129,7 @@ def readPicture(file: File): Picture = {
Picture(data.get("big_version"), data.get("thumbnail"), data.get("width"), data.get("height"), data.get("caption"))
}

// HTML attribute
case class Attr(name: String, value: Option[String]) {
override def toString = {
value.map(name + "='" + _ + "'").getOrElse("")
Expand Down
8 changes: 4 additions & 4 deletions about_hh.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@

<h2>What Hilton Harbour is</h2>

<p><img src='picture/illustration/ha.gif' width='150' height='74' alt='[Hilton Airlines]' style='float:right'>
Hilton Harbour is an <strong>eclectic collection</strong>, written by myself and people I know. My aim is to publish more content than either graphics which say almost nothing, let alone a thousand words, or just a list of <a href="links.phtml" title="my favourite web sites">links</a>, which would be nothing more than <a href="meta_content.phtml" title="prose and cons: meta-content in the media">meta-content</a>. This way, I feel better about expressing strong opinions about other poeple's web sites.</p>
<p><img src='picture/illustration/ha.gif' width='150' height='74' alt='[Hilton Airlines]' title='Hilton Airlines' style='float:right'>
Hilton Harbour is an <strong>eclectic collection</strong>, written by myself and people I know. My aim is to publish more content than either graphics which say almost nothing, let alone a thousand words, or just a list of <a href="links.html" title="my favourite web sites">links</a>, which would be nothing more than <a href="meta_content.html" title="prose and cons: meta-content in the media">meta-content</a>. This way, I feel better about expressing strong opinions about other poeple's web sites.</p>

<p>Hilton Harbour, to some degree, is a personal experiment in designing and implementing a web site. This is captured by my <a href="web_site_architecture.phtml">Web Site Architecture</a> guidelines and the <a href="web_page_design_principles.phtml">Web Page Design Principles</a>.</p>
<p>Hilton Harbour, to some degree, is a personal experiment in designing and implementing a web site. This is captured by my <a href="web_site_architecture.html">Web Site Architecture</a> guidelines and the <a href="web_page_design_principles.html">Web Page Design Principles</a>.</p>

<h2>Why Hilton Harbour exists</h2>

<p>Obviously, I'm hoping that each of these pages will one-day provide someone with some work-avoidance or <strong>something better to do than watch television</strong>. Perhaps less obviously, I hope that for each page in Hilton Harbour at least one person in the world will learn something new or think about a question that they have never asked themselves. Or just waste some time in <a href="european_cafe_watch.phtml">a cafe somewhere</a>.</p>
<p>Obviously, I'm hoping that each of these pages will one-day provide someone with some work-avoidance or <strong>something better to do than watch television</strong>. Perhaps less obviously, I hope that for each page in Hilton Harbour at least one person in the world will learn something new or think about a question that they have never asked themselves. Or just waste some time in <a href="european_cafe_watch.html">a cafe somewhere</a>.</p>

<p>I am also interested in <a href="http://www.theobvious.com/archive/1998/04/20.html">content syndication</a> and the idea of big sites <a href="http://www.theobvious.com/archive/1997/05/05.html"> mining content from independent content providers</a>.</p>

Expand Down
18 changes: 9 additions & 9 deletions about_ph.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
<h2>Who I am</h2>

<div style="float:right; margin-left:1em">
<p><a href='picture/photo/netherlands/eclipse_group.jpeg'><img src='picture/photo/netherlands/eclipse_group_s.jpeg' width='198' height='125' alt='Marc Smits, Szilvia Biro, Russell, Peter Hilton, Alex Zeffertt, Carl Dolby, Marion Smits, Fleur Van Rootselaar and Jean-Didier Garaud stopping off in the Netherlands on the way home from the 1999 total eclipse'></a></p>
<p><a href='picture/photo/england/weybridge_garden.jpeg'><img src='picture/photo/england/weybridge_garden_s.jpeg' width='198' height='125' alt='Marion Smits, Alex Zeffertt, Carl Dolby and Pascale Garaud in my back garden, in Weybridge, England'></a></p>
<p><a href='picture/photo/luxembourg/betzdorf_station.jpeg'><img src='picture/photo/luxembourg/betzdorf_station_s.jpeg' width='198' height='130' alt='the railway station at Betzdorf, Luxembourg'></a></p>
<p><a href='picture/photo/england/peter_anusha_alison.jpeg'><img src='picture/photo/england/peter_anusha_alison_s.jpeg' width='198' height='125' alt='Peter Hilton, Anusha Edwards and Alison Noble in Bristol, 1994'></a></p>
<p><a href='picture/photo/england/peter_aged_five.jpeg'><img src='picture/photo/england/peter_aged_five_s.jpeg' width='125' height='198' alt='Peter, aged five, at South Lancing Primary School'></a></p>
<p><a href='picture/photo/netherlands/eclipse_group.jpeg'><img src='picture/photo/netherlands/eclipse_group_s.jpeg' width='198' height='125' alt='Marc Smits, Szilvia Biro, Russell, Peter Hilton, Alex Zeffertt, Carl Dolby, Marion Smits, Fleur Van Rootselaar and Jean-Didier Garaud stopping off in the Netherlands on the way home from the 1999 total eclipse' title='Marc Smits, Szilvia Biro, Russell, Peter Hilton, Alex Zeffertt, Carl Dolby, Marion Smits, Fleur Van Rootselaar and Jean-Didier Garaud stopping off in the Netherlands on the way home from the 1999 total eclipse'></a></p>
<p><a href='picture/photo/england/weybridge_garden.jpeg'><img src='picture/photo/england/weybridge_garden_s.jpeg' width='198' height='125' alt='Marion Smits, Alex Zeffertt, Carl Dolby and Pascale Garaud in my back garden, in Weybridge, England' title='Marion Smits, Alex Zeffertt, Carl Dolby and Pascale Garaud in my back garden, in Weybridge, England'></a></p>
<p><a href='picture/photo/luxembourg/betzdorf_station.jpeg'><img src='picture/photo/luxembourg/betzdorf_station_s.jpeg' width='198' height='130' alt='the railway station at Betzdorf, Luxembourg' title='the railway station at Betzdorf, Luxembourg'></a></p>
<p><a href='picture/photo/england/peter_anusha_alison.jpeg'><img src='picture/photo/england/peter_anusha_alison_s.jpeg' width='198' height='125' alt='Peter Hilton, Anusha Edwards and Alison Noble in Bristol, 1994' title='Peter Hilton, Anusha Edwards and Alison Noble in Bristol, 1994'></a></p>
<p><a href='picture/photo/england/peter_aged_five.jpeg'><img src='picture/photo/england/peter_aged_five_s.jpeg' width='125' height='198' alt='Peter, aged five, at South Lancing Primary School' title='Peter, aged five, at South Lancing Primary School'></a></p>
</div>

<p>I was a serial expat, because it’s easier to fit in when you're supposed not to, but I started living and working in country number six in 2000 and didn’t leave. Not yet, anyway.</p>
Expand All @@ -34,10 +34,10 @@ <h2>Where I’ve been (the short version)</h2>
<ul>
<li>Working for Logica, which later became LogicaCMG, in Rotterdam (2000-2004).</li>
<li>Eight months working at <a href="http://www.sb.com/">SmithKline Beecham</a> in Surrey (1999).</li>
<li>Three and a half weeks working at the <a href="http://www.odccp.org/" title="UN Office for Drug Control & Crime Prevention ">ODCCP</a> in <a href="out_in_vienna.phtml" title="Out In Vienna">Vienna</a> (1999).</li>
<li>Seven months working at <a href="http://www.astra.de/" title="Societe Europeen des Satellites - Astra">SES-Astra</a> in <a href="international_assignment.phtml" title="Diary Of An International Assignment">Luxembourg</a> (1998-1999).</li>
<li>One year working at <a href="http://www.csc.co.uk/">CSC Computer Sciences Ltd</a> in <a href="cambridge_cafes.phtml" title="1998 Cambridge Coffee And Cake Guide">Cambridge</a> (1997-1998).</li>
<li>Seven months working at <a href="http://www.eutelsat.org/" title="European Telecommunications Satellite Organisation">EUTELSAT</a> in <a href="pppp.phtml" title="Peter’s Peachy Paris Page">Paris</a> (1996-1997).</li>
<li>Three and a half weeks working at the <a href="http://www.odccp.org/" title="UN Office for Drug Control & Crime Prevention ">ODCCP</a> in <a href="out_in_vienna.html" title="Out In Vienna">Vienna</a> (1999).</li>
<li>Seven months working at <a href="http://www.astra.de/" title="Societe Europeen des Satellites - Astra">SES-Astra</a> in <a href="international_assignment.html" title="Diary Of An International Assignment">Luxembourg</a> (1998-1999).</li>
<li>One year working at <a href="http://www.csc.co.uk/">CSC Computer Sciences Ltd</a> in <a href="cambridge_cafes.html" title="1998 Cambridge Coffee And Cake Guide">Cambridge</a> (1997-1998).</li>
<li>Seven months working at <a href="http://www.eutelsat.org/" title="European Telecommunications Satellite Organisation">EUTELSAT</a> in <a href="pppp.html" title="Peter’s Peachy Paris Page">Paris</a> (1996-1997).</li>
<li>Three years studying pure mathematics at the <a href="http://www.bris.ac.uk/">University Of Bristol</a> (1992-1994, 1995-1996).</li>
<li> Ten months as an Erasmus student at l’Universit&eacute; de Bordeaux I and studying French stuff at the Maison du DEFLE (1994-1995).</li>
<li>Lots of Monday nights working at Avon Phototypesetting Ltd (1994).</li>
Expand Down
113 changes: 54 additions & 59 deletions alert.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,65 +4,60 @@
keywords: poem,poetry,robert hilton, Robert Hilton, Hilton, hilton
layout: hh
---

<!-- ======================================================================== -->

<p>The wind screams down the cloud torn skies.
<br>It blows a raging gale.
<br>The hailstones make you close your eyes.
<br>It's wisest not to sail,
<br>But one boat dare remain out there.
<br>Her crew don't think it hard.
<br>The safety boat; her constant care
<br>To keep a watchful guard.

<p>I've heard men say it can be dull,
<br>But that's not really true.
<br>The world of dolphin, tern and gull
<br>Brings plenty work to do.
<br>Though vigilance when gales are laid
<br>May sound a piece of cake.
<br>To stay sharp as a razor blade
<br>Needs practice... no mistake.

<p>And day by day, whatever goes,
<br>You keep your careful notes.
<br>You practise with your radios
<br>And exercise your boats.
<br>Fast rescue boats need crews who will
<br>Get launched with lightning speed,
<br>For hypothermia can kill
<br>In minutes... all take heed.

<p>For fire float, lifeboat, ambulance,
<br>At once you're all of these.
<br>You never must be caught with pants
<br>Descending round your knees.
<br>The rig crews need to know you're there,
<br>And wide awake each second.
<br>Next hour, next day, next week, next year,
<br>You will be there when beckoned.

<p>And even when you rescue men.
<br>They may be close to death.
<br>Your crew and paramedics then
<br>Can help them still draw breath.
<br>You have accommodation fit
<br>To see them through the storm,
<br>And medicines and first aid kit
<br>To keep them safe and warm.

<p>The men who so depend on you
<br>May give it little thought,
<br>Or some may think high praise your due,
<br>According as they're taught.
<br>So keep your training up to date,
<br>Be proud of what you do,
<br>Though some appreciate too late
<br>The safety boat and crew.

<small><i><p align=right>Hornbeck Sentry, 7 March
<br>&copy;1997 C. R. Hilton</i></small>
<p>The wind screams down the cloud torn skies.
<br>It blows a raging gale.
<br>The hailstones make you close your eyes.
<br>It's wisest not to sail,
<br>But one boat dare remain out there.
<br>Her crew don't think it hard.
<br>The safety boat; her constant care
<br>To keep a watchful guard.

<p>I've heard men say it can be dull,
<br>But that's not really true.
<br>The world of dolphin, tern and gull
<br>Brings plenty work to do.
<br>Though vigilance when gales are laid
<br>May sound a piece of cake.
<br>To stay sharp as a razor blade
<br>Needs practice... no mistake.

<p>And day by day, whatever goes,
<br>You keep your careful notes.
<br>You practise with your radios
<br>And exercise your boats.
<br>Fast rescue boats need crews who will
<br>Get launched with lightning speed,
<br>For hypothermia can kill
<br>In minutes... all take heed.

<p>For fire float, lifeboat, ambulance,
<br>At once you're all of these.
<br>You never must be caught with pants
<br>Descending round your knees.
<br>The rig crews need to know you're there,
<br>And wide awake each second.
<br>Next hour, next day, next week, next year,
<br>You will be there when beckoned.

<p>And even when you rescue men.
<br>They may be close to death.
<br>Your crew and paramedics then
<br>Can help them still draw breath.
<br>You have accommodation fit
<br>To see them through the storm,
<br>And medicines and first aid kit
<br>To keep them safe and warm.

<!-- ======================================================================== -->
<p>The men who so depend on you
<br>May give it little thought,
<br>Or some may think high praise your due,
<br>According as they're taught.
<br>So keep your training up to date,
<br>Be proud of what you do,
<br>Though some appreciate too late
<br>The safety boat and crew.

<small><i><p align=right>Hornbeck Sentry, 7 March
<br>&copy;1997 C. R. Hilton</i></small>
1 change: 0 additions & 1 deletion amsterdam.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
layout: hh
---


<p>This is your guide to where to have lunch in Amsterdam.</p>

<p>Amsterdam certainly has more than a few people who are completely <em>out to lunch</em>: it really is the Los Angeles of Western Europe, but with less sun. However, Amsterdam has a saner element hidden between the cracks, and they're <em>having lunch</em>.</p>
Expand Down
38 changes: 38 additions & 0 deletions and_then_theres_you.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
title: And then there’s you
description: A poem by C. Robert Hilton.
keywords: poem,poetry,sea poetry, robert hilton, Robert Hilton, Hilton, hilton
layout: hh
---

<p>As a child he was mothered,
<br>Played, learned persistence,
<br>Misbehaved, was the curse
<br>And blessing of his Ma’s existence.</p>

<p>Was taught good morals
<br>To let alone the theivable,
<br>And given a religion
<br>To believe the unbelievable.</p>

<p>Went to school – or not,
<br>Was his parents’ pride and anxiety.
<br>Puberty fact, girls theory,
<br>The frustration of propriety.</p>

<p>Married and had children,
<br>In that order perhaps.
<br>Worked to keep his family
<br>As well as other chaps.</p>

<p>Picture him if you can
<br>Before your inner eyes.
<br>So like yourself this man,
<br>That it could be a surprise</p>

<p>To find he’s a Lapp or a Maori,
<br>An Inuit or a Jew,
<br>Anybody from Arab to Zulu,
<br>And then there’s you.</p>

<p align="right"><small><i>&copy;2008 C. R. Hilton</i></small>
23 changes: 23 additions & 0 deletions arrival.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: Arrival
description: A poem by C. Robert Hilton.
keywords: poem,poetry,sea poetry, robert hilton, Robert Hilton, Hilton, hilton
layout: hh
---

<p>Sometimes I walk along the wall
<br>Instead of on the ground.
<br>This change of viewpoint gives a small
<br>Pleasure as I have found.</p>

<p>Wall walking, which for any child
<br>Is part of normal play,
<br>Fifty years on, though less than wild,
<br>May still provoke dismay</p>

<p>In pale grey men who fear a thrill.
<br>Today as years ago
<br>Wall walking’s fun. I do it still.
<br>I wanted you to know!</p>

<p align="right"><small><i>&copy;2008 C. R. Hilton</i></small>
47 changes: 47 additions & 0 deletions backlinks.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
title: Backlinks
description: Web pages that link to Hilton Harbour
layout: hh
---

<ul>

<li><a href="http://www.amazingspecs.co.uk/where.html">Amazing Spectacles</a></li>

<li><a href="http://www.camcity.co.uk/directory/FOOD_AND_DRINK/RESTAURANTS/">Cambridge Search Engine</a></li>

<li><a href="http://www.ebi.ac.uk/~virginie/cambridge.html">Cambridge info for new arrivals</a></li>

<li><a href="http://www.statslab.cam.ac.uk/~chj20/index.html">Chris Jackson</a></li>

<li><a href="http://www.freepint.com/issues/060901.htm?FreePint_Session=b143d773ef60609551bbe05bf7be2296">Free Pint</a></li>

<li><a href="http://www.onera.fr/fusion2000/tips.html">Fusion 2000</a></li>

<li><a href="http://www.ii.com/thanks/">Infinite Ink</a></li>

<li><a href="http://www.slb.no/html/interrail01/mapomatic/austria_vienna.htm">InterRail EuroMapper</a></li>

<li><a href="http://www.lclark.edu/~klaus/fr_230/fr_230.htm">Klaus Engelhardt</a></li>

<li><a href="http://www.montecarlostriponline.com/european_entertainment.html">Monte Carlo Striponline.com</a></li>

<li><a href="http://www.mtholyoke.edu/courses/nvaget/eurst/europe/hungary/index.htm">Mount Holyoke College</a></li>

<li><a href="http://www.st-edmunds.cam.ac.uk/~cr/links.html">St Edmund's College CR</a></li>

<li><a href="http://www.ubooty.co.uk/html/cambridge_links.html">UBooty.co.uk</a></li>

<li><a href="http://www.ursasoft.com/">Ursa Software Ltd</a></li>

<li><a href="http://www.windowscrash.com/">WindowsCrash.com</a></li>

<li><a href="http://dir.yahoo.com/Regional/Countries/Hungary/Counties_and_Regions/Budapest/Travel_and_Transportation/Travelogues/">Yahoo! Directory: Budapest &gt; Travelogues</a></li>

<li><a href="http://dir.yahoo.com/regional/countries/united_kingdom/england/counties_and_regions/cambridgeshire/cities_and_towns/cambridge/entertainment_and_arts/restaurants/">Yahoo! Directory: Cambridge &gt; Restaurants</a></li>

<li><a href="http://dir.yahoo.com/Regional/Countries/France/Regions/Ile_de_France/Departments/Paris/Travel_and_Transportation/Travelogues/">Yahoo! Directory: Paris &gt; Travelogues</a></li>

<li><a href="http://dir.yahoo.com/Regional/Countries/Austria/States/Vienna__Wien_/Travel_and_Transportation/Travelogues/">Yahoo! Directory: Vienna (Wien) &gt; Travelogues</a></li>

</ul>
Loading

0 comments on commit cd2bc39

Please sign in to comment.