Generate MuseScore sheet PDFs either directly from the CLI or by running a small HTTP service.
Install dependencies once:
npm installBuild the TypeScript sources before running either mode:
npm run buildThe tool works by spawning a headless browser and scrolling through the entire page and scrapes the music sheet SVGs from the DOM. You can use it from a CLI or spawn a server for it.
Expose the CLI once with npm link (or npm install -g . if you prefer a global install) and then call it with the friendly musesheets command:
npm run build
npm link
musesheets <musescore-url> [output-file]Example:
musesheets https://musescore.com/classicman/scores/106022 la_campanella.pdfIf no output file is provided the PDF defaults to sheets.pdf in the current working directory. You can still run the CLI without linking via npm run cli -- <args> or node dist/index.js <args> if you prefer.
Start (or hot-reload) the server with:
npm run startOr run it directly without nodemon:
node dist/index.js --server [--port 4000]Then hit the HTTP endpoint with the MuseScore URL as a query parameter:
curl "http://localhost:3000/?url=https://musescore.com/classicman/scores/106022" --output la_campanella.pdfThis is not an official MuseScore product.