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