posastuff.blogg.se

Kindle mobi
Kindle mobi










kindle mobi

We need an HTML file, in order to be able to generate MOBI ( we need it to be able to invoke the command line tool, in - memory representation is not enough ) - so we check if the HTML file already exists on the disk, if not, we write it. We cast the object to IMobi, then we get the path of the / kindlegen / folder ( which if you remember we copied to our web app ). Public class MobiMediaTypeFormatter : MediaTypeFormatter ``` So what happens here - step by step : 1.

kindle mobi kindle mobi

My model is similar to what I used in other tutorials: You should copy the Kindlegen tool to the root of the website, into “kindlegen” folder. Our application will be a simple Web API application, off the MVC4 template in VS2010. In fact I’ll just use some HTML copied from this very blog, and as you’ll see Kindlegen works with pretty much anything (it just might not be perfectly sharply formatted). I will not focus on that at all here, as that’s not the scope of the article. It contains all kinds of information about how to format the HTML file in order for the generated ebook to be of highest quality. C:/Tools/kindlegen>kindlegen.exe "name\_of\_the_html.html"Īnother useful link would be the. It is very simple to use - just takes a name of the HTML file as an argument and generates the MOBI file in the same folder. Of course to start off you need to have Kindlegen. We’ll use that - it’s a hacky solution but it sure is a lot of fun. On the other hand, Amazon has created a proprietary tool called, which is a command line tool, and allows you to convert HTML into MOBI. Unfortunately MOBI format (used by Kindle) is not that easy to support from C#, as to my knowledge there is no ready-made DLL port or SDK available. So I had this crazy idea - CLR to Kindle? Why not.

kindle mobi

Obviously, Web API facilitates those types of apps really well, as data can be exposed in a magnitude of formats. Recently, I’ve been working a little on an application that allows users to save, tag, bookmark links for later reading - that kind of stuff.












Kindle mobi