npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

console-epub-reader

v1.0.0

Published

控制台epub阅读器

Downloads

4

Readme

控制台EPUB阅读器

这是一个基于Node.js开发的简单控制台EPUB电子书阅读器,允许用户在终端中阅读EPUB格式的电子书。

功能特点

  • 解析EPUB格式电子书
  • 在控制台中清晰显示内容
  • 使用键盘上下箭头进行导航
  • 自动保存阅读进度
  • 显示当前阅读进度百分比

安装方法

  1. 确保已安装Node.js环境(建议v14.0.0或更高版本)
  2. 克隆或下载本项目
  3. 在项目根目录执行以下命令安装依赖:
npm install

作为npm包安装

npm install -g console-epub-reader

使用方法

  1. 在项目的epub目录下放置名为index.epub的EPUB文件
  2. 在项目根目录执行以下命令启动阅读器:
npm start
  1. 操作说明:
    • 上箭头键:上一页
    • 下箭头键:下一页
    • 按Q键:退出阅读器

项目结构

node-r/
├── epub/               # 存放EPUB文件的目录
│   └── index.epub      # 要阅读的EPUB文件(需自行放置)
├── src/                # 源代码目录
│   ├── index.js        # 程序入口文件
│   ├── parser.js       # EPUB解析器
│   └── reader.js       # 阅读器界面实现
├── .reading-progress   # 阅读进度保存文件
├── package.json        # 项目配置和依赖
└── README.md           # 项目说明文档

核心文件说明

  • index.js: 程序入口,负责初始化解析器和阅读器
  • parser.js: 实现EPUB文件的解析,提取文本内容
  • reader.js: 实现控制台界面显示和键盘交互

技术依赖

  • epub: EPUB文件解析库
  • chalk: 控制台文字颜色和样式美化

如何扩展

如果您想读取其他EPUB文件,只需将文件放入epub目录并命名为index.epub,或修改index.js中的文件路径配置。

注意事项

  • 程序默认读取项目根目录下epub/index.epub文件
  • 阅读进度会自动保存在项目根目录的.reading-progress文件中
  • 目前仅支持纯文本内容的显示,不支持图片等多媒体内容