dsh-bili-watch 0.2.11 → 0.2.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/index.js +2 -2
- package/package.json +3 -2
- package/tools/look.mjs +2 -0
package/README.md
CHANGED
|
@@ -129,7 +129,7 @@ macOS/Linux 的 ffmpeg 用系统包管理器装,脚本只给提示。其余目
|
|
|
129
129
|
| `asr <BV或URL>` | 本地转写音频 |
|
|
130
130
|
| `frames <BV或URL> [--step 秒] [--ocr]` | 抽帧;`--ocr` 顺带识别画面文字 |
|
|
131
131
|
| `ocr <BV>` | 抽帧并 OCR |
|
|
132
|
-
| `text <BV或URL> [--format
|
|
132
|
+
| `text <BV或URL> [--format json]` | 四级链:字幕 → 转写 → 抽帧 OCR;`--format json` 带上时间轴口径(字幕 exact,转写与 OCR 是估算);SRT 只有 `sub` 支持 |
|
|
133
133
|
| `sheet <BV> [--grid 3x3]` | 均匀挑帧拼成一张图(`NxM` 如 `3x3`、`4x4`,默认 9 帧) |
|
|
134
134
|
| `substrip <BV> [--step 秒]` | 底部字幕竖拼成一张图 |
|
|
135
135
|
| `danmaku <BV>` | 弹幕热区(按时间桶统计峰值) |
|
package/index.js
CHANGED
|
@@ -602,7 +602,7 @@ function apply(ctx) {
|
|
|
602
602
|
name: 'bili',
|
|
603
603
|
description: '看 B 站视频内容:字幕 → 本地转写 → 抽帧 OCR,输出最可信的一份文本',
|
|
604
604
|
input: {
|
|
605
|
-
hint: '<search 关键词|hot|peek|view|sub|comments|danmaku|asr|frames|sheet|substrip|ocr|text|login|clean> [BV] [--p N] [--step 2] [--days 3] [--order pubdate|click] [--cred 凭证路径] [--fast] [--scene] [--grid 3x3] [--format srt|json] [--out
|
|
605
|
+
hint: '<search 关键词|hot|peek|view|sub|comments|danmaku|asr|frames|sheet|substrip|ocr|text|login|clean> [BV] [--p N] [--step 2] [--days 3] [--order pubdate|click] [--cred 凭证路径] [--fast] [--scene] [--grid 3x3] [--format srt|json] [--out 文件(需配合 --format)]',
|
|
606
606
|
},
|
|
607
607
|
handler: async (invocation) => {
|
|
608
608
|
const { command, bv, extra } = parseCommandLine(invocation?.rawInput)
|
|
@@ -711,7 +711,7 @@ function apply(ctx) {
|
|
|
711
711
|
},
|
|
712
712
|
out: {
|
|
713
713
|
type: 'string',
|
|
714
|
-
description: 'command=sub/text 且传了 format
|
|
714
|
+
description: 'command=sub/text 且传了 format 时,把结果写到这个文件(只接受工作区内的相对路径);不传打印到标准输出。',
|
|
715
715
|
},
|
|
716
716
|
limit: {
|
|
717
717
|
type: 'number',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-bili-watch",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.12",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Reads Bilibili (and generic URLs via yt-dlp) into text for DSH agents: search, hot, metadata, comments, danmaku, AI subtitles, local ASR, frame OCR.",
|
|
6
6
|
"type": "module",
|
|
@@ -34,7 +34,8 @@
|
|
|
34
34
|
"scripts/",
|
|
35
35
|
"deps/.gitkeep",
|
|
36
36
|
"deps/_bili-asr.py",
|
|
37
|
-
"auto-trigger.js"
|
|
37
|
+
"auto-trigger.js",
|
|
38
|
+
"LICENSE"
|
|
38
39
|
],
|
|
39
40
|
"keywords": [
|
|
40
41
|
"bilibili",
|
package/tools/look.mjs
CHANGED
|
@@ -1171,6 +1171,7 @@ async function cmdLogin(opts = {}) {
|
|
|
1171
1171
|
}
|
|
1172
1172
|
if (r.state === 'expired') {
|
|
1173
1173
|
console.log('\n✗ 二维码已过期,重新跑 node look.mjs login')
|
|
1174
|
+
process.exitCode = 1
|
|
1174
1175
|
return
|
|
1175
1176
|
}
|
|
1176
1177
|
if (r.state !== last) {
|
|
@@ -1180,6 +1181,7 @@ async function cmdLogin(opts = {}) {
|
|
|
1180
1181
|
await sleep(3000)
|
|
1181
1182
|
}
|
|
1182
1183
|
console.log('\n✗ 超时(5 分钟),重新跑 node look.mjs login')
|
|
1184
|
+
process.exitCode = 1
|
|
1183
1185
|
return
|
|
1184
1186
|
}
|
|
1185
1187
|
|