+ def read_sources (self):
+
+ ## ugh: drop the .ly.txt
+ for (key, val) in self.file_links.items ():
+
+ def note_original (match, ln=val):
+ key = ln.name ()
+ hash_to_original_name[key] = match.group (1)
+ return ''
+
+ sf = val.source_file ()
+ if sf:
+ re.sub (r'\\sourcefilename "([^"]+)"',
+ note_original, open (sf).read ())
+ else:
+ print 'no source for', val
+