Kindles can read a variety of non-proprietary, non-DRM'ed formats. They read TXT, HTML, JPEG, and non-DRM Mobi files directly.
The Kindle DRM wasn't hacked to REMOVE the DRM from Kindle purchases, but added to other books so that they too could be read on the Kindle.
We've known for some time already that Amazon's AZW files are actually Mobi files, but Amazon didn't share Kindle's Mobi PID which would allow one to buy encrypted Mobi books for Kindle.
The Kindle supports Mobipocket files directly. You don't need to write a script to do that.
A revolutionary portable reader that wirelessly downloads books, newspapers, magazines and blogs to a crisp, high-resolution electronic paper display that looks and reads like real paper, even in bright sunlight.