I export parts a lot in Musescore. I would like to do something like this:
$ musescore -i myScore.mscz --export-parts
Exporting myScore-piano.pdf
Exporting myScore-guitar.pdf
Exporting myScore-drums.pdf
Parts were successfully exported
$
Is this possible?
I did find this:
$ musescore --export-to myScore.pdf --export-score-parts myScore.mscz
However, this generates one single pdf with the partiture and the parts. I need them in separate files.
The closest solution I have found so far is a way to generate a file containing all the parts without the partiture. It looks like this:
#!/bin/bash
IN=$1
PARTITURE=${IN%.mscz}-partiture.pdf
musescore -o $PARTITURE $IN
NO_PAGES_PARTITURE=$(pdftk $PARTITURE dump_data | grep NumberOfPages | cut -f2 -d ' ')
let NO_PAGES_PARTITURE=NO_PAGES_PARTITURE+1
FULL=${IN%.mscz}-full.pdf
musescore -o $FULL -P $IN
PARTS=${IN%.mscz}-all-parts.pdf
pdftk $FULL cat $NO_PAGES_PARTITURE-end output $PARTS
rm $FULL