Adding new file dependencies to runStaticRenderer?
Nick Moffitt <[email protected]>
| Newsgroups | gmane.comp.web.pyblosxom.devel |
|---|---|
| Message-ID | <[email protected]> |
I use pyblosxom.cgi --static --incremental out of cron to generate my site at http://zork.net/motd/. It is a *great* system, and I love being able to use a static file for my rss feed. When nothing has changed, apache cheerfully throws a 304 response, and no extra code needs be run. Superb! 1.3.2 is teh r0xx0r! So recently for kicks, I fired up the comments plugin to see if it would work. Lo, by poking directly to the CGI script in my comments-form.html theme file, it works! But in order for the comments to actually appear on my site, I have to run a build *without* the --incremental switch. This is because runStaticRenderer never consults the plugins to see if anything other than the original .txt file could prompt a rebuild of the .html. Now, I could write a hackish patch to runStaticRenderer that would check comment_dir along the file path and see if the comment directory is older than the existing .html file. I suspect it would be a relative minimum of code, and could apply cleanly even after an upgrade to the next version. But I doubt that this solution would be good enough for you folks upstream, and I like running clean upstream packages when possible. So surely the best way to handle this would be to have a callback in each plugin that runStaticRenderer tries to call into when incremental is 1. Presumably you'd pass in the current .txt file to be examined, and short circuit out on the first condition that necessitated a rebuild. This could also be good for things like pycalendar, which seems to fall out of date in the individual entry pages for a given month. -- Though the great song return no more Nick Moffitt There's keen delight in what we have: [email protected] The rattle of pebbles on the shore Under the receding wave. -- W. B. Yeats ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642