Skip to content
This repository has been archived by the owner on Jan 8, 2025. It is now read-only.

Update Manuscript generation to work with sibmei #119

Closed
wants to merge 7 commits into from

Conversation

th-we
Copy link

@th-we th-we commented Sep 15, 2020

To avoid the need of conflict resolution with merging commits one by one, this pull request supersedes #111, #112, #116 and #117.

This includes changes that were made to the libmei shipping with sibmei. For example, the RemoveChild() method was added with 24f5b43 in 2015, but was never added to the libmei generator.

Goal is that we can generate libmei for sibmei without having to manually merge changes every time.

Facilitates renaming libmei.plg (e.g. for different MEI versions)
Previously, this was only the case for self-closing elements
Apply changes that were made in the libmei shipping with sibmei
@th-we th-we force-pushed the pr/get-in-sync-with-sibmei branch from dbcfe34 to 19c0cf2 Compare September 15, 2020 08:22
@ahankinson
Copy link
Member

as far as I remember, the libmei. prefix was used to ensure that there weren't any collisions with other libraries, since the method names are fairly generic.

Not sure why the Chr(10) line feed character is being added...

@ahankinson
Copy link
Member

Ah, I see -- the \ns are hidden from the GitHub diff...

@th-we
Copy link
Author

th-we commented Dec 23, 2020

Can you explain how removing prefixes might cause collisions? The reason to remove them was actually to avoid collisions with other versions of libmei. Sibelius binds the prefix to the file name of the plugin. If we rename the libmei.plg file, then libmei will break, or all the prefixes have to be changed as well. We actually renamed libmei.plg to libmei4.plg in Sibmei to prepare for a MEI 4 release, opening up the possibility to use the MEI 3 version in parallel with a different version of libmei.

Without a prefix, only methods from the same .plg file are used. Or are the concerns about collisions with global ManuScript methods?

@th-we
Copy link
Author

th-we commented Dec 23, 2020

I realize that I accidentally applied the "Update dead weblink" commit twice (and reverted it once) while combining the separate pull requests. I can rebase to fix this if necessary.

@ahankinson
Copy link
Member

Wouldn't you want to change this line, then, if you've renamed the plugin?

https://github.com/DDMAL/libmei/blob/master/tools/langs/manuscript.py#L883

@ahankinson
Copy link
Member

Also, you should add yourself to the AUTHORS.

@th-we
Copy link
Author

th-we commented Jan 3, 2021

Wouldn't you want to change this line, then, if you've renamed the plugin?

https://github.com/DDMAL/libmei/blob/master/tools/langs/manuscript.py#L883

As I understand it, the libmei generation should be usable for any version or customization. I would therefore not change the default output name. When used, it can be renamed to anything that is appropriate.

@ahankinson
Copy link
Member

I don't understand. So you're wanting to have two different libmei plugins installed (one for v3, one for v4), and you want to generate the libmei code for v4, but you don't want to change the plugin name?

@th-we
Copy link
Author

th-we commented Jan 5, 2021

I can use the libmei generator to create a libmei for basically any MEI schema, be it v3, v4 or any customization I like, right? Therefore the default name libmei4.plg would not be generally fitting. The output file can be renamed manually to whatever is suitable for the use case. (The only use case right now of course being to bundle it with a specific version of sibmei.)

ef2ca39 makes sure that libmei will work no matter what its file name is.

@th-we
Copy link
Author

th-we commented May 16, 2021

As there were some changes in the meanwhile, I'd like to close this pull request and continue on a few separate ones.

#124 #125 #126

@th-we th-we closed this May 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants