Write .mobi files by hand?
So far I've written .epub files myself, with the help of some hand-crafted scripts that digest larger content. That was a good exercise to learn the file format and about eBooks in general. Now I move forward to EPUB3 but that's for another thread.
Given the validated .epub file, I have used kindlegen and Calibre to generate a .mobi file, both of which have produced rather poor results for one book or another.
So I'm at the point where I'd like to build a .mobi book by hand, look through all the files, structure, and the assembling process that delivers the final eBook. And I'm looking for documentation on this. The wiki here seems to contain a lot, but I haven't found an "easing into" sort of thing.
Does anybody have pointers, hints, experiences, etc as to how to go about this?