Skip to content
Stephen De Gabrielle edited this page Aug 25, 2021 · 3 revisions

call raco scribble --html programmatically

|Artifacts| Scribble

A function that invokes raco scribble using (require raco/all-tools)

(require raco/all-tools)
;;scribble-to-html : source target body
;; generate html file from scribble file
(define (scribble-to-html source target)
  (define raco-scribble-spec (hash-ref (all-tools) "scribble"))  
  (parameterize
      ([current-namespace (make-base-namespace)] ;; to allow for multiple calls
       [current-command-line-arguments (vector "--html" (path->string source))]
       [current-directory target])
    (dynamic-require (cadr raco-scribble-spec) #f)))
Clone this wiki locally