]> git.donarmstrong.com Git - lilypond.git/blob - scm/framework-scm.scm
Add '-dcrop' option to ps and svg backends
[lilypond.git] / scm / framework-scm.scm
1 ;;;; framework-scm.scm -- output full-page stencil expressions
2
3 (define-module (scm framework-scm))
4
5 (use-modules
6  (ice-9 regex)
7  (ice-9 string-fun)
8  (guile)
9  (srfi srfi-1)
10  (ice-9 pretty-print)
11  (srfi srfi-13)
12  (scm page)
13  (lily))
14
15 (define format ergonomic-simple-format)
16
17 (define-public (output-framework basename book scopes fields)
18   (let* ((file (open-output-file (format #f "~a.scm" basename))))
19
20     (display ";;Creator: LilyPond\n" file)
21     (display ";; raw SCM output\n" file)
22
23     (for-each
24      (lambda (page)
25        (display ";;;;;;;;;;;;;;;;;;;;;;;;;;\n;;;PAGE\n" file)
26        ;; The following two lines are alternates
27        ;;(pretty-print (ly:stencil-expr page) file)
28        (write (ly:stencil-expr page) file)
29        )
30      (map page-stencil (ly:paper-book-pages book)))))
31
32 (define-public output-classic-framework output-framework)
33
34 (define-public (convert-to-ps . args) #t)
35 (define-public (convert-to-pdf . args) #t)
36 (define-public (convert-to-png . args) #t)