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 🙏

© 2024 – Pkg Stats / Ryan Hefner

yuque-exporter

v1.0.2

Published

export yuque to local markdown

Downloads

11

Readme

yuque-exporter

用于批量导出语雀文档。

为什么?

语雀的定位改变为创作工具,而不在是内容社区,相应的新的付费策略,也会造成了免费用户无法继续用语雀作为自己的个人博客。(相关讨论传送门

因此我们需要有一个把创作完的文档发布到其他平台的工具,故抽空写了该项目,可以方便的把语雀的内容批量导出为本地 Markdown,从而可以进一步发布到 GitHub 等平台。

本项目开发过程中,也收到了语雀同学的不少指导和建议。

如何使用

需提前申请语雀 TOKEN,请参考文档

$ YUQUE_TOKEN=<your_token> npx yuque-exporter

更详细的命令行说明参见:Help

技术内幕

调用语雀 API -> 存储所有元数据 -> 根据 TOC 构建本地目录 -> 文件内容处理(下载图片、替换链接等)

https://www.yuque.com/yuque/developer/api

$ npm i

$ YUQUE_TOKEN=<your token> npm start

$ ls output

TODO List

  • 命令行工具
    • [x] 提供命令行支持
  • 目录结构
    • [x] ~~文件名用 slug 还是中文名?~~ 因为目录是中文的,先用全中文,回头提供配置
    • [ ] 文件名存在非法字符的特殊处理
    • [x] ~~草稿文件写入到 draft 目录~~ 草稿直接在根目录,方便相对链接
    • [x] 优化 TOC 的处理
    • [ ] 如何排序?
  • 正文的处理
    • [x] 支持 frontmatter
    • [x] 下载图片、画板
    • [ ] ~~下载附件~~ 需要登录才能下载,暂时无法支持
    • [x] 替换文档链接为相对链接
    • [x] 替换多余的 HTML 标签,如 <br/>
  • 增强特性
    • [ ] 支持多账号和团队文档的下载
    • [ ] 对 obsidian 的更多支持
  • 其他
    • [ ] API 调用受限时提示用户(目前 5000 次/小时)
    • [ ] 单元测试