From: John M. S. <sk...@oz...> - 2003-05-23 15:59:01
|
Brian Hurt wrote: > Yeah yeah, replying to myself is bad. Anyways, I wanted to send out an > example of HTML for people to look at and critique. > > Having played with this, I definately want to write a HTML generator for > this page. In Ocaml, natch. Otherwise maintainance will be nigh unto > impossible. > Use interscript! http://interscript.sourceforge.net Here is some code: ------ @set_title('Extlib Performance') @head(1,'Operation costs') Here is a performance table for various data structures @p() @begin_table('oper','list','array''hash') @table_row('append','O(1)','O(N)','N/A') @table_row('prepend','O(1)','O(N)','N/A') @table_row('magicr','O(1)','O(N)','O(1)') @end_table() @p() -------------- This input can be used to simultaneously generate HTML (in two formats), LaTeX, Lout, and plain text (and even nroff if someone would care to write an nroff weaver). BTW: the stuff after the @ sign is not magical interscript stuff. No, it is any Python code you want to write (the functions such as 'begin_table' are just part of the standard library). This implies you can generate documentation easily with Python script. Indeed, you can generate code too (since its actually a literate programming tool). -- John Max Skaller, mailto:sk...@oz... snail:10/1 Toxteth Rd, Glebe, NSW 2037, Australia. voice:61-2-9660-0850 |