Bhe spero tu sia clemente, il sorgente è lungo!!
l'ho realizzato su piattaforma windows.