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

clear-zlib

v0.1.0

Published

Clean up z-library suffixes from ebook filenames

Readme

clear-zlib

清理电子书文件名中的 z-library 后缀

一个命令行工具,用于移除从 z-library 下载的电子书文件名中令人烦恼的后缀,如 (z-library.sk)(1lib.sk)(z-lib.sk)

问题

从 z-library 下载电子书时,文件名经常带有不需要的后缀:

设计模式.(z-library.sk).pdf
JavaScript高级程序设计.(1lib.sk).epub
代码大全.(z-lib.sk).mobi

这个工具可以自动清理它们:

设计模式.pdf
JavaScript高级程序设计.epub
代码大全.mobi

安装

npm install -g clear-zlib

使用方法

重命名单个文件

clear-zlib "书名 (z-library.sk).pdf"
# → 重命名为: 书名.pdf

处理目录

clear-zlib ./books/
# → 清理目录中的所有文件

递归处理

clear-zlib ./books/ -r
# → 清理目录及子目录中的所有文件

详细模式

clear-zlib ./books/ --verbose
# → 显示所有处理的文件,包括已跳过的

预览模式

clear-zlib "书名 (z-lib.sk).epub"
# → 打印: 书名.epub(当文件不存在时)

选项

| 选项 | 描述 | |------|------| | -h, --help | 显示帮助信息 | | -v, --version | 显示版本和作者 | | -V | 仅显示版本号 | | -r, --recursive | 递归处理目录 | | --verbose | 显示详细输出 |

支持的后缀

  • (z-library.sk)
  • (1lib.sk)
  • (z-lib.sk)
  • (zlibrary)
  • (1library)
  • (z-lib)
  • (singlefile)
  • 多个后缀: (z-library.sk, 1lib.sk, z-lib.sk)

示例

# 单文件
clear-zlib "设计模式 (z-library.sk).pdf"

# 批量处理
clear-zlib ~/Downloads/ebooks/

# 递归处理并显示详情
clear-zlib ~/Documents/books/ -r --verbose

# 查看版本
clear-zlib -v

开发

# 运行测试
npm test

# 本地测试
npm link
clear-zlib "测试 (z-library.sk).pdf"

作者

@Anson Ho

许可证

MIT