Skip to content

A small util to convert epub from Simplified Chinese to Traditional Chinese

License

Notifications You must be signed in to change notification settings

htbkoo/epub-chinese-converter

Repository files navigation

epub-chinese-converter npm GitHub Workflow Status

A small util to convert epub files from Simplified Chinese to Traditional Chinese

Installation

npm install epub-chinese-converter --save

Usage

(See the test files under src/ for details)

  • Read epub file:
import {readEpub} from "epub-chinese-converter";
const book = await readEpub(BOOK_URL);
const { metadata, chapters } = book;
  • Conversion
import {createSimplifiedToTraditionalConverter} from "epub-chinese-converter";
const converter = createSimplifiedToTraditionalConverter();
const convertedBook = converter.convertBook(book);
const { metadata, chapters } = convertedBook;

Limitations

  1. As of now, only translation from Simplified Chinese to Traditional Chinese is supported

Inlined dependencies

  1. julien-c/epub
  2. cthackers/adm-zip
    1. patched with this commit (027f6d1) to fix issue when reading epub file

About

A small util to convert epub from Simplified Chinese to Traditional Chinese

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published