Skip to content

Commit cd2bc39

Browse files
author
Peter Hilton
committed
Rewrite local link file extensions
1 parent 8cee7cf commit cd2bc39

16 files changed

+1733
-77
lines changed

_scripts/scala/PhtmlImport.scala

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ if (!targetDirectory.isDirectory) error("Not a directory: " + TARGET_DIR)
2424

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

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

3739
val page = readPage(file)
3840

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

58+
// Metadata
5659
out.println("---")
5760
page.title.foreach((value) => out.println("title: " + value))
5861
page.description.foreach((value) => out.println("description: " + value))
@@ -61,8 +64,10 @@ for (file <- files) {
6164
out.println("---")
6265
out.println()
6366

67+
// Page content
6468
val pageFile = new File(SOURCE_DIR, page.path.get)
6569
if (pageFile.exists()) {
70+
println(" reading " + pageFile.getName)
6671
for (line <- Source.fromFile(pageFile).getLines) {
6772
line match {
6873
case Thumbnail(prefix, name, align, target, suffix) => {
@@ -71,6 +76,10 @@ for (file <- files) {
7176
out.print(suffix)
7277
out.println
7378
}
79+
case LocalLink(prefix, baseName, suffix) => {
80+
out.println(prefix + baseName + ".html" + suffix)
81+
println(" " + line)
82+
}
7483

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

132+
// HTML attribute
123133
case class Attr(name: String, value: Option[String]) {
124134
override def toString = {
125135
value.map(name + "='" + _ + "'").getOrElse("")

about_hh.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66

77
<h2>What Hilton Harbour is</h2>
88

9-
<p><img src='picture/illustration/ha.gif' width='150' height='74' alt='[Hilton Airlines]' style='float:right'>
10-
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>
9+
<p><img src='picture/illustration/ha.gif' width='150' height='74' alt='[Hilton Airlines]' title='Hilton Airlines' style='float:right'>
10+
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>
1111

12-
<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>
12+
<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>
1313

1414
<h2>Why Hilton Harbour exists</h2>
1515

16-
<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>
16+
<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>
1717

1818
<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>
1919

about_ph.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
<h2>Who I am</h2>
99

1010
<div style="float:right; margin-left:1em">
11-
<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>
12-
<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>
13-
<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>
14-
<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>
15-
<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>
11+
<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>
12+
<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>
13+
<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>
14+
<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>
15+
<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>
1616
</div>
1717

1818
<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>
@@ -34,10 +34,10 @@ <h2>Where I’ve been (the short version)</h2>
3434
<ul>
3535
<li>Working for Logica, which later became LogicaCMG, in Rotterdam (2000-2004).</li>
3636
<li>Eight months working at <a href="http://www.sb.com/">SmithKline Beecham</a> in Surrey (1999).</li>
37-
<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>
38-
<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>
39-
<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>
40-
<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>
37+
<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>
38+
<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>
39+
<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>
40+
<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>
4141
<li>Three years studying pure mathematics at the <a href="http://www.bris.ac.uk/">University Of Bristol</a> (1992-1994, 1995-1996).</li>
4242
<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>
4343
<li>Lots of Monday nights working at Avon Phototypesetting Ltd (1994).</li>

alert.html

Lines changed: 54 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -4,65 +4,60 @@
44
keywords: poem,poetry,robert hilton, Robert Hilton, Hilton, hilton
55
layout: hh
66
---
7-
8-
<!-- ======================================================================== -->
97

10-
<p>The wind screams down the cloud torn skies.
11-
<br>It blows a raging gale.
12-
<br>The hailstones make you close your eyes.
13-
<br>It's wisest not to sail,
14-
<br>But one boat dare remain out there.
15-
<br>Her crew don't think it hard.
16-
<br>The safety boat; her constant care
17-
<br>To keep a watchful guard.
18-
19-
<p>I've heard men say it can be dull,
20-
<br>But that's not really true.
21-
<br>The world of dolphin, tern and gull
22-
<br>Brings plenty work to do.
23-
<br>Though vigilance when gales are laid
24-
<br>May sound a piece of cake.
25-
<br>To stay sharp as a razor blade
26-
<br>Needs practice... no mistake.
27-
28-
<p>And day by day, whatever goes,
29-
<br>You keep your careful notes.
30-
<br>You practise with your radios
31-
<br>And exercise your boats.
32-
<br>Fast rescue boats need crews who will
33-
<br>Get launched with lightning speed,
34-
<br>For hypothermia can kill
35-
<br>In minutes... all take heed.
36-
37-
<p>For fire float, lifeboat, ambulance,
38-
<br>At once you're all of these.
39-
<br>You never must be caught with pants
40-
<br>Descending round your knees.
41-
<br>The rig crews need to know you're there,
42-
<br>And wide awake each second.
43-
<br>Next hour, next day, next week, next year,
44-
<br>You will be there when beckoned.
45-
46-
<p>And even when you rescue men.
47-
<br>They may be close to death.
48-
<br>Your crew and paramedics then
49-
<br>Can help them still draw breath.
50-
<br>You have accommodation fit
51-
<br>To see them through the storm,
52-
<br>And medicines and first aid kit
53-
<br>To keep them safe and warm.
54-
55-
<p>The men who so depend on you
56-
<br>May give it little thought,
57-
<br>Or some may think high praise your due,
58-
<br>According as they're taught.
59-
<br>So keep your training up to date,
60-
<br>Be proud of what you do,
61-
<br>Though some appreciate too late
62-
<br>The safety boat and crew.
63-
64-
<small><i><p align=right>Hornbeck Sentry, 7 March
65-
<br>&copy;1997 C. R. Hilton</i></small>
8+
<p>The wind screams down the cloud torn skies.
9+
<br>It blows a raging gale.
10+
<br>The hailstones make you close your eyes.
11+
<br>It's wisest not to sail,
12+
<br>But one boat dare remain out there.
13+
<br>Her crew don't think it hard.
14+
<br>The safety boat; her constant care
15+
<br>To keep a watchful guard.
16+
17+
<p>I've heard men say it can be dull,
18+
<br>But that's not really true.
19+
<br>The world of dolphin, tern and gull
20+
<br>Brings plenty work to do.
21+
<br>Though vigilance when gales are laid
22+
<br>May sound a piece of cake.
23+
<br>To stay sharp as a razor blade
24+
<br>Needs practice... no mistake.
25+
26+
<p>And day by day, whatever goes,
27+
<br>You keep your careful notes.
28+
<br>You practise with your radios
29+
<br>And exercise your boats.
30+
<br>Fast rescue boats need crews who will
31+
<br>Get launched with lightning speed,
32+
<br>For hypothermia can kill
33+
<br>In minutes... all take heed.
34+
35+
<p>For fire float, lifeboat, ambulance,
36+
<br>At once you're all of these.
37+
<br>You never must be caught with pants
38+
<br>Descending round your knees.
39+
<br>The rig crews need to know you're there,
40+
<br>And wide awake each second.
41+
<br>Next hour, next day, next week, next year,
42+
<br>You will be there when beckoned.
43+
44+
<p>And even when you rescue men.
45+
<br>They may be close to death.
46+
<br>Your crew and paramedics then
47+
<br>Can help them still draw breath.
48+
<br>You have accommodation fit
49+
<br>To see them through the storm,
50+
<br>And medicines and first aid kit
51+
<br>To keep them safe and warm.
6652

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

62+
<small><i><p align=right>Hornbeck Sentry, 7 March
63+
<br>&copy;1997 C. R. Hilton</i></small>

amsterdam.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
layout: hh
66
---
77

8-
98
<p>This is your guide to where to have lunch in Amsterdam.</p>
109

1110
<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>

and_then_theres_you.html

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
title: And then there’s you
3+
description: A poem by C. Robert Hilton.
4+
keywords: poem,poetry,sea poetry, robert hilton, Robert Hilton, Hilton, hilton
5+
layout: hh
6+
---
7+
8+
<p>As a child he was mothered,
9+
<br>Played, learned persistence,
10+
<br>Misbehaved, was the curse
11+
<br>And blessing of his Ma’s existence.</p>
12+
13+
<p>Was taught good morals
14+
<br>To let alone the theivable,
15+
<br>And given a religion
16+
<br>To believe the unbelievable.</p>
17+
18+
<p>Went to school – or not,
19+
<br>Was his parents’ pride and anxiety.
20+
<br>Puberty fact, girls theory,
21+
<br>The frustration of propriety.</p>
22+
23+
<p>Married and had children,
24+
<br>In that order perhaps.
25+
<br>Worked to keep his family
26+
<br>As well as other chaps.</p>
27+
28+
<p>Picture him if you can
29+
<br>Before your inner eyes.
30+
<br>So like yourself this man,
31+
<br>That it could be a surprise</p>
32+
33+
<p>To find he’s a Lapp or a Maori,
34+
<br>An Inuit or a Jew,
35+
<br>Anybody from Arab to Zulu,
36+
<br>And then there’s you.</p>
37+
38+
<p align="right"><small><i>&copy;2008 C. R. Hilton</i></small>

arrival.html

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
title: Arrival
3+
description: A poem by C. Robert Hilton.
4+
keywords: poem,poetry,sea poetry, robert hilton, Robert Hilton, Hilton, hilton
5+
layout: hh
6+
---
7+
8+
<p>Sometimes I walk along the wall
9+
<br>Instead of on the ground.
10+
<br>This change of viewpoint gives a small
11+
<br>Pleasure as I have found.</p>
12+
13+
<p>Wall walking, which for any child
14+
<br>Is part of normal play,
15+
<br>Fifty years on, though less than wild,
16+
<br>May still provoke dismay</p>
17+
18+
<p>In pale grey men who fear a thrill.
19+
<br>Today as years ago
20+
<br>Wall walking’s fun. I do it still.
21+
<br>I wanted you to know!</p>
22+
23+
<p align="right"><small><i>&copy;2008 C. R. Hilton</i></small>

backlinks.html

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
title: Backlinks
3+
description: Web pages that link to Hilton Harbour
4+
layout: hh
5+
---
6+
7+
<ul>
8+
9+
<li><a href="http://www.amazingspecs.co.uk/where.html">Amazing Spectacles</a></li>
10+
11+
<li><a href="http://www.camcity.co.uk/directory/FOOD_AND_DRINK/RESTAURANTS/">Cambridge Search Engine</a></li>
12+
13+
<li><a href="http://www.ebi.ac.uk/~virginie/cambridge.html">Cambridge info for new arrivals</a></li>
14+
15+
<li><a href="http://www.statslab.cam.ac.uk/~chj20/index.html">Chris Jackson</a></li>
16+
17+
<li><a href="http://www.freepint.com/issues/060901.htm?FreePint_Session=b143d773ef60609551bbe05bf7be2296">Free Pint</a></li>
18+
19+
<li><a href="http://www.onera.fr/fusion2000/tips.html">Fusion 2000</a></li>
20+
21+
<li><a href="http://www.ii.com/thanks/">Infinite Ink</a></li>
22+
23+
<li><a href="http://www.slb.no/html/interrail01/mapomatic/austria_vienna.htm">InterRail EuroMapper</a></li>
24+
25+
<li><a href="http://www.lclark.edu/~klaus/fr_230/fr_230.htm">Klaus Engelhardt</a></li>
26+
27+
<li><a href="http://www.montecarlostriponline.com/european_entertainment.html">Monte Carlo Striponline.com</a></li>
28+
29+
<li><a href="http://www.mtholyoke.edu/courses/nvaget/eurst/europe/hungary/index.htm">Mount Holyoke College</a></li>
30+
31+
<li><a href="http://www.st-edmunds.cam.ac.uk/~cr/links.html">St Edmund's College CR</a></li>
32+
33+
<li><a href="http://www.ubooty.co.uk/html/cambridge_links.html">UBooty.co.uk</a></li>
34+
35+
<li><a href="http://www.ursasoft.com/">Ursa Software Ltd</a></li>
36+
37+
<li><a href="http://www.windowscrash.com/">WindowsCrash.com</a></li>
38+
39+
<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>
40+
41+
<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>
42+
43+
<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>
44+
45+
<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>
46+
47+
</ul>

0 commit comments

Comments
 (0)