]> git.donarmstrong.com Git - lilypond.git/blobdiff - buildscripts/lys-to-tely.py
* input/mutopia/F.Schubert/standchen.ly (trebleThrough): fixes
[lilypond.git] / buildscripts / lys-to-tely.py
index 22343a77a7f3a413d652f91c774ac0fb48640694..8069deaba8a8de86f1fae9a9e8ef0e8a08fc2cfb 100644 (file)
@@ -1,5 +1,16 @@
 #!@PYTHON@
 
+
+'''
+TODO:
+
+  * Add @nodes, plit at sections?
+  * Less kludged first introduction file
+  * include *.texi files for text at start of section?
+
+'''
+
+
 import sys
 import os
 import string 
@@ -8,13 +19,14 @@ import getopt
 program_name = 'lys-to-tely'
 
 def help ():
-       sys.stdout.write (r"""Usage: lys-to-tely [OPTION]... LY-FILE...
+       sys.stdout.write (r"""Usage: lys-to-tely [OPTIONS]... LY-FILE...
 Construct tely doc from LY-FILEs.
 
 Options:
   -h, --help                print this help
-  -o,output=NAME            write tely doc to NAME
-  -t,title=TITLE            set tely tely doc title TITLE
+  -o, --output=NAME         write tely doc to NAME
+  -t, --title=TITLE         set tely doc title TITLE
+
 """)
        sys.exit (0)
 
@@ -50,7 +62,12 @@ if files:
        s = '''\input texinfo
 @setfilename %s.info
 @settitle %s
+@finalout @c we do not want black boxes.
 
+@iftex
+@afourpaper
+@end iftex
+  
 @c fool ls-latex
 @ignore
 @author Han-Wen Nienhuys and Jan Nieuwenhuizen
@@ -62,12 +79,17 @@ if files:
 
        def name2line (n):
                # UGR
-               if string.find (n, '+') >= 0:
-                       s = "@lilypondfile{%s}" % n
-               else:
-                       s = "@lilypondfile[printfilename,verbatim]{%s}" % n
+               s = r"""
+@ifhtml
+@html
+<A NAME="%s">
+@end html
+@end ifhtml
+""" % n
+               
+               s += "\n\n@lilypondfile[printfilename]{%s}" % n
                return s
-
+       files.sort ()
        s = s + string.join (map (lambda x: name2line (x), files), "\n")
        s = s + '\n@bye\n'
        f = "%s/%s.tely" % (dir, name)