Metrics
0
Watch 12 Star 16 Fork 3

Fan / kindle-helperJavaMIT

Sign up for free
Explore and code with more than 2 million developers,Free private repositories !:)
Sign up
kindle-helper是一个Java依赖包,它可以帮助我们快捷的生成包含封面、目录的 .mobi 电子书。 spread retract

Clone or download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README_EN.md

kindle-helper

Project Introduction

Kindle-helper is a Java dependency package that can help us quickly generate mobi e-books with cover and catalog.

Software Environment

  • JDK1.8+
  • Maven3.0+

Realization Principle

Kindle-helper builds opf and other files that are born into books through a series of template files, and then calls kindleGen to generate mobi files.

Operation Instructions

Because of the size of the package, kindleGen is not included in the dependent package, so please put kindleGen under the /bin directory of the same level of the jar package before running. You can also customize the external kindleGen directory. You can build MobiWriter through kindlegenPath.

kindleGen Official Download

Instructions

Build the Book and fill in the book chapters, then call the corresponding file generator.

Generate .mobi

Create a MobiWriter incoming Book to generate mobi. To attach a cover image, call the MobiWriter constructor of the coverUrl parameter, which currently only supports remote images.

Generate .txt

Create TxtWriter to pass in Book to generate `txt'.

Run Screenshots

demo

Code Example

Book book = new Book();
ChapterInfo chapterInfo = new ChapterInfo();
//...Assign Book and chapterInfo
book.setChapters(new ChapterInfo[]{chapterInfo});
Writer writer = new MobiWriter();
writer.generate(book, "D:\\tmp3");

See you for details.Main.java

Maven Temporary Repository

Add the following configuration to the next layer of the project element of the POM file:

<repositories>
    <repository>
        <id>mvnrepo</id>
        <name>mvn repository</name>
        <url>https://gitee.com/hf-hf/mvnrepo/blob/master</url>
    </repository>
</repositories>

Then add kindle-helper dependencies:

<dependency>
    <groupId>top.hunfan</groupId>
    <artifactId>kindle-helper</artifactId>
    <version>0.0.2</version>
</dependency>

Update records

  • v0.0.1 supports the generation of txt and mobi e-books with cover and catalogue
  • v0.0.2 mobi supports the generation of graphic section; optimizes the generation of e-book style

Comments ( 0 )

You need to Sign in for post a comment

Help Search