Skip to content

Commit

Permalink
rename cli option --no-cache to --skip-cache
Browse files Browse the repository at this point in the history
Signed-off-by: szdytom <[email protected]>
  • Loading branch information
szdytom committed Dec 30, 2023
1 parent e8d5cac commit 4e01cd5
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
- 视频下载器:喵帕斯解析器可以找到视频播放的链接,并生成用于批量下载视频的链接文件。但是实际的下载过程不是由喵帕斯解析器完成的(而是依赖于 [yt-dlp](https://github.com/yt-dlp/yt-dlp)),如果你仅仅希望下载某一视频,你可能希望直接使用 [yt-dlp](https://github.com/yt-dlp/yt-dlp) 脚本。
- 弹幕播放器:喵帕斯解析器可以帮助你生成用于正确保存视频和弹幕的脚本,但是喵帕斯解析器不能理解视频或弹幕文件,如果你希望播放视频和弹幕,你可能希望使用 [KikoPlay](https://github.com/KikoPlayProject/KikoPlay) 或者其他类似的软件。
- DRM破解器:喵帕斯解析器没有任何魔法帮助你查看或破解你无权查看的数据和视频,喵帕斯解析器只能下载和分析公开的数据。
- 面向最终用户的应用程序:喵帕斯解析器不包含一个图形用户界面,它仅仅是基于命令行的,可能需要一定的计算机素养才能正确使用它。
- 面向小白的应用程序:喵帕斯解析器不包含一个图形用户界面,它仅仅是基于命令行的,可能需要一定的计算机素养才能正确使用它。它在设计时优先考虑到在脚本或批处理任务中使用的情况

## 安装

Expand Down
14 changes: 12 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "nyanpasu",
"type": "module",
"version": "0.1.2",
"version": "0.1.3",
"description": "BiliBili 番剧视频和弹幕元数据解析脚本",
"main": "src/index.mjs",
"scripts": {
Expand All @@ -21,5 +21,15 @@
},
"devDependencies": {
"@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"
]
}
8 changes: 4 additions & 4 deletions src/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ async function processDescriptor(rawDesc, includePv, minDuration) {

async function main() {
const args = yargs(hideBin(process.argv))
.option('no-cache', {
.option('skip-cache', {
description: 'Ignore local cache.json',
type: 'boolean',
default: false,
Expand All @@ -259,10 +259,10 @@ async function main() {
description: 'Suppress warning of not inside a TMUX session',
type: 'boolean',
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];
enableLogging = !args.quiet;
if (args.skipUrl && args.noCache) {
if (args.skipUrl && args.skipCache) {
console.error('There is nothing to do.');
process.exit(1);
}
Expand All @@ -272,7 +272,7 @@ async function main() {
}

let rawDesc;
if (args.noCache) {
if (args.skipCache) {
info('Downloading descriptor info (no cache)');
rawDesc = await fetchDescriptor(url);
} else {
Expand Down

0 comments on commit 4e01cd5

Please sign in to comment.