New rdate-plugin
seanh <[email protected]> Tue, 11 Aug 2009 23:29:22 +0100
| Newsgroups | gmane.comp.web.pyblosxom.devel |
|---|---|
| Message-ID | <[email protected]> |
http://github.com/seanh/PyBlosxom-rdate This may be buggy! I just finished it this second, but it's a pretty simple plugin and seems to be working on my blog. I use (my own reimplementation of) the rdate utility from the plugin registry. It backs up the mtimes of your entries as metadata lines inside the entry files themselves, and restores the mtimes of your entries from these metadata lines. It's a standalone utility not a pyblosxom plugin, pyblosxom simply keeps on using file mtimes as the dates of posts. This behaviour of altering mtimes got to be a menace though, it trips up all sorts of programs. If caching is enabled then pyblosxom uses the mtimes to determine whether an entry needs to be parsed again. Sync tools like rsync tend to use mtimes to determine whether a file needs to be transferred. My text editor thinks that a file has been modified externally if its mtime gets changed while I have it open in the editor, and it then refuses to save the file for me. And so on. So instead I wrote a pyblosxom plugin that reads these #published lines and uses them as the post dates instead of the mtimes. Now you don't need to run the rdate utility to reset all your mtimes, just add #published lines in your entry files and they will be used. I also did a complete rewrite of the original rdate script, I think the code is a lot better now and I made resetting file mtimes optional so that you can still use the script to add #published lines to those entries that lack them without editing the mtimes of the other entries. ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july