Don't have the link anymore but it's pretty simple, I'm sure you can even do it with a bash script. Generate .ly files with scores whichever way you want, convert them to png via lilypond cli, then generate flash cards containing references to those images