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-data-helper

v0.2.11

Published

Helper for Bangumi Data

Downloads

68

Readme

Bangumi Data Helper

Node version NPM version License

Bangumi Data Helper 是一个命令行辅助工具,用于简化 Bangumi Data 的数据维护工作。bdh 可以完成大多数的重复性工作,但由于各个站点各个信息的不确定因素较多,爬取到的结果还需人工审核一遍。

Installation

npm i -g bangumi-data-helper

适用于 Bangumi Data version

Usage

需要在 bangumi-data 项目目录下运行。

# 查看帮助
bdh --help
# 生成某季度的初始数据
bdh create 2016q4
# 更新某月的番组数据
bdh update 201610
# 交互式地手动增加某月的放送站点
bdh edit 201610
# 补完某站的所有番剧
bdh hokan iqiyi
# 补充所有 end 字段为空的番剧
bdh end
# 使用代理
HTTP_PROXY=http://127.0.0.1:1087 bdh hokan nicovideo

bdh create <season>

该命令会根据 cal.syoboi.jp 的数据,创建指定季度的初始数据,包括日文标题、英文标题、官网、放送开始时间、番剧类型、Bangumi.tv 对应条目。有些番组不包含放送开始时间,这些数据会被放入 data/items/0000/00.json 待人工处理。

bdh update <month>

在添加维护放送站点信息时,可以在 sites 数组中添加番剧页面链接或包含 siteid 信息的对象,例如:

{
  // ...
  "sites": [
    "http://www.iqiyi.com/a_19rrh9uqb5.html",
    // 或者
    {
      "site": "iqiyi",
      "id": "a_19rrh9uqb5"
    }
  ]
}

在当前文件修改完后,可以运行该指令把当前文件所有番剧的 sites 数组处理成符合规范的格式,非模型定义的字段会被自动去除。注意,由于部分站点放送开始时间为无规律的中文,难以用程序解析,需要手动转换。

bdh edit <month>

交互式地手动添加番剧放送站点信息。

bdh hokan <site>

hokan 即为补完(番組補完計画),其工作模式为:爬取到某站所有的番剧数据,然后自动过滤掉已存在于 bangumi-data 的番剧和排除列表里的番剧,剩下的就是待添加或待排除的番剧。

执行该指令后,会在 data/items/0000/<site>.json 下输出待补完数据。复制番剧对象到 sites 数组中按 bdh update <month> 继续后续流程。对于非正常番剧(如乱入的站方自制节目、特典、广播剧、舞台剧、特摄、真人版等),请 PR 添加到排除列表

bdh end

运行该指令将寻找所有 end 字段为空的番剧并尝试补充。只会补充放送结束时间在本月之前的番剧,也就是说,某番剧本月 1 日完结,在本月 30 日运行该指令是无效的。

Status

下表列举了当前自动化情况,✔️表示可以自动获取,✖️表示不能,⭕表示需要手动修改。

| site | begin | 补完 | | --------- | ----- | --- | | acfun | ✔️ | ✔️ | | bilibili | ✔️ | ✔️ | | iqiyi | ✔️ | ✔️ | | letv | ✖️ | ✔️ | | mgtv | ✔️ | ✔️ | | netflix | ✔️ | ✔️❓| | nicovideo | ✔️ | ✔️ | | pptv | ⭕ | ✔️ | | qq | ⭕ | ✔️ | | sohu | ⭕ | ✔️ | | youku | ✔️ | ✔️ |