Here is a patch that refactors lilypond into several python classes: http://codereview.appspot.com/1543042
There is one base class for the output format, handling the basic operations, while the format-specific operations (and regexps) are provided by derived classes. This makes it easier to add further formats (e.g. one wants to extend a format for a particular use, but not for lilypond-book in general) or to change things for just one format. It also makes it easier to understand lilypond-book. The main reason I'm working on it is that for the MusicXML test suite I want to 1) implement musicxml snippet support, too (basically, simply running the snippet through musicxml2ly as a filter and then treating it like any other ly snippet, except that the output will link to the xml) and 2) modify the output of the musicxml files so it better suits the musicxml test suite (will be done in a custom format living in input/regression/musicxml/book_musicxmltestsuit.py, not in stock lilypond- book) Cheers, Reinhold -- ------------------------------------------------------------------ Reinhold Kainhofer, [email protected], http://reinhold.kainhofer.com/ * Financial & Actuarial Math., Vienna Univ. of Technology, Austria * http://www.fam.tuwien.ac.at/, DVR: 0005886 * LilyPond, Music typesetting, http://www.lilypond.org _______________________________________________ lilypond-devel mailing list [email protected] http://lists.gnu.org/mailman/listinfo/lilypond-devel
