|
From: will kahn-g. <wi...@bl...> - 2010-11-01 12:41:46
|
w3cdate adds a variable to the story plugin. I don't know offhand if that's needed anymore--I think PyBlosxom adds it on its own now. That's definitely not what you're looking for. pyfilenamemtime is probably the closest. The advantage of putting the mtime in the filename is that it can be picked up from os.listdir rather than forcing PyBlosxom to open, read, and parse every entry on your blog for the metadata. If you did something like pyfilenamemtime but instead store the mtime in the metadata, I encourage you to add some caching so that PyBlosxom doesn't have to open, read, and parse every entry in your blog to assemble all the files and mtimes to sort and display in a blog timeline. I think something along the lines of what I do in tags would work. /will On 11/01/2010 07:13 AM, Dieter Plaetinck wrote: > Hi all, > is it possible to hardcode the mtime for a story in its metadata > section? > I.e. something like: > > $ cat entries/post.txt > Title of the post > # mtime 2010-10-30 12:00:00 > hello, (..) > > > I think these plugins are not appropriate for me: > - "wrapper scripts" that change the mtime back to what > it was before editing (not very robust if you work on multiple systems) > - plugins who cache the mtime (I want to dictate what the mtime must > be, which is more robust) > - pyfilenamemtime, the plugin who stores the mtime as part of the > filename is pretty close, but makes filenames messy, and I don't want > to rename the file in my vcs just to change the date > - the w3cdate plugin is also interesting, it seems to be close to what I > want, but it creates a new variable instead of updating the mtime. > What's the point of that? > > I think I will write a fork of the pyfilenamemtime plugin which uses > the metadata section instead of the filename. > Or am I missing something? > > 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 > _______________________________________________ > pyblosxom-users mailing list > pyb...@li... > https://lists.sourceforge.net/lists/listinfo/pyblosxom-users > |