]> git.donarmstrong.com Git - lilypond.git/blobdiff - buildscripts/lys-to-tely.py
MusicXML: distribute *.broken too.
[lilypond.git] / buildscripts / lys-to-tely.py
index d67af4775f85e42a5e96ea983323acc2abc7f684..96539a27fcaa353471274b0339325ef0d7e2b894 100755 (executable)
@@ -12,6 +12,7 @@ TODO:
 import sys
 import os
 import getopt
+import re
 
 program_name = 'lys-to-tely'
 
@@ -43,7 +44,7 @@ name = "ly-doc"
 title = "Ly Doc"
 template = '''\input texinfo
 @setfilename %%(name)s.info
-@settitle %%(name)s
+@settitle %%(title)s
 
 @documentencoding utf-8
 @iftex
@@ -85,8 +86,15 @@ for opt in options:
     else:
         raise Exception ('unknown option: ' + o)
 
+texi_file_re = re.compile ('.*\.i?te(ly|xi)$')
+
 def name2line (n):
-    s = r"""
+    if texi_file_re.match (n):
+        # We have a texi include file, simply include it:
+        s = r"@include %s" % os.path.basename (n)
+    else:
+        # Assume it's a lilypond file -> create image etc.
+        s = r"""
 @ifhtml
 @html
 <a name="%s"></a>