]> 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--2011 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 (display
51  ;; ugly hack to remove the @node... @appendixsec... portion
52  (substring
53   (call-with-output-string
54    (lambda (port)
55      (dump-node (markup-doc-node) port 2)))
56   ;; magic number to remove the initial part.  63 comes from:
57   ;; "\nnode Text markup commands\n@appendixsec Text markup commands\n\n\n\n"
58   ;; which is generated by (dump-node...) in documentation-lib.scm
59   63
60   )
61  (open-output-file "markup-commands.tely"))
62
63 (display
64  (markup-list-doc-string)
65  (open-output-file "markup-list-commands.tely"))
66
67 (display
68  type-predicates-doc-string
69  (open-output-file "type-predicates.tely"))
70
71 (display
72  (identifiers-doc-string)
73  (open-output-file "identifiers.tely"))
74
75
76 (display
77  (backend-properties-doc-string all-user-grob-properties)
78  (open-output-file "layout-properties.tely"))
79
80 (display
81  (translation-properties-doc-string all-user-translation-properties)
82  (open-output-file "context-properties.tely"))
83
84 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
85
86 (define file-name "internals")
87 (define outname (string-append file-name ".texi"))
88
89 (define out-port (open-output-file outname))
90
91 (writing-wip outname)
92
93 (display
94  (string-append
95   (texi-file-head "LilyPond Internals Reference" file-name
96                   "(lilypond-internals.info)")
97   "
98
99 @include macros.itexi
100
101 @ignore
102 @omftitle LilyPond internals
103 @omfcreator Han-Wen Nienhuys and Jan Nieuwenhuizen
104 @omfdescription Programmer's reference of the LilyPond music engraving system
105 @omftype user's guide
106 @omflanguage English
107 @omfcategory Applications|Publishing
108 @end ignore
109
110 @iftex
111 @afourpaper
112 @end iftex
113
114 @finalout
115
116 @titlepage
117 @title LilyPond
118 @subtitle The music typesetter
119 @titlefont{Internals Reference}
120 @author The LilyPond development team
121
122 @c `Internals Reference' was born 2000-10-21 with git commit 01e371f...
123 Copyright @copyright{} 2000--2011 by the authors
124
125 @vskip 20pt
126
127 For LilyPond version @version{}
128 @end titlepage
129
130 @contents
131
132 @ifnottex")
133  out-port)
134
135 (define top-node
136   (make <texi-node>
137     #:name "GNU LilyPond -- Internals Reference"
138     #:text
139     (string-append  "@end ifnottex
140
141 @ifhtml
142 @ifclear bigpage
143 This document is also available as a
144 @uref{source/Documentation/internals.pdf,PDF} and as
145 @uref{source/Documentation/internals-big-page.html,one big page}.
146 @end ifclear
147 @ifset bigpage
148 This document is also available as a
149 @uref{source/Documentation/internals.pdf,PDF} and as a
150 @uref{source/Documentation/internals/index.html,HTML indexed multiple pages}.
151 @end ifset
152 @end ifhtml
153
154 This is the Internals Reference (IR) for version "
155                     (lilypond-version)
156                     " of LilyPond, the GNU music typesetter.")
157
158     #:children
159     (list
160      (music-doc-node)
161      (translation-doc-node)
162      (backend-doc-node)
163      (all-scheme-functions-doc)
164      (make <texi-node>
165        #:appendix #t
166        #:name "Indices"
167        #:text "
168 @appendixsec Concept index
169
170 @printindex cp
171
172 @appendixsec Function index
173
174 @printindex fn
175
176 \n@bye"))))
177
178 (dump-node top-node out-port 0)
179 (newline (current-error-port))