If you could write your own HTML-to-MOBI converter, an HTML-to-EPUB converter should be a piece of cake (in case you don't want to use already existing software like Sigil or calibre). ePub is just a zipped collection of (X)HTML files, plus a couple of XML metadata files. Modifying the HTML in an ePUB is just a matter of replacing the zipped file inside.
If you don't have the original HTML files or you are concerned about the metadata, you could give calibre's ebook-convert a try. I haven't tried it myself, but I guess it'll be pretty decent.
PS. But I don't think Amazon will use ePub, they'll probably use some concoction like AZW3...
|