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

bangumi-tv

v1.0.2

Published

render your bangumi.tv progress on a static web page

Downloads

13

Readme

BangumiTV

在静态页面中渲染你的 Bangumi 追番进度

一个基于 Vercel Severless Function 的 Bangumi.tv 追番进度展示页面

起源

Demo

  • https://bangumi-tv.vercel.app

安装

后端安装

方案一:Vercel

  1. Fork 本项目
  2. 在本项目 Settings -> Secrets -> Actions 中点击 New repository secretNameBANGUMI_USERValue你的 bgm.tv 的用户名,之后点击 Add secret 按钮
  3. 前往 Vercel 官网注册或登录。 在 Vercel Dashboard 中点击 New Project,授权 GitHub,选择账户下 Fork 出来的本项目,点击 Deploy 完成部署。
  4. 记录下 Vercel 分配的 Production 域名 ( 如 bangumi-tv.vercel.app )

⚠️Github Action 会每两小时读取用户收藏状况生成数据,如需要可在。github/workflows/buildSubject.yml 中修改 cron

方案二:自建服务器

  1. Clone 本项目
  2. 安装 Node 环境
  3. 运行 npm installpnpm install 安装依赖
  4. 设置环境变量
echo "BANGUMI_USER={你的 bgm.tv 用户名}" >> .env
  1. 生成追番数据 npm run buildSubject 或者 pnpm buildSubject
  2. 启动服务 npm run start 或者 pnpm start
  3. 服务运行在 localhost:3000 上,服务器域名,SSL 等自行设置

前端安装

在需要添加追番列表的页面中直接引入 CSS 。

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bangumi-tv@latest/dist/bangumi.css">
<script>
  const bgmConfig = {
      apiUrl: "https://bangumi-tv.vercel.app",   // 替换成自己的后端域名
      quote: "生命不止,追番不息!"
    }
</script>

</body> 之前引入 JS

<script src="https://cdn.jsdelivr.net/npm/bangumi-tv@latest/dist/bangumi.js"></script>

引入完成后在需要添加番剧进度的地方添加容器

<div class="bgm-container">
</div>

感谢❤️