diff options
author | Ludovic Courtes | 2006-01-24 20:02:40 +0000 |
---|---|---|
committer | Ludovic Courtes | 2006-01-24 20:02:40 +0000 |
commit | ce4ff568eaf9bb2f56ab0cf341591a9025f35ee7 (patch) | |
tree | eed112b1799d71951bd0353ef9e700a4f64d0520 /src/guile/skribilo.scm | |
parent | 8bdcb386f3ce26a9031ca123b4d43af0b5a3721a (diff) | |
parent | 19eb17fb8ca5f70f0138261cd49bbcf6f5eedc4b (diff) | |
download | skribilo-ce4ff568eaf9bb2f56ab0cf341591a9025f35ee7.tar.gz skribilo-ce4ff568eaf9bb2f56ab0cf341591a9025f35ee7.tar.lz skribilo-ce4ff568eaf9bb2f56ab0cf341591a9025f35ee7.zip |
Merge from lcourtes@laas.fr--2004-libre
Patches applied:
* lcourtes@laas.fr--2004-libre/skribilo--devel--1.2 (patch 31-36)
- Merge from lcourtes@laas.fr--2005-mobile
- Preliminary support for multiple reader front-ends.
- First implementation of a reader for Emacs' outline syntax.
- First working outline reader.
- Changed the default Lout `document-type' to `doc'.
- Fixed the HTML engine's `favicon' output.
git-archimport-id: lcourtes@laas.fr--2005-mobile/skribilo--devel--1.2--patch-29
Diffstat (limited to 'src/guile/skribilo.scm')
-rw-r--r-- | src/guile/skribilo.scm | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/guile/skribilo.scm b/src/guile/skribilo.scm index 43885ee..285a92d 100644 --- a/src/guile/skribilo.scm +++ b/src/guile/skribilo.scm @@ -38,6 +38,7 @@ exec ${GUILE-guile} --debug -l $0 -c "(apply $main (cdr (command-line)))" "$@" (define-module (skribilo) :autoload (skribilo module) (make-run-time-module) :autoload (skribilo engine) (*current-engine*) + :autoload (skribilo reader) (*document-reader*) :use-module (skribilo utils syntax)) (use-modules (skribilo evaluator) @@ -80,6 +81,8 @@ specifications." `(define ,binding (quote ,(raw-options->getopt-long options)))) (define-options skribilo-options + (("reader" :alternate "R" :arg reader + (nothing))) (("target" :alternate "t" :arg target :help "sets the output format to <target>") (set! engine (string->symbol target))) @@ -194,6 +197,8 @@ specifications." Processes a Skribilo/Skribe source file and produces its output. + --reader=READER Use READER to parse the input file (by default, + the `skribe' reader is used) --target=ENGINE Use ENGINE as the underlying engine --help Give this help list @@ -381,6 +386,8 @@ Processes a Skribilo/Skribe source file and produces its output. (define-public (skribilo . args) (let* ((options (getopt-long (cons "skribilo" args) skribilo-options)) + (reader-name (string->symbol + (option-ref options 'reader "skribe"))) (engine (string->symbol (option-ref options 'target "html"))) (output-file (option-ref options 'output #f)) @@ -412,7 +419,8 @@ Processes a Skribilo/Skribe source file and produces its output. (lambda (file) (format #t "~~ loading `~a'...~%" file)))) - (parameterize ((*current-engine* engine) + (parameterize ((*document-reader* (make-reader reader-name)) + (*current-engine* engine) (*document-path* (cons load-path (*document-path*))) (*bib-path* (cons bib-path (*bib-path*))) (*source-path* (cons source-path |