summaryrefslogtreecommitdiff
path: root/sandbox/mly/restblog/restblog.py
diff options
context:
space:
mode:
authorwiemann <wiemann@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2006-01-09 20:44:25 +0000
committerwiemann <wiemann@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2006-01-09 20:44:25 +0000
commitd77fdfef70e08114f57cbef5d91707df8717ea9f (patch)
tree49444e3486c0c333cb7b33dfa721296c08ee4ece /sandbox/mly/restblog/restblog.py
parent53cd16ca6ca5f638cbe5956988e88f9339e355cf (diff)
parent3993c4097756e9885bcfbd07cb1cc1e4e95e50e4 (diff)
downloaddocutils-0.4.tar.gz
Release 0.4: tagging released revisiondocutils-0.4
git-svn-id: http://svn.code.sf.net/p/docutils/code/tags/docutils-0.4@4268 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'sandbox/mly/restblog/restblog.py')
-rwxr-xr-xsandbox/mly/restblog/restblog.py32
1 files changed, 0 insertions, 32 deletions
diff --git a/sandbox/mly/restblog/restblog.py b/sandbox/mly/restblog/restblog.py
deleted file mode 100755
index 3c7862de5..000000000
--- a/sandbox/mly/restblog/restblog.py
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/usr/bin/python -tt
-
-# restblog.py
-#
-# Base functions for reStructuredBlog
-#
-# (C) Magnus Lyckå, Thinkware AB, 2003
-import mx.DateTime, locale, os
-locale.setlocale(locale.LC_ALL, 'C') # I want English month names etc
-from docutils.core import publish_string, default_description
-
-source_pattern = 'blog*.txt'
-timestamp_format = '%Y-%m-%d %H:%M'
-
-class Metadata:
- def __init__(self, fn):
- self.fn = fn
-
- def timestamp(self):
- return mx.DateTime.localtime(os.stat(self.fn)[-2])
-
- def subject(self):
- return file(self.fn).readline().strip()
-
- def targetname(self):
- return self.fn[:-3]+'html'
-
-def makepage(fn, text):
- #text = ('<html><head><title>%s</title><head>\n'
- # '<body>%s</body></html>')
- #file(fn+'.html', 'w').write(text % (title, body))
- file(fn+'.html', 'w').write(publish_string(text, writer_name='html'))