Open YogieAnamCara opened 3 years ago
To be honest I'm not a programmer, but I played a little and changed the code for myself to work and replaced the "Get the song name" part to:
def process_root(self):
# Get the song name
try:
title_element = self.root.find('work/work-title')
self.title = title_element.text
except AttributeError:
title_element = self.root.find('movement-title')
self.title = title_element.text
except AttributeError:
title_element = 'None'
self.title = title_element.text
finally:
self.write('{{title:{title}}}\n'.format(title=self.title))
Hi,
if there is no
in the musicXML the script is not running.
File "xml2pro.py", line 165, in
x1.process_file()
File "xml2pro.py", line 64, in process_file
self.process_root()
File "xml2pro.py", line 69, in process_root
self.title = title_element.text
My musicXML is just having a
as it was produced by:
can this script be adjusted to take both titles into account?
Many thanks!
Cheers Yogie