|  05-21-2012, 09:55 PM | #1 | 
| Member  Posts: 11 Karma: 10 Join Date: May 2012 Device: Kindle | 
				
				Viewing the source code for converting html to mobi.
			 
			
			Hi guys, I have recently posted a question for finding the source code for converting html to mobi. The answer was use html2mobi. Unfortunately this does not support UTF-8 encoding. So where exactly is the calibre source code for converting a html document to a mobi format. | 
|   |   | 
|  05-21-2012, 11:09 PM | #2 | 
| Bookaholic            Posts: 14,391 Karma: 54969924 Join Date: Oct 2007 Location: Minnesota Device: iPad Mini 4, AuraHD, iPhone XR + | 
			
			You can find info on getting the Calibre source here... http://manual.calibre-ebook.com/develop.html | 
|   |   | 
| Advert | |
|  | 
|  05-23-2012, 01:23 AM | #3 | 
| Member  Posts: 11 Karma: 10 Join Date: May 2012 Device: Kindle | 
			
			I have the calibre source code but my issue is that i am unable to figure out where exactly the source code for converting html to mobi format is and what its dependencies are . I find that it is not very well documented and i have no clue as to what to do with the source code- That is what the starting point is and where the command line wrappers are. ( I do not require any gui . Just a simple commandline interface with the code for converting html to mobi. No other features are required.)
		 | 
|   |   | 
|  05-23-2012, 03:12 PM | #4 | 
| Wizard            Posts: 1,337 Karma: 123457 Join Date: Apr 2009 Location: Malaysia Device: PRS-650, iPhone | 
			
			The conversion process is described here: http://manual.calibre-ebook.com/conv...tml#conversion To abbreviate that discussion even further, Calibre takes any of the input formats it supports, converts that input to OEB, and then converts from OEB to the specified output format. In terms of where the code is - the starting point of the code for the CLI utilities is in calibre.ebooks.conversion.cli, as described here: http://manual.calibre-ebook.com/deve...ml#code-layout Since you specifically mentioned converting html to mobi, the two main bits of code you may want to check out are the html input plugin and the mobi output plugin. The format plugin folders are under calibre.ebooks.format_name, i.e.: calibre.ebooks.mobi.writer2 (or writer8 for KF8) - mobi output, many other files relating to mobi support are in the mobi folder. and: calibre.ebooks.html.input - html input. There are many steps in between input and output, so you'll need more specific questions regarding other aspects of the code. | 
|   |   | 
|  | 
| 
 | 
|  Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| Source code for converting html to mobi | Thisiswhatiam | Kindle Formats | 10 | 06-04-2012 02:47 PM | 
| Converting HTML to EBUB to MOBI | krnchunsa86 | Conversion | 3 | 11-04-2011 07:55 PM | 
| HTML to epub displays munged source code | haven | Conversion | 4 | 03-10-2011 10:08 PM | 
| Problem converting HTML to Mobi | AprilHare | Calibre | 3 | 05-02-2009 09:34 PM | 
| Converting HTML to Mobi? | Sonist | Calibre | 5 | 02-10-2009 01:23 PM |