svg export with unique named groups
Hi,
I wonder if it is possible to pass on a minimum of structure information to the exported SVG score.
I would settle for a relatively flat group hierarchy with names or IDs.
My purpose is to access certain SVG elements that correspond to speciffic musical elements in the score.
I imagine something like this would suffice ,
<g uid="000000000"> <p/>.... </g>
so long as the uinque id can be related to a specific and unique object at export time.
Has anyone tried something remotely along these lines, or is interested if I pursue?
Cheers
Comments
Check out this forum thread: https://musescore.org/en/node/61746
The thread has gotten lengthy recently, but the functionality you seek seems similar to what I am doing, which is described in the most recent post by me (yesterday), and I attached sample files. It doesn't use GUIDs, the data-chord and data-type values are not unique in the SVG file, but it would not be hard to adapt to created a "data-guid" or "data-uuid" attribute for each element, or for specific types of elements.
In reply to Check out this forum thread: by sideways
Awesome, Thanks for your reply.
Back when I posted this I rolled up my sleeves and cranked out a grouping and naming scheme for the exporter that works quite wellm but given the lack of interest here I never published or shared. Let me know if you are Interested and I'll git share my work.
In reply to Awesome, Thanks for your by quiasmo
Thanks for the offer, but I just cranked out my own ID and Type exporting and I'm very happy with it, as it appears you are happy with your code.
In reply to Thanks for the offer, but I by sideways
Actually, I will be happy to read both code side by side. So @quiasmo if you have some spare time to explain what you did and share your code, sure, go ahead.