Socket
Book a DemoInstallSign in
Socket

readiverse

Package Overview
Dependencies
Maintainers
0
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

readiverse

A library for reading and parsing multiple eBook and document formats.

0.1.0
latest
Source
npmnpm
Version published
Maintainers
0
Created
Source

Readiverse.js

Readiverse.js is a JavaScript library designed for reading and parsing multiple eBook and document formats, starting with .mobi and .djvu, with plans for future support of additional formats.

Features

  • 📖 MOBI Reader: Parse and extract content from .mobi files, including metadata, text, and images.
  • 📚 DJVU Reader: Load and display .djvu documents. (WIP..)

Installation

To install Readiverse.js, use npm:

npm install readiverse

Usage

Here's a simple example of how to use Readiverse.js to load a .mobi file:

import { MobiFileReader } from "./mobi";
import * as fs from 'fs';

const FILE_NAME = `assets/sample1.mobi`;

const view = new DataView(fs.readFileSync(FILE_NAME, null).buffer)
const mobi = new MobiFileReader(view);

const td = new TextDecoder("utf-8");
const html = td.decode(mobi.readText())

API

MobiFileReader

new MobiFileReader(file) Creates a new instance of the MobiFileReader with the provided file.

readText() Parses the .mobi file and returns an object containing metadata, content, and images.

Roadmap

  • MOBI file support
  • DJVU file support

Contributing

We welcome contributions! If you'd like to improve the library or add new features, feel free to submit a pull request or open an issue.

License

This project is licensed under the MIT License.

Keywords

mobi

FAQs

Package last updated on 14 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.