|
From: Richard J. <rj...@ek...> - 2002-08-15 01:08:26
|
On Thu, 15 Aug 2002 10:54 am, David Goodger wrote: > Re http://docutils.sf.net/sandbox/richard/ZReST/, Richard Jones wrote: > > Anyway, it works, mostly. It doesn't: > > > > 1. have any control over options > > 2. have any capturing of Reporter output > > > > .. because I spent the better part of an hour trying to figure how I > > could sanely control both, and gave up ;) > > Can you give us specifics, of what you want to do? Control options > how? Capture Reporter output how? One of the big issues is that I'm not sure what all the options are :) Stylesheet location and Reporter verbosity are two biggies at the moment. I'd want to capture the Reporter output to display on the Zope edit page, rather than it just going to stdout/err ;) > > There's probably some way of faking an options object, but I just > > couldn't get it to fly... > > Why fake it? Isn't it easy to get a real one? I couldn't find a mechanism to do so - I poked around the code and docs for quite some time, but nothing was immediately obvious. The docs don't seem to have much at all regarding the "API". > > The Reporter stuff seemed far too hard-coded for my brain to cope > > with at present :) > > Are you trying to capture the stderr output of Reporter, or the > <system_message> elements it produces? Why? I'd want to get the actual message elements, so I can display them sensibly as I described above. > Some comments on ZReST.render:: > [snip] > Instead of these, you can just use:: > > self.formatted = pub.publish() I did that, initially, but then I unpacked it so I could try manipulating the options and reporting. Another improvement that I've just thought of is to extract the title from the DOM and set it as the object's "title" attribute (which is used by Zope for various things). > BTW, I like the name. We all need more Z-rest. (If you don't get it, > you're probably American. "Zee" indeed! ;-) :) I'm like, sooo not American :) Richard (aka Bruce) |