X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scripts%2Fbuild%2Flys-to-tely.py;h=329b412a47f921c0bbeac011d40f56393cb14fa6;hb=5b1f3adfe5e3561eaa0f9440e0697054084b7107;hp=6a2a05ed7df95cc524222b72f7c61e58fbe67b96;hpb=e18a8f4c4bc2f583b330715a03f9b8b5feb26b4d;p=lilypond.git diff --git a/scripts/build/lys-to-tely.py b/scripts/build/lys-to-tely.py index 6a2a05ed7d..329b412a47 100644 --- a/scripts/build/lys-to-tely.py +++ b/scripts/build/lys-to-tely.py @@ -63,6 +63,14 @@ template = '''\input texinfo @finalout @c we do not want black boxes. +@c Trick to use with proper font mappings the same NCSB fonts as +@c LilyPond instead of those provided by TeX distribution +@tex +\\ifpdf + \\pdfmapfile{=lilypond.map} +\\fi +@end tex + @c fool ls-latex @ignore @author %%(author)s @@ -102,18 +110,19 @@ for opt in options: else: raise Exception ('unknown option: ' + o) -texi_file_re = re.compile ('.*\.i?te(ly|xi)$') -html_file_re = re.compile ('.*\.i?htm(l)?$') -xml_file_re = re.compile ('.*\.i?(xm|mx)l$') -tex_file_re = re.compile ('.*\.i?(la)?tex$') +html_file_re = re.compile ('.*\.i?html?$') +info_file_re = re.compile ('.*\.info$') pdf_file_re = re.compile ('.*\.i?pdf$') +tex_file_re = re.compile ('.*\.i?(la)?tex$') +texi_file_re = re.compile ('.*\.i?te(ly|xi|xinfo)$') +xml_file_re = re.compile ('.*\.i?(xm|mx)l$') 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) or - tex_file_re.match (n)): + elif (html_file_re.match (n) or info_file_re.match (n) + or pdf_file_re.match (n) or tex_file_re.match (n)): s = r""" @ifhtml @html @@ -151,7 +160,7 @@ def name2line (n): if glob_input: files = glob.glob(glob_input) elif input_filename: - files = open(input_filename).read().splitlines() + files = open(input_filename).read().split() if files: dir = os.path.dirname (name) or "." @@ -162,11 +171,9 @@ if files: s = "\n".join (map (name2line, files)) s = template.replace (include_snippets, s, 1) f = "%s/%s" % (dir, name) - sys.stderr.write ("%s: writing %s..." % (program_name, f)) h = open (f, "w") h.write (s) h.close () - sys.stderr.write ('\n') else: # not Unix philosophy, but hey, at least we notice when # we don't distribute any .ly files.