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

lchl

v1.1.3

Published

取消了账号密码登录方式,改用 cookie 登录

Downloads

11

Readme

2023-09-08 更新

取消了账号密码登录方式,改用 cookie 登录

所以需要各位在网页上去获取 session 设置到 action 变量中

新增一个名为 SESSION 的变量

Alt text

值为力扣站点下的 LEETCODE_SESSION 这个 cookie

Alt text

设置完成之后可以手动执行一下 试试效果

cookie 失效之后需要重新设置

力扣辅助

自动完成每日任务领取积分

首先拉取用户已下发的任务, 下面的任务没有的会跳过执行

  • 日常登录 1 积分

  • 阅读 3 篇题解 1 积分(暂时取消)

  • 每日登录领取 1 积分

  • 保存一则学习笔记 3 积分

  • 阅读 3 章 LeetBook 领取 2 积分

  • 获取 2 本免费的 LeetBook 领取 3 积分

  • 点赞一则 LeetBook 讨论 领取 1 积分

开发

环境安装

# clone project
git clone https://github.com/xjq7/lc-helper

# cd folder
cd lc-helper

# 安装 pnpm, 已安装的话就跳过
npm install pnpm -g

# 依赖安装
pnpm install

本地调试

pnpm dev <session>

命令行工具调试

# 编译
pnpm tsc

# link 到全局
npm link --force

# 运行
lchl start <session>

使用

目前只支持账号密码登录

命令行工具使用

# 全局安装
npm install -g lchl
# or
yarn global add lchl

# 运行
lchl start <session>

# example
lchl start 你的 session cookie

定时任务执行

通过 Github Action 每天凌晨 00:50 分自动执行, 需要提前配置账号密码在 Action Secret 中

  1. fork 本项目

  2. 配置账号密码用于工具登录

    创建 Github action Secret

    进入你 fork 的项目, 找到 Settings - Security - Secrets - Actions

然后 点击新建 New repository secret

填写一个 Name 为 SESSION 的 key, Secret 为你的 session cookie, session cookie 的获取方式请看 README 顶部

Alt text

  1. 在 Action 中手动触发验证

点击 Actions, 找到定时任务 auto action runner

第一次接入手动触发任务测试是否有问题

点击 Run workflow 手动触发任务

点击进入 当前执行的 Action 中查看日志

run 环节会打印执行结果

后续每天 00:50 自动执行, 时间可能有误差, 00:50 ~ 01:00 之间