constance

Scripts for generating (an earlier obsolete version of) my personal web site
git clone https://code.djc.id.au/git/constance/
commit 9787eb79b4064663dfa63327db276f5c12e31728
parent 3bd246676fa0b278ea9acd3943fa96846bdbeb56
Author: Dan Callaghan <djc@djc.id.au>
Date:   Sat,  7 Jun 2008 23:36:14 +1000

Windows line endings can foad

committer: Dan Callaghan <djc@djc.id.au>

--HG--
extra : convert_revision : 6f23b1755d1dba1dc02f5ac6dc52732ca0f4c47c

Diffstat:
Mtemplates/_entry.xml | 160++++++++++++++++++++++++++++++++++++++++----------------------------------------
Mtemplates/multiple.xml | 42+++++++++++++++++++++---------------------
Mtemplates/single.xml | 34+++++++++++++++++-----------------
3 files changed, 118 insertions(+), 118 deletions(-)
diff --git a/templates/_entry.xml b/templates/_entry.xml
@@ -1,80 +1,80 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1.dtd">
-<div xmlns="http://www.w3.org/1999/xhtml"
-     xmlns:py="http://genshi.edgewall.org/"
-	 py:strip="True"
-	 py:def="show_entry(entry, show_comments=True)">
-
-<div class="entry" py:if="'Reading' not in entry.categories">
-
-	<h3 class="entrytitle" id="post-${entry.id}"><a href="${BASE_URL}/${entry.id}" rel="bookmark">${entry.title}</a></h3>
-
-	<div class="entrymeta">
-		Posted ${entry.publication_date.strftime(str('%-1d %B %Y'))}
-		<py:if test="entry.categories">
-			in <a py:for="category in entry.categories" href="${BASE_URL}/+categories/${category}">${category}</a>
-		</py:if>
-		<py:if test="not show_comments and entry.has_comments()">
-			·
-			<a href="${BASE_URL}/${entry.id}#comments">
-				Comments
-				<py:if test="len(entry.comments()) > 0">(${len(entry.comments())})</py:if>
-			</a>
-		</py:if>
-	</div>
-  
-	<div class="entrybody">
-		${Markup(entry.body)}
-		<p py:if="entry.tags">
-			<img src="${BASE_URL}/static/images/tag_blue.png" alt="Tags:" />
-			<a py:for="tag in entry.tags" rel="tag" href="${BASE_URL}/+tags/${tag}">${tag}</a>
-		</p>
-	</div>
-
-</div>
-
-<span py:def="stars(rating)" py:strip="True">
-	<img src="${BASE_URL}/static/images/star.png" alt="[star]" py:for="_ in range(int(rating))" />
-	<img src="${BASE_URL}/static/images/halfstar.png" alt="[half-star]" py:if="rating > int(rating)" />
-</span>
-
-<div class="entry readinglog" py:if="'Reading' in entry.categories">
-	<h3 class="entrytitle">
-		<a py:strip="not entry.url" href="${entry.url}">${entry.title}</a>
-		<py:if test="entry.author">
-			by ${entry.author}
-		</py:if>
-	</h3>
-	<div class="entrymeta">
-		Posted ${entry.publication_date.strftime(str('%-1d %B %Y'))}
-		<py:if test="entry.categories">
-			in <a py:for="category in entry.categories" href="${BASE_URL}/+categories/${category}">${category}</a>
-		</py:if>
-		<py:if test="entry.rating">
-			· ${stars(entry.rating)}
-		</py:if>
-	</div>
-	<div class="entrybody"></div>
-</div>
-
-<div id="commentblock"
-	 py:if="show_comments and entry.has_comments()"
-	 py:with="comments = sorted(entry.comments(), key=lambda c: c.date)">
-	<h2 id="comments">${len(comments) == 1 and '1 comment' or '%d comments' % len(comments)} so far</h2>
-    <ol class="commentlist" id="commentlist">
-		<li py:for="n, comment in enumerate(comments)"
-			class="${(n % 2) and 'alt' or 'standard'}"
-			id="comment-${comment.id}">
-			<div class="commentname">
-				<a py:strip="not comment.author_url" href="${comment.author_url}">${comment.author_name()}</a>
-				on <a href="#comment-${comment.id}">${comment.date.strftime(str('%-1d %B %Y'))}</a>
-			</div>
-			<div class="commenttext">
-				<div class="commentp">
-					${Markup(comment.body)}
-				</div>
-			</div>
-		</li>
-	</ol>
-</div>
-
-</div>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1.dtd">
+<div xmlns="http://www.w3.org/1999/xhtml"
+     xmlns:py="http://genshi.edgewall.org/"
+	 py:strip="True"
+	 py:def="show_entry(entry, show_comments=True)">
+
+<div class="entry" py:if="'Reading' not in entry.categories">
+
+	<h3 class="entrytitle" id="post-${entry.id}"><a href="${BASE_URL}/${entry.id}" rel="bookmark">${entry.title}</a></h3>
+
+	<div class="entrymeta">
+		Posted ${entry.publication_date.strftime(str('%-1d %B %Y'))}
+		<py:if test="entry.categories">
+			in <a py:for="category in entry.categories" href="${BASE_URL}/+categories/${category}">${category}</a>
+		</py:if>
+		<py:if test="not show_comments and entry.has_comments()">
+			·
+			<a href="${BASE_URL}/${entry.id}#comments">
+				Comments
+				<py:if test="len(entry.comments()) > 0">(${len(entry.comments())})</py:if>
+			</a>
+		</py:if>
+	</div>
+  
+	<div class="entrybody">
+		${Markup(entry.body)}
+		<p py:if="entry.tags">
+			<img src="${BASE_URL}/static/images/tag_blue.png" alt="Tags:" />
+			<a py:for="tag in entry.tags" rel="tag" href="${BASE_URL}/+tags/${tag}">${tag}</a>
+		</p>
+	</div>
+
+</div>
+
+<span py:def="stars(rating)" py:strip="True">
+	<img src="${BASE_URL}/static/images/star.png" alt="[star]" py:for="_ in range(int(rating))" />
+	<img src="${BASE_URL}/static/images/halfstar.png" alt="[half-star]" py:if="rating > int(rating)" />
+</span>
+
+<div class="entry readinglog" py:if="'Reading' in entry.categories">
+	<h3 class="entrytitle">
+		<a py:strip="not entry.url" href="${entry.url}">${entry.title}</a>
+		<py:if test="entry.author">
+			by ${entry.author}
+		</py:if>
+	</h3>
+	<div class="entrymeta">
+		Posted ${entry.publication_date.strftime(str('%-1d %B %Y'))}
+		<py:if test="entry.categories">
+			in <a py:for="category in entry.categories" href="${BASE_URL}/+categories/${category}">${category}</a>
+		</py:if>
+		<py:if test="entry.rating">
+			· ${stars(entry.rating)}
+		</py:if>
+	</div>
+	<div class="entrybody"></div>
+</div>
+
+<div id="commentblock"
+	 py:if="show_comments and entry.has_comments()"
+	 py:with="comments = sorted(entry.comments(), key=lambda c: c.date)">
+	<h2 id="comments">${len(comments) == 1 and '1 comment' or '%d comments' % len(comments)} so far</h2>
+    <ol class="commentlist" id="commentlist">
+		<li py:for="n, comment in enumerate(comments)"
+			class="${(n % 2) and 'alt' or 'standard'}"
+			id="comment-${comment.id}">
+			<div class="commentname">
+				<a py:strip="not comment.author_url" href="${comment.author_url}">${comment.author_name()}</a>
+				on <a href="#comment-${comment.id}">${comment.date.strftime(str('%-1d %B %Y'))}</a>
+			</div>
+			<div class="commenttext">
+				<div class="commentp">
+					${Markup(comment.body)}
+				</div>
+			</div>
+		</li>
+	</ol>
+</div>
+
+</div>
diff --git a/templates/multiple.xml b/templates/multiple.xml
@@ -1,21 +1,21 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
-      xmlns:py="http://genshi.edgewall.org/"
-	  xmlns:xi="http://www.w3.org/2001/XInclude"
-	  lang="en-AU">
-<xi:include href="_commonwrapper.xml" />
-<xi:include href="_entry.xml" />
-
-<head>
-	<title py:if="title">${title}</title>
-</head>
-<body>
-
-<h2 class="archives" py:if="title">Archive for the ${title}</h2>
-
-<py:for each="entry in sorted(entries, key=lambda e: e.publication_date, reverse=True)[:20]">
-	${show_entry(entry, show_comments=False)}
-</py:for>
-
-</body>
-</html>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:py="http://genshi.edgewall.org/"
+	  xmlns:xi="http://www.w3.org/2001/XInclude"
+	  lang="en-AU">
+<xi:include href="_commonwrapper.xml" />
+<xi:include href="_entry.xml" />
+
+<head>
+	<title py:if="title">${title}</title>
+</head>
+<body>
+
+<h2 class="archives" py:if="title">Archive for the ${title}</h2>
+
+<py:for each="entry in sorted(entries, key=lambda e: e.publication_date, reverse=True)[:20]">
+	${show_entry(entry, show_comments=False)}
+</py:for>
+
+</body>
+</html>
diff --git a/templates/single.xml b/templates/single.xml
@@ -1,17 +1,17 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
-      xmlns:py="http://genshi.edgewall.org/"
-	  xmlns:xi="http://www.w3.org/2001/XInclude"
-	  lang="en-AU">
-<xi:include href="_commonwrapper.xml" />
-<xi:include href="_entry.xml" />
-
-<head>
-  <title>${entry.title}</title>
-</head>
-<body>
-
-${show_entry(entry, show_comments=True)}
-
-</body>
-</html>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:py="http://genshi.edgewall.org/"
+	  xmlns:xi="http://www.w3.org/2001/XInclude"
+	  lang="en-AU">
+<xi:include href="_commonwrapper.xml" />
+<xi:include href="_entry.xml" />
+
+<head>
+  <title>${entry.title}</title>
+</head>
+<body>
+
+${show_entry(entry, show_comments=True)}
+
+</body>
+</html>