While I am NOT claiming to be "some coder genius", a program that does exactly this is something on my "projects to-do" list. My partner (who's improving her piano skills) keeps crying out for more sheet music with fingerings...
Is there already a canonical set of rules to apply? My approach is to find fingerings through a sort of beam search, using a utility function for how hard it is to move between points in a 10 dimensional "finger space".
I'm sure this approach is Probably Wrong or at least Overkill, but it's the most mathematically interesting way... :)