[MLton] wiki macro for including SVN code
Matthew Fluet
fluet@cs.cornell.edu
Tue, 9 Aug 2005 03:40:04 -0400 (EDT)
> The recently added DownloadSVN wiki macro made me think of another
> macro that would be incredibly useful to have: IncludeSVN, which, when
> given a file name includes the latest contents of that file. Even
> better, if the file is SML code, it runs it through the enscript
> filter.
Added IncludeSVN.
It takes an optional second argument ('type'), which is the style sent to
enscript. If the 'type' argument is omitted, use the file suffix. So, it
will work well on .c and .sml, but barf on .sig and .fun; adding the
explicit type is no worse than what we do for the !#syntax processor.
It fetches the file from ViewCVS with an http request, as in DownloadSVN.
All in all, very easy to stich together DownloadSVN.py and syntax.py.