|
From: Richard J. <rj...@ek...> - 2002-08-15 02:15:50
|
On Thu, 15 Aug 2002 11:37 am, David Goodger wrote: > Richard Jones wrote: > > One of the big issues is that I'm not sure what all the options are :) > > Have you read http://docutils.sf.net/docs/tools.html yet? It's up to date. It has the stuff I need, thanks. > >>> 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. > > You seem to have found it though. ``docutils.core.Publisher.set_options`` > returns an options object with default values. Yeah, that was the result of my poking around :) > >>> 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. > > The <system_message> elements are inserted into the document tree, adjacent > to the problems themselves where possible. Some (those generated > post-parse) are kept until later, in ``document.messages``, and added as a > special final section, "Docutils System Messages". > > Would you want these messages *not* to be in the document? Or would a list > of references be enough? Docutils could be made to generate hyperlinks to > all known system_messages and add them to the document. I'd rather that the messages be both in the document, and available to the edit page. There's a screen cap of the edit page in my sandbox, just so you know what I'm on about :) The reporter's messages would be displayed above the edit box, with the really serious stuff in red. When I get around to implementing an FTP interface, the messages will be prepended to the downloaded file with some marker, and stripped out on upload. Screenshot: http://docutils.sf.net/sandbox/richard/ZReST/snapshot4.png Richard |