Re: pyarchives_enhanced.py updated package
Klaus Trainer <klaus.trainer-S0/[email protected]> Sun, 21 Sep 2008 18:32:07 +0200
| Newsgroups | gmane.comp.web.pyblosxom.devel |
|---|---|
| Message-ID | <[email protected]> |
Thanks to Jörn a bug in the new pyarchives.py plugin could be fixed. I've attached both a new tarball of the new plugin package (now correctly renamed from pyarchives_enhanced to pyarchives) and the patch that I've applied. Klaus ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Pyblosxom-devel mailing list Pyblosxom-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/pyblosxom-devel
pyarchives.py.diff
(text/x-diff, 1.5 KB)
--- pyarchives.py.old 2008-09-19 23:42:04.000000000 +0200
+++ pyarchives.py 2008-09-21 18:14:42.000000000 +0200
@@ -46,7 +46,7 @@
py['archive_template_month'] = '<div class="archiveMonth"><a href="%(base_url)s/%(Y)s/%(m)s">%(B)s %(Y)s</a> (%(c)s)</div>'
-py['archive_template_post'] = '<div class="archivePost"><a href="%(base_url)s/%(post)s">%(title)s</a></div>'
+py['archive_template_post'] = '<div class="archivePost"><a href="%(base_url)s/%(post)s.%(default_flavour)s">%(title)s</a></div>'
py['archives_finish'] = '</li></ul>'
@@ -228,7 +228,7 @@
month_template = (config.get('archive_template_month',
'<div class="archiveMonth"><a href="%(base_url)s/%(Y)s/%(m)s">%(B)s %(Y)s</a> (%(c)s)</div>'))
post_template = (config.get('archive_template_post',
- '<div class="archivePost"><a href="%(base_url)s/%(post)s">%(title)s</a></div>'))
+ '<div class="archivePost"><a href="%(base_url)s/%(post)s.%(default_flavour)s">%(title)s</a></div>'))
for mem in archiveList:
timetuple = tools.filestat(self._request, mem)
@@ -260,7 +260,8 @@
post_archives = month_entry.archives
text = open(mem).readline()
title = re.match(".+", text).group()
- post = os.path.basename(mem)
+ post, ext = os.path.splitext(mem[len(root):])
+ post = post.lstrip('/')
fulldict.update({ 'title' : title, 'post' : post})
post_archives[timedict['d'] + timedict['H'] + timedict['M'] + timedict['S']] = post_template % fulldict
pyarchives.tar.gz
(application/x-gzip, 5.5 KB) - not displayed