entriesdir = os.path.join(pwd, "entries")
commentsdir = os.path.join(pwd, "comments")
-templatesdir = os.path.join(pwd, "templates")
staticsdir = os.path.join(pwd, "static")
monthnames = {"01": "January",
+++ /dev/null
-$def with (date, entry, comments)
-<!DOCTYPE HTML>
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
-<title>Shortlog - a log of everyday things</title>
-<link rel="stylesheet" type="text/css" href="/shortlog/static/style.css">
-<link rel="alternate" type="application/atom+xml" href="/shortlog/feed">
-</head>
-<body>
-<h1>Shortlog - a log of everyday things</h1>
-<h3><a href="/shortlog/">Home</a></h3>
-<div>
-<h3><a href="/shortlog/$date">$date</a></h3>
- $:entry
-</div>
-<div id="comments">
-$if len(comments) > 0:
- <hr><h3>Comments:</h3>
-$for c in comments:
- <div class="comment">
- <p><span style="float: right;"><img src="$c[5]" alt="avatar from Gravatar"></span>
- $if c[2]:
- <p><a href="$c[2]">$c[0]</a> | $c[4]</p>
- $else:
- <p>$c[0] | $c[4]</p>
- $for paragraph in c[3]:
- $:paragraph
- </div>
- <hr>
-</div>
-<div id="writecomment">
-<h3>Write a comment:</h3>
-<form action="/shortlog/$date" method="post" id="commentform">
- <p><input name="name" type="text" size="30" aria-required="true" />Name</p>
- <p><input name="email" type="text" size="30" aria-required="true" />Email (required, but won't be posted)</p>
- <p><input name="website" type="text" size="30" aria-required="false" />Website (optional)</p>
- <p><input name="bottest" type="text" size="30" aria-required="true" />Antispam: enter a four digit number</p>
- <p><textarea name="comment" cols="45" rows="8" aria-required="true"></textarea></p>
- <p><input name="wantsreply" type="checkbox" value="No" />Don't email me updates to comments</p>
- <input name="submit" type="submit" id="submit" value="Post Comment" />
-</form>
-</div>
-</body>
-</html>
+++ /dev/null
-$def with (timestamp, entries)
-<?xml version="1.0" encoding="utf-8"?>
-<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
- <title>Shortlog</title>
- <subtitle>A log of everyday things</subtitle>
- <link href="http://zarvox.org/shortlog/feed" rel="self"></link>
- <link href="http://zarvox.org/shortlog/" rel="alternate"></link>
- <id>http://zarvox.org/shortlog/</id>
- <updated>$timestamp</updated>
- <author>
- <name>Drew Fisher</name>
- <email>zarvox@zarvox.org</email>
- </author>
-$for entry in entries:
- <entry>
- <title>$entry["date"]</title>
- <link href="http://zarvox.org/shortlog/$entry['date']" rel="alternate"></link>
- <id>http://zarvox.org/shortlog/$entry['date']</id>
- <updated>$entry["timestamp"]</updated>
- <summary type="html">$entry["content"]</summary>
- </entry>
-</feed>
+++ /dev/null
-$def with (entries, notes="")
-$# entries is a list of tuples as follows:
-$# (date of entry,
-$# entry,
-$# comment count)
-<!DOCTYPE HTML>
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
-<title>Shortlog - a log of everyday things</title>
-<link rel="stylesheet" type="text/css" href="/shortlog/static/style.css">
-<link rel="alternate" type="application/atom+xml" href="/shortlog/feed">
-</head>
-<body>
-<h1>Shortlog - a log of everyday things</h1>
-<h3>View the past: <a href="/shortlog/week">Week</a> <a href="/shortlog/month">Month</a> <a href="/shortlog/year">Year</a></h3>
-<h4><a href="/shortlog/feed">Atom Feed</a></h4>
-$notes
-$for i in xrange(len(entries)):
- <div>
- <h3><a href="/shortlog/$entries[i][0]">$entries[i][0]</a> | <a href="/shortlog/$entries[i][0]#comments">$entries[i][2] comments</a></h3>
- $:entries[i][1]
- </div>
-</body>
-</html>
+++ /dev/null
-$def with (date)
-<!DOCTYPE HTML>
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
-<title>Shortlog - a log of everyday things</title>
-</head>
-<body>
-<h1>Shortlog - a log of everyday things</h1>
-<h3><a href="/shortlog/">Home</a></h3>
-<p>There's no entry for $date. Perhaps you reached this page by mistake?</p>
-</body>
-</html>