Re: New rdate-plugin
seanh <[email protected]> Wed, 12 Aug 2009 02:40:31 +0100
| Newsgroups | gmane.comp.web.pyblosxom.devel |
|---|---|
| Message-ID | <20090812014031.GA22425@UbuntuVM> |
Posted too soon I think. I've now moved it to here: http://github.com/seanh/PyBlosxom-metadate/ Hopefully I'll be happy with this version. I combined the two files into one that runs as a pyblosxom plugin and interprets the #published values or can be run from the command-line to add #published values to entries that lack them. You can also add the #published values yourself ofcourse. I removed the option to reset mtimes as I don't see why you'd need that anymore. Since I'm changing the design now I thought it was a bit disingenuous to call it a 'new version' of David Zejda's rdate utility, so I renamed it metadate and credited David for the original idea. On Tue, Aug 11, 2009 at 11:29:22PM +0100, seanh wrote: > 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