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

woap

v1.1.1

Published

> woap - WeChat Official Accounts Platform

Downloads

15

Readme

woap

woap - WeChat Official Accounts Platform

通过给 GitHub Discussions 打标签生成微信文章(支持二维码及脚注形式)

背景

如果要把 GitHub Discussions 上的话题同步到微信公众号,链接是无法直接在微信内打开的。为了增加用户体验,所以将链接转为二维码或脚注形式。

安装

# 全局安装
npm i -g woap

用法

# 查看帮助
woap -h

# 例如
woap --owner=lencx --repo=z --token=your_github_token --root=docs --qrcode-tip=识别二维码

参数

usage: woap

options:
  --owner:     GitHub 用户名(username)

  --repo:      需要生成微信文章的 GitHub 仓库名(请确保已经开启 Discussions)
               `Repository -> Settings -> Options -> Features -> Discussions`

  --token:     GitHub API 请求需要用到,获取 GitHub Token -> `https://github.com/settings/tokens/new`

  --root:      生成文章的根目录, 默认值为 `posts`

  --ignore:    忽略符合正则规则下的链接, 默认值匹配所有链接,例如:`--ignore=".(gif|mp4)$"`

  --ext:       生成文件的扩展名, 默认值为 `html`,可选值 `md` 或 `html`

  --tip:       二维码提示文案,默认值为 `长按识别二维码查看原文`

  --title:     文章的脚注标题,默认值为 `参考资料`

  --labels:    需要生成微信文章的 labels,多个 labels 使用英文逗号 `,` 分割,内置 `wechat-link,wechat-post`
               新增的 labels 只能生成微信脚注类的文章
               - wechat-link: 生成微信二维码文章(将链接转为二维码)
               - wechat-post: 生成微信脚注文章(将链接转为脚注)

Discussions 如何打标签

discussions

项目示例

  • 如果属于资源聚合类(链接列表),推荐使用 wechat-link 标签,生成二维码形式
  • 如果属于博客文章类,推荐使用 wechat-post 标签,生成脚注形式

GitHub Actions

配合 GitHub Actions 使用,每天定时生成

截图预览

点击页面右上角的公众号按钮,则复制文章到剪贴板,前往公众号粘贴即可(如果二维码过多,复制到公众号,可能会有上传失败的几率,建议把失败的二维码手动做替换,暂时无法确定图片上传失败原因)。

  • 二维码形式

  • 脚注形式


视频演示

微信群

欢迎进群交流相关问题及更多 GitHub 使用小技巧,如果二维码过期,可以关注公众号《浮之静》,发送“进群”,我将拉你进群一起学习。

License

MIT License © 2021 lencx