0.2.2 • Published 9 months ago
@epubly/core v0.2.2
Epubly
Epubly is a blazingly-fast, Rust-powered Node.js library for EPUB editing. With its powerful and flexible API, Epubly simplifies and streamlines the process of manipulating EPUB files.
Installation
Install via NPM:
npm install @epubly/core
Usage
import { Epub } from '@epubly/core'
const epub = new Epub('./my-book.epub')
// Read filenames from epub
epub.readFileNames()
// Read the contens of specific file
epub.readFileContentByName('intro.xhtml')
// Write to epub file and export the epub
// You need to call the `epub.extract()` first.
epub.extract()
epub.writeFileContentByName('intro.xhtml', 'Hello 😀')
epub.exportFile('./modified.epub')
!NOTE
This package is designed for native ESM and doesn't support for CommonJS exports.
Contributing to Epubly
To contribute to Epubly, follow these steps:
- Fork this repository.
- Create a branch:
git checkout -b '<branch_name>'
. - Make your changes and commit them:
git commit -m '<commit_message>'
. - Push to the original branch:
git push origin '<project_name>/<location>'
. - Create the pull request.
Alternatively see the GitHub documentation on creating a pull request.
License
This library is under MIT.