Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Development

Notices

Reply
 
Thread Tools Search this Thread
Old 05-21-2012, 09:55 PM   #1
Thisiswhatiam
Member
Thisiswhatiam began at the beginning.
 
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.
Thisiswhatiam is offline   Reply With Quote
Old 05-21-2012, 11:09 PM   #2
AnemicOak
Bookaholic
AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.
 
AnemicOak's Avatar
 
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
AnemicOak is offline   Reply With Quote
Advert
Old 05-23-2012, 01:23 AM   #3
Thisiswhatiam
Member
Thisiswhatiam began at the beginning.
 
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.)
Thisiswhatiam is offline   Reply With Quote
Old 05-23-2012, 03:12 PM   #4
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
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.
ldolse is offline   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 03:52 PM.


MobileRead.com is a privately owned, operated and funded community.