Skip to content

Auto-set musescoreDirectPNGPath when choosing MuseScore#1980

Merged
mscuthbert merged 2 commits into
masterfrom
claude/musescore-reader-png-path-c6d481
Jul 9, 2026
Merged

Auto-set musescoreDirectPNGPath when choosing MuseScore#1980
mscuthbert merged 2 commits into
masterfrom
claude/musescore-reader-png-path-c6d481

Conversation

@mscuthbert

Copy link
Copy Markdown
Member

Coauthored by @behdad-bahadivand-chegini whose idea this was in #1977 and #1979 . Supersede those PRs

configure.py: when selecting MuseScore as a MusicXML reader automatically set musescoreDirectPNGPath to the same path. (we don't clear it when setting reader elsewhere)

environment.py: fix bug where & was twice corrected when writing & -> & -> & and only once in reading. RT to XML properly now.

AI-assisted (Claude) - myke read and guided

…escaping env values

configure.py: when the configuration assistant's MusicXML-reader dialog
selects a MuseScore build (MuseScore.app, MuseScore 4.app, mscore, etc.,
matched by the new reMuseScoreName regex), also set musescoreDirectPNGPath
to the same path so PNG/PDF generation works without further setup.
Selecting a non-MuseScore reader leaves any existing musescoreDirectPNGPath
untouched. The two "set to" messages are merged: MuseScore selections print
"MusicXML Reader and PNG/PDF generator set to: ...".

environment.py: _EnvironmentCore.__setitem__ manually ran saxutils.escape on
string values, but toSettingsXML serializes through ElementTree, which already
escapes attribute values (and parsing unescapes them). The manual pass
double-escaped, so a path containing "&" was stored and returned as "&".
Removed the manual escape (and the now-unused saxutils import); ElementTree
handles it. Added testSpecialCharactersRoundTrip covering set -> escaped XML
-> parse round-trip for a path with "&" and "<>".

AI-assisted (Claude).
@mscuthbert mscuthbert mentioned this pull request Jul 9, 2026
@coveralls

coveralls commented Jul 9, 2026

Copy link
Copy Markdown

Coverage Status

coverage: 93.305% (+0.003%) from 93.302% — claude/musescore-reader-png-path-c6d481 into master

@mscuthbert mscuthbert merged commit 3872285 into master Jul 9, 2026
6 checks passed
@mscuthbert mscuthbert deleted the claude/musescore-reader-png-path-c6d481 branch July 9, 2026 08:45
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