tkosminov / epub-parser

Simple epub parser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

simple-epub-parser

Installation

npm i epub-parser-simple

Usage

import fs from 'fs';

import { parseEpub } from 'epub-parser-simple'

const file_path = `${__dirname}/${file_name}.epub`;
const buffer = fs.readFileSync(file_path);

const parsed_book = await parseEpub(buffer)

fs.writeFile(`${__dirname}/${file_name}.json`, JSON.stringify(parsed_book, null, 2), 'utf8', () => {});

About

Simple epub parser

License:MIT License


Languages

Language:TypeScript 94.5%Language:JavaScript 5.5%