[racket] Scribble to GoogleCode Wiki
Thank you.
On 22-10-2011 04:04, Matthew Flatt wrote:
> At Fri, 21 Oct 2011 23:31:56 +0100, José Lopes wrote:
>> I am trying to generate GoogleCode's Wiki pages using a Scribble
>> document as source.
>> Which functions provided by the Scribble module I can use to write a
>> program that reads a Scribble document and generates text output.
> If I understand the question, the next version makes this easier by
> providing the functionality of the `scribble' executable as a function:
>
> http://pre.racket-lang.org/docs/html/scribble/renderer.html#(part._.Rendering_.Driver)
>
>
> Meanwhile, you can look at "collects/racket/run.rkt" to see how the
> pieces are put together. Here's a stripped-down version of that
> module's main function:
>
> (require (prefix-in text: racket/text-render))
>
> ;; build-docs : list-of-part list-of-path path -> void
> (define (build-docs docs fns dest)
> (let ([renderer (new (text:render-mixin render%)
> [dest-dir dest])])
> (let* ([fp (send renderer traverse docs fns)]
> [info (send renderer collect docs fns fp)]
> [r-info (send renderer resolve docs fns info)])
> (send renderer render docs fns r-info))))
>
--
José António Branquinho de Oliveira Lopes
58612 - MEIC-A
jose.lopes at ist.utl.pt