A while ago I began to write documentation for SemanticScuttle in rST (reStructuredText) format. When deploying new versions, the .rst files need to be converted to HTML and will get packaged up with the release.
SemanticScuttle uses Phing for deployment, which is a great time saver and packaging bug preventer.
Since Phing itself didn't contain a task to render rST files, I had to use the foreach and exec task:
]]>
Yes, totally ugly and unreadable. Since I am on vacation, I took the time to write a separate rST task that takes all the work from you:
]]>
It automatically renders HTML but supports all other formats supported by Python's docutils, supports file name mappers, multiple filesets, has filter chain support and renders files only if the sources are newer (and you want that). Have a look at the README.
The code is available on
github
and gitorious,
and I'm trying to
get it into the official phing distribution
.
The task is part of phing since
version 2.4.7.
@Mario B.: Do that with Ant.
Comments? Please send an e-mail.