[Doc-SIG] Docutils and ResT

Voidspace mike at pcblokes.com
Fri Oct 22 14:57:26 CEST 2004


Hello David,

David Goodger wrote:

> [Michael Foord]
> > I hope progress is being made on pysource
>
> Yes, I'm working on it now.  You can expect something before long.


Brilliant.
Docutils is *very* good - I really appreciate being able to use ResT.
Docfactory will be nice as well - for some reason I was getting slightly 
different (not so good) output from Docfactory than from buildhtml.py - 
which I thought was odd.

>
> > Anyway - enough waffle. I'd like to convert docutils to emit *part*
> > of an html page. This is so that I can also write a preprocessor and
> > develop an automatic content management system for my website. This
> > will allow me to do all the content for my website in ResT rather
> > than HTML - hurrah.
>
> There's an interface that does exactly that.  See
> <http://docutils.sf.net/docs/api/publisher.html> for a brief overview.
> You want the ``publish_parts`` function.

Aha... fantastic
Very interesting.

> > I'd also like to extend ResT a bit to add a few directives, so I'll
> > need to tinker with the reader which looks a bit more complex.
>
> What kind of directives?
>
> (Directives are added to the parser, not the reader.  See PEP 258 for
> an overview.)

Ok - thanks. That gives me a good start. When I run into difficulties 
I'll let you know :-)
(I'm sure you're delighted to hear that).

The sort of things I'm hoping to add are :

a display box
auto generate indexes from the contents of directories - so need a meta 
description in each page and a directive to generate the index
images in different 'classes' so I can apply different styles (left, 
centered and right basically)


> > I am hoping that people won't object to me posting questions here
> > about this....
>
> No objections.  That's what here is for!  The docutils-develop list is
> also available. 


Ok - might be more appropriate.

>
>
> > p.s. If anyone is vaguely interested in my ideas I kind of
> > summarised them at :
> > http://www.voidspace.org.uk/documents/voidspace_manifesto.html
>
> One suggestion: that page would look a lot better if the stylesheet
> were installed on the site.
>
Isn't it ?? Should be - oops............
Thanks for your answers and help - much appreciated.

Regards,

Michael

-- 

http://www.Voidspace.org.uk 
The Place where headspace meets cyberspace. Online resource site - covering science, technology, computing, cyberpunk, psychology, spirituality, fiction and more. 

---
http://www.Voidspace.org.uk/atlantibots/pythonutils.html
Python utilities, modules and apps.
Including Nanagram, Dirwatcher and more.
---
http://www.fuchsiashockz.co.uk   
http://groups.yahoo.com/group/void-shockz
---

Everyone has talent. What is rare is the courage to follow talent
 to the dark place where it leads. -Erica Jong
Ambition is a poor excuse for not having sense enough to be lazy.
         -Milan Kundera





More information about the Doc-SIG mailing list