Re: hardcoding mtimes for stories in their metadata section

Dieter Plaetinck <dieter-7FYLOmueu/[email protected]> Mon, 1 Nov 2010 15:11:52 +0100
Newsgroups gmane.comp.web.pyblosxom.user
Message-ID <[email protected]>
On Mon, 1 Nov 2010 09:56:02 -0400
Tim Gray <tgray-kfNaf1zyJtt8UrSeD/[email protected]> wrote:

> On Nov 01, 2010 at 02:23 PM +0100, Dieter Plaetinck wrote:
> > Aha, i thought I found such a thing at some point, but couldn't
> > find it back.
> > Where is this plugin?  I'll try it out, not too worried about the
> > performance hit right now, but if it becomes noticeable I can
> > always add caching.
> 
> Yeah it's on my huge list of things to do: add caching.  I'm using
> this on a site with about 450 posts right now though and don't notice
> too big of a performance hit.
> 
> Here's a link to it:
> <http://dl.dropbox.com/u/100367/pymetatime.py>

Thanks, this is actually another plugin then the one I was looking for.
I remember seeing a plugin like this somewhere but it had a comment
somewhere noting that "this is not very efficient, we need to read the
file in this step and pyblosxom will read the file itself as well, but
that's how it works now, so..." or something like that

Anyway I'll try out your plugin.
Notice that both the description for cb_prepare as well as the big
comment block on top of your file imply that they reset/ignore mtime
first, and then update using the info from the metadata.  This is not
correct, from looking at the code it seems that the pubdate can
override the mtime, but the mtime is not discarded if there is no
pubdate.

Dieter

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev