@@ -4,8 +4,8 @@ function plugindef()
44 finaleplugin .NoStore = true
55 finaleplugin .Author = " Robert Patterson"
66 finaleplugin .Copyright = " CC0 https://creativecommons.org/publicdomain/zero/1.0/"
7- finaleplugin .Version = " 1.0"
8- finaleplugin .Date = " September 24 , 2024"
7+ finaleplugin .Version = " 1.0.1 "
8+ finaleplugin .Date = " September 25 , 2024"
99 finaleplugin .CategoryTags = " Document"
1010 finaleplugin .MinJWLuaVersion = 0.74
1111 finaleplugin .Notes = [[
@@ -44,7 +44,7 @@ function plugindef()
4444 return " Massage MusicXML..." , " " , " Massages MusicXML to make it easier to import to Dorico and MuseScore."
4545end
4646local text_extension = " .musicxml"
47- local function remove_processing_instructions (file_path )
47+ local function remove_processing_instructions (file_path , output_name )
4848
4949 local input_file <close> = io.open (file_path , " r" )
5050 if not input_file then
@@ -61,7 +61,7 @@ local function remove_processing_instructions(file_path)
6161
6262 input_file :close ()
6363
64- local output_file <close> = io.open (file_path , " w" )
64+ local output_file <close> = io.open (output_name , " w" )
6565 if not output_file then
6666 error (" Cannot open file for writing: " .. file_path )
6767 end
@@ -172,10 +172,11 @@ function music_xml_massage_export()
172172 if not xml_file then
173173 return
174174 end
175+ local output_name = append_massaged_to_filename (xml_file )
175176
176- remove_processing_instructions (xml_file )
177+ remove_processing_instructions (xml_file , output_name )
177178 local musicxml = tinyxml2 .XMLDocument ()
178- local result = musicxml :LoadFile (xml_file )
179+ local result = musicxml :LoadFile (output_name )
179180 if result ~= tinyxml2 .XML_SUCCESS then
180181 error (" Unable to process " .. xml_file .. " . " .. musicxml :ErrorStr ())
181182 return
@@ -185,7 +186,6 @@ function music_xml_massage_export()
185186 error (" File " .. xml_file .. " does not appear to be a Finale-exported MusicXML file." )
186187 end
187188 process_xml (score_partwise )
188- local output_name = append_massaged_to_filename (xml_file )
189189 musicxml :SaveFile (output_name )
190190 finenv .UI ():AlertInfo (" Processed to " .. output_name .. " ." , " Processed File" )
191191end
0 commit comments