The Kindle only allows the reading of Amazon DRM-protected content.
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 supports Mobipocket files directly. You don't need to write a script to do that.
How do you load other eBooks onto the Kindle? Just add Amazon DRM.
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.