From: David G. <go...@py...> - 2003-03-30 17:52:22
|
William Dode wrote: > I want to generate site from rst pages in somes directories. Aha! You're looking for a templating system. Thanks for the examples. Here are some references that should be of interest: * There's an entry in the to-do list for a templating system: <http://docutils.sf.net/spec/notes.html#templating-system>. * Ollie Rutherfurd has done some work on integrating Docutils & ht2html: <http://www.rutherfurd.net/articles/rst-ht2html.html>. * The docutils/writers/pep_html.py module uses a template file to generate HTML PEPs. The template file is very similar to the example you provided. > In each directory, i need to know the order of the pages, the title > of the directory, the first page to show... So i need a simple data > format. ... > the config files where i'll need something like yaml : > http://flibuste.net/__menu I would suggest something like RFC-822 headers, which is what ht2html uses for metadata. The advantage is that they're already in Python's standard library. Alternatively, reStructuredText field lists are equivalent although more powerful: they can nest, and they can contain markup & links etc. If you really want a data structure with "the same philosophy as RST", that's your answer. > This script will be free, but it's a week-end's dirty hack for > now... How about putting it in the Docutils sandbox? Please send me your SourceForge user name and I'll set you up as a project developer. -- David Goodger http://starship.python.net/~goodger Programmer/sysadmin for hire: http://starship.python.net/~goodger/cv |