]> git.donarmstrong.com Git - lilypond.git/blobdiff - python/musicxml.py
web: changed open source to free software
[lilypond.git] / python / musicxml.py
index 278e108b1da4075b436ba8af7fe4ba0f7890f465..50945e8d8d8b78fc19e95bd2a545f2a817eb47d0 100644 (file)
@@ -167,6 +167,14 @@ class Identification (Xml_node):
           ret.append (r.get_text ())
         return string.join (ret, "\n")
 
+    # get contents of the source-element (usually used for publishing information). (These contents are saved in a custom variable named "source" in the header of the .ly file.)
+    def get_source (self):
+        source = self.get_named_children ('source')
+        ret = []
+        for r in source:
+          ret.append (r.get_text ())
+        return string.join (ret, "\n")
+
     def get_creator (self, type):
         creators = self.get_named_children ('creator')
         # return the first creator tag that has the particular type
@@ -232,8 +240,6 @@ class Identification (Xml_node):
                     return mf.get_text () 
         return None
 
-
-
 class Duration (Music_xml_node):
     def get_length (self):
         dur = int (self.get_text ()) * Rational (1,4)