music-encoding / sibmei

Sibelius MEI Plugin
MIT License
39 stars 16 forks source link

Make text substitution case-insensitive #218

Closed th-we closed 10 months ago

th-we commented 11 months ago

Turns out that the text substitution syntax is case-insensitive, i.e. we can use any of \$Title\, \$TITLE\, \$title\, \$TiTlE\ and so on. I updated the test file to use different variants.

rettinghaus commented 11 months ago

@ahankinson please have a look and merge.

ahankinson commented 11 months ago

It looks fine, but I can’t really find a description of how it’s supposed to be used?

th-we commented 11 months ago

@ahankinson Do you mean how to use the substitutions in Sibelius? If you edit this text block in the test file:

grafik

the editable text looks like this:

grafik

The actual Text and TextWithFormattingAsString properties do not include the part after the "=" sign, they look like this:

Text: Bold \$TITLE\ Italic \$Subtitle\ underlined \$dedication\
TextWithFormattingAsString: Bold \B\\$TITLE\\n\\b\Italic \I\\$Subtitle\\n\\i\\U\underlined \$dedication\

Editing the part after "=" will actually modify the referenced metadata propery.

Not sure if this answers your question.

th-we commented 11 months ago

Anything I should do on this PR?