]> git.donarmstrong.com Git - lilypond.git/blobdiff - scripts/build/lys-to-tely.py
Lilypond-book: Add regression tests for TEX.
[lilypond.git] / scripts / build / lys-to-tely.py
index d503786e3e13169597c682139973a70bb88a8c91..6f6ad475e47e3355188ea85c6e66fe5b1cb258de 100644 (file)
@@ -91,11 +91,23 @@ for opt in options:
         raise Exception ('unknown option: ' + o)
 
 texi_file_re = re.compile ('.*\.i?te(ly|xi)$')
+html_file_re = re.compile ('.*\.i?htm(l)?$')
+pdf_file_re = re.compile ('.*\.i?pdf$')
 
 def name2line (n):
     if texi_file_re.match (n):
         # We have a texi include file, simply include it:
         s = r"@include %s" % os.path.basename (n)
+    elif html_file_re.match (n) or pdf_file_re.match (n):
+        s = r"""
+@ifhtml
+@html
+<a href="%s">%s</a>
+<br/>
+@end html
+@end ifhtml
+""" % (os.path.basename (n), os.path.basename (n))
+        return s
     else:
         # Assume it's a lilypond file -> create image etc.
         s = r"""