简体   繁体   English

使用C#以编程方式创建Kindle书?

[英]Create Kindle book programmatically using C#?

I have an idea for a project but it will require being able to create Kindle books on the fly on the server and preferably in .net. 我有一个项目的想法,但它需要能够在服务器上动态创建Kindle书籍,最好是.net。

I haven't found any libraries to do this however. 但是,我没有找到任何库来执行此操作。 I see that there are epub libraries, but these would then still need to be converted to azw. 我看到有epub库,但是这些仍然需要转换为azw。

Is this possible, and if so does anyone have any pointers please? 这有可能,如果有的话,有人有任何指示吗?

I am doing something similar. 我正在做类似的事情。 One way to go about it is: 一种方法是:

  1. Create a specially formatted HTML file with your book (see info on kindle formatting guides below); 使用您的书创建一个特殊格式的HTML文件(请参阅下面的kindle格式指南信息); and
  2. Use the command line Amazon KindleGen tool to generate the eBook. 使用命令行Amazon KindleGen工具生成eBook。

As far as creating things like the Table of Contents, starting chapters on a new page, and other things that can be accomplished in a Kindle eBook, you may want to read a kindle formatting guide, such as the Amazon Kindle Publishing Guidelines . 至于创建目录,在新页面上开始章节以及可以在Kindle电子书中完成的其他内容,您可能需要阅读点燃格式指南,例如亚马逊Kindle发布指南

Also, you may want to read a book by a third party on the subject. 此外,您可能希望由第三方阅读有关该主题的书籍。 I have personally read Kindle Formatting by Joshua Tallent and How to Format Perfect Kindle Books by Steven Lewis and they both contain the information needed for properly formatting a kindle book using an HTML file. 我亲自阅读了Joshua Tallent的Kindle Formatting和Steven Lewis的如何格式化完美的Kindle Books,它们都包含使用HTML文件正确格式化kindle book所需的信息。 You can obtain both books from Amazon. 您可以从亚马逊获得这两本书。 The Tallent and Lewis books are aimed at authors that may have never created an HTML file by hand and guide you thru the process. Tallent和Lewis的书籍针对那些可能从未创建过HTML文件的作者,并指导您完成整个过程。

You can try with Calibre . 您可以尝试使用Calibre It has support for .mobi file format. 它支持.mobi文件格式。

If you are already able to create an EPUB file, use the Calibre command line tool ebook-convert.exe: 如果您已经能够创建EPUB文件,请使用Calibre命令行工具ebook-convert.exe:

ebook-convert.exe c:\file.epub c:\file.mobi --output-profile=kindle

As an alternative, you can produce PDF files, as they are supported by Kindle. 作为替代方案,您可以生成PDF文件,因为它们受Kindle支持。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM