You can find the code here: https://bitbucket.org/aquarius/mnkit And it includes this: