]> git.donarmstrong.com Git - lilypond.git/blob - scm/documentation-generate.scm
Merge branch 'master' into lilypond/translation
[lilypond.git] / scm / documentation-generate.scm
1 ;;;; This file is part of LilyPond, the GNU music typesetter.
2 ;;;;
3 ;;;; Copyright (C) 2000--2010 Han-Wen Nienhuys <hanwen@xs4all.nl>
4 ;;;; Jan Nieuwenhuizen <janneke@gnu.org>
5 ;;;;
6 ;;;; LilyPond is free software: you can redistribute it and/or modify
7 ;;;; it under the terms of the GNU General Public License as published by
8 ;;;; the Free Software Foundation, either version 3 of the License, or
9 ;;;; (at your option) any later version.
10 ;;;;
11 ;;;; LilyPond is distributed in the hope that it will be useful,
12 ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 ;;;; GNU General Public License for more details.
15 ;;;;
16 ;;;; You should have received a copy of the GNU General Public License
17 ;;;; along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
18
19 ;;; File entry point for generated documentation
20 ;;; Running LilyPond on this file generates the documentation
21
22 ;;(set-debug-cell-accesses! 5000)
23
24 ;;;;;;;;;;;;;;;;
25 ;;;;;;;;;;;;;;;; TODO : make modules of these!
26 ;;;;;;;;;;;;;;;;
27
28 ;; todo: naming: grob vs. layout property
29
30 (map ly:load '("documentation-lib.scm"
31                "lily-sort.scm"
32                "document-functions.scm"
33                "document-translation.scm"
34                "document-music.scm"
35                "document-type-predicates.scm"
36                "document-identifiers.scm"
37                "document-backend.scm"
38                "document-markup.scm"))
39
40 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
41
42 (display
43  (slot-ref (all-scheme-functions-doc) 'text)
44  (open-output-file "scheme-functions.tely"))
45
46 ;;(display
47 ;; (markup-doc-string)
48 ;; (open-output-file "markup-commands.tely"))
49
50 (call-with-output-file "markup-commands.tely"
51   (lambda (port)
52     (dump-node (markup-doc-node) port 2)))
53
54 (call-with-output-file "markup-list-commands.tely"
55   (lambda (port)
56     (dump-node (markup-list-doc-node) port 2)))
57
58 (display
59  type-predicates-doc-string
60  (open-output-file "type-predicates.tely"))
61
62 (display
63  (identifiers-doc-string)
64  (open-output-file "identifiers.tely"))
65
66
67 (display
68  (backend-properties-doc-string all-user-grob-properties)
69  (open-output-file "layout-properties.tely"))
70
71 (display
72  (translation-properties-doc-string all-user-translation-properties)
73  (open-output-file "context-properties.tely"))
74
75 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
76
77 (define file-name "internals")
78 (define outname (string-append file-name ".texi"))
79
80 (define out-port (open-output-file outname))
81
82 (writing-wip outname)
83
84 (display
85  (string-append
86   (texi-file-head "LilyPond Internals Reference" file-name
87                   "(lilypond-internals.info)")
88   "
89
90 @include macros.itexi
91
92 @ignore
93 @omftitle LilyPond internals
94 @omfcreator Han-Wen Nienhuys and Jan Nieuwenhuizen
95 @omfdescription Programmer's reference of the LilyPond music engraving system
96 @omftype user's guide
97 @omflanguage English
98 @omfcategory Applications|Publishing
99 @end ignore
100
101 @iftex
102 @afourpaper
103 @end iftex
104
105 @finalout
106
107 @titlepage
108 @title LilyPond
109 @subtitle The music typesetter
110 @titlefont{Internals Reference}
111 @author The LilyPond development team
112
113 @c `Internals Reference' was born 2000-10-21 with git commit 01e371f...
114 Copyright @copyright{} 2000--2010 by the authors
115
116 @vskip 20pt
117
118 For LilyPond version @version{}
119 @end titlepage
120
121 @contents
122
123 @ifnottex")
124  out-port)
125
126 (define top-node
127   (make <texi-node>
128     #:name "GNU LilyPond -- Internals Reference"
129     #:text
130     (string-append  "@end ifnottex
131
132 @ifhtml
133 @ifclear bigpage
134 This document is also available as a
135 @uref{source/Documentation/internals.pdf,PDF} and as
136 @uref{source/Documentation/internals-big-page.html,one big page}.
137 @end ifclear
138 @ifset bigpage
139 This document is also available as a
140 @uref{source/Documentation/internals.pdf,PDF} and as a
141 @uref{source/Documentation/internals/index.html,HTML indexed multiple pages}.
142 @end ifset
143 @end ifhtml
144
145 This is the Internals Reference (IR) for version "
146                     (lilypond-version)
147                     " of LilyPond, the GNU music typesetter.")
148
149     #:children
150     (list
151      (music-doc-node)
152      (translation-doc-node)
153      (backend-doc-node)
154      (all-scheme-functions-doc)
155      (make <texi-node>
156        #:appendix #t
157        #:name "Indices"
158        #:text "
159 @appendixsec Concept index
160
161 @printindex cp
162
163 @appendixsec Function index
164
165 @printindex fn
166
167 \n@bye"))))
168
169 (dump-node top-node out-port 0)
170 (newline (current-error-port))