The basic idea for this tool is very old and comes from my thesis: If you want to document source code, especially if you want to document examples it is often not enough to write some comments. So the desire came up to have tool in which one can write the description of what a code does. This template should support every feature of modern Tex-Mext processing: Header, subheaders, formatting styles and so on.
In te 80‘s of the last century, there was only LaTeX to do this job. The ancient verision of SourceDocumentation took LateX source files, searched for special comment tags and inserted pieces of source code specified by these tags.
For a long time, there was no possibility to renew this concept: LaTeX is still alive but its document styles and its handling is not very modern. But then OpenOffice came up which is provided for all platforms. With the new Open Document format, there was a chance to transfer this old (and very well working) concept into modern times. The principle is just the same:
The source of the documentation (algorithms, examples, even projects) is written with OpenOffice Writer, using any style you wish. Only this master will be edited in future.
At any point where you would like to demonstrate a piece of code, a paragraph with special syntax is inserted. Here the filename of the source code and a tag is specified where to find the snippet.
Running SourceDocumentation on this master document will find these paragraphs and replace them with the imported source snippets. This results in another OpenOffice document which contains the complete documentation. You just have to updtae the table of contents and so on.
Here is the source and the documentation of SourceDocumentation: