mirror of
https://github.com/szdytom/nyanpasu.git
synced 2025-10-20 01:20:16 +00:00
rename cli option --no-cache to --skip-cache
Signed-off-by: szdytom <szdytom@qq.com>
This commit is contained in:
parent
e8d5caca9e
commit
4e01cd5fbd
@ -10,7 +10,7 @@
|
|||||||
- 视频下载器:喵帕斯解析器可以找到视频播放的链接,并生成用于批量下载视频的链接文件。但是实际的下载过程不是由喵帕斯解析器完成的(而是依赖于 [yt-dlp](https://github.com/yt-dlp/yt-dlp)),如果你仅仅希望下载某一视频,你可能希望直接使用 [yt-dlp](https://github.com/yt-dlp/yt-dlp) 脚本。
|
- 视频下载器:喵帕斯解析器可以找到视频播放的链接,并生成用于批量下载视频的链接文件。但是实际的下载过程不是由喵帕斯解析器完成的(而是依赖于 [yt-dlp](https://github.com/yt-dlp/yt-dlp)),如果你仅仅希望下载某一视频,你可能希望直接使用 [yt-dlp](https://github.com/yt-dlp/yt-dlp) 脚本。
|
||||||
- 弹幕播放器:喵帕斯解析器可以帮助你生成用于正确保存视频和弹幕的脚本,但是喵帕斯解析器不能理解视频或弹幕文件,如果你希望播放视频和弹幕,你可能希望使用 [KikoPlay](https://github.com/KikoPlayProject/KikoPlay) 或者其他类似的软件。
|
- 弹幕播放器:喵帕斯解析器可以帮助你生成用于正确保存视频和弹幕的脚本,但是喵帕斯解析器不能理解视频或弹幕文件,如果你希望播放视频和弹幕,你可能希望使用 [KikoPlay](https://github.com/KikoPlayProject/KikoPlay) 或者其他类似的软件。
|
||||||
- DRM破解器:喵帕斯解析器没有任何魔法帮助你查看或破解你无权查看的数据和视频,喵帕斯解析器只能下载和分析公开的数据。
|
- DRM破解器:喵帕斯解析器没有任何魔法帮助你查看或破解你无权查看的数据和视频,喵帕斯解析器只能下载和分析公开的数据。
|
||||||
- 面向最终用户的应用程序:喵帕斯解析器不包含一个图形用户界面,它仅仅是基于命令行的,可能需要一定的计算机素养才能正确使用它。
|
- 面向小白的应用程序:喵帕斯解析器不包含一个图形用户界面,它仅仅是基于命令行的,可能需要一定的计算机素养才能正确使用它。它在设计时优先考虑到在脚本或批处理任务中使用的情况。
|
||||||
|
|
||||||
## 安装
|
## 安装
|
||||||
|
|
||||||
|
14
package.json
14
package.json
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "nyanpasu",
|
"name": "nyanpasu",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "0.1.2",
|
"version": "0.1.3",
|
||||||
"description": "BiliBili 番剧视频和弹幕元数据解析脚本",
|
"description": "BiliBili 番剧视频和弹幕元数据解析脚本",
|
||||||
"main": "src/index.mjs",
|
"main": "src/index.mjs",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@ -21,5 +21,15 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@vercel/ncc": "^0.38.1"
|
"@vercel/ncc": "^0.38.1"
|
||||||
}
|
},
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/szdytom/nyanpasu/issues"
|
||||||
|
},
|
||||||
|
"homepage": "https://github.com/szdytom/nyanpasu#readme",
|
||||||
|
"keywords": [
|
||||||
|
"cli",
|
||||||
|
"script",
|
||||||
|
"bilibili",
|
||||||
|
"application"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
@ -234,7 +234,7 @@ async function processDescriptor(rawDesc, includePv, minDuration) {
|
|||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
const args = yargs(hideBin(process.argv))
|
const args = yargs(hideBin(process.argv))
|
||||||
.option('no-cache', {
|
.option('skip-cache', {
|
||||||
description: 'Ignore local cache.json',
|
description: 'Ignore local cache.json',
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
default: false,
|
default: false,
|
||||||
@ -259,10 +259,10 @@ async function main() {
|
|||||||
description: 'Suppress warning of not inside a TMUX session',
|
description: 'Suppress warning of not inside a TMUX session',
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
default: false,
|
default: false,
|
||||||
}).usage('Uasge: <url>').version('0.1.2').help().alias('help', 'h').argv;
|
}).usage('Uasge: <url>').version('0.1.3').help().alias('help', 'h').argv;
|
||||||
const url = args._[0];
|
const url = args._[0];
|
||||||
enableLogging = !args.quiet;
|
enableLogging = !args.quiet;
|
||||||
if (args.skipUrl && args.noCache) {
|
if (args.skipUrl && args.skipCache) {
|
||||||
console.error('There is nothing to do.');
|
console.error('There is nothing to do.');
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
@ -272,7 +272,7 @@ async function main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let rawDesc;
|
let rawDesc;
|
||||||
if (args.noCache) {
|
if (args.skipCache) {
|
||||||
info('Downloading descriptor info (no cache)');
|
info('Downloading descriptor info (no cache)');
|
||||||
rawDesc = await fetchDescriptor(url);
|
rawDesc = await fetchDescriptor(url);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user