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