Skip to content

Pushy gf - #64

Open
FernandaRobles1234 wants to merge 2 commits into
mainfrom
Pushy-gf
Open

Pushy gf#64
FernandaRobles1234 wants to merge 2 commits into
mainfrom
Pushy-gf

Conversation

@FernandaRobles1234

Copy link
Copy Markdown
Collaborator

No description provided.

@dual-wield-ray dual-wield-ray left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the .idea/* files seem to be files generated by IntelliJ, so should be ignored by source control.

Something like this in the project's .gitignore:

.idea/*

@dual-wield-ray dual-wield-ray left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok review complete! Good work. 🙂

When changes are done you will also see that there are unit tests that need to be green before merging. We can look into running them in your IDE together if you want (sorry I should have mentioned them earlier).

Comment thread pydrumscore/export.py
Comment thread pydrumscore/export.py
with open(save_path, "wb") as f:
f.write(xml_str)

zip_file= zipfile.ZipFile("pydrumscore/_exported/" + metadata.workTitle + ".mscz", "w")

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doing this means that every time we run the export, we will export both in .mscx and .mscz. Instead I think we should have the choice by giving an argument.

By default, the "true" export format for MuseScore is the zipped one. So we should by default export in .mscz, but accept an argument that exports with the old method instead, unzipped. Could be a flag like -u for "uncompressed", which would be used for unit tests and during development :)

Comment thread pydrumscore/export.py

# locate the tag you want to modify
for elem in myroot.iter():
if elem.tag == "rootfile" and "full-path" in elem.attrib:

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see in container.xml that there are many tags with rootfile and full-path. So if we rely on an existing tag to change, it will be dependent on the order.

Instead can we just create it on the fly?

Comment thread pydrumscore/export.py
Comment thread pydrumscore/export.py
@@ -0,0 +1,9 @@
<container>
<rootfiles>
<rootfile full-path="King Nothing.mscx" />

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my other comment, this line would be removed and instead be created on the spot.

Comment thread pydrumscore/export_files/META-INF/container.xml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants