Skip to content

Commit 0f36ac9

Browse files
chore: autopublish 2024-09-23T10:57:27Z
1 parent 7c6c139 commit 0f36ac9

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

dist/musicxml_massage_export.lua

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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."
4545
end
4646
local 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")
191191
end

hash/musicxml_massage_export.hash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0d50e62f01bf3b2e16e9ee3bf08bad140274a26a266616b0664b72efb39b4f98e8dfc2cb982c83e8a2755f676b2071b3f25a1dc58af1f9eba1833ce9f0baa475 musicxml_massage_export.lua
1+
07070dcc479c584c98a9ef96a8ab88870ac603a14797c8f88942f6d46500eb0cdb36f78a3b3bd610115074899756e5208d7a876642f37170de5319233e4dc3a0 musicxml_massage_export.lua

0 commit comments

Comments
 (0)