KindleGen is a command line tool which enables publishers to work in an automated environment with a variety of source content including HTML, XHTML or EPUB. It is a freeware eBook building application that's advanced.
Here is a screenshot to illustrate the features and user interface of this application: