Skip to content

duan602728596/48tools-cli

Repository files navigation

48tools-cli

GitHub Release GitHub License GitHub Actions Workflow Status
Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge

48tools-cli是从命令行执行获取直播或录播的信息、具有下载和自动下载视频的功能的软件。
软件轻量级,无GUI,占用内存小,适合在服务器上使用。
如果想要使用更多、更强大的功能,请选择48tools
软件源代码使用go来编写,使用node.js + typescript执行脚本。

配置

在软件开始使用前,必须先在config.yaml中进行配置。

参数

  • ffmpeg:ffmpeg的路径,下载视频必备。下载地址为:https://ffmpeg.org/download.html
  • pocket48:配置口袋48执行的一些配置
    • live:直播相关配置
      • recordName:录制的小偶像的名字或者id,必须是字符串。名字是包含关系,id是完全匹配。类型是数组
      • downloadDir:下载视频的目录。
    • video:录播相关配置
      • downloadDir:下载视频的目录。

命令

查看当前的直播

48tools live
  • 支持的参数:
    • --format:table或者json。格式化输出的信息。

自动录制直播

48tools live auto

查看当前的录播

48tools video
  • 支持的参数:
    • --next:翻页用。根据next对应页的数据。
    • --format:table或者json。格式化输出的信息。

例如可以执行命令:

48tools video --next=1157460468837453824 --format=json

根据直播或录播的liveId获得详细的信息

48tools one --id=xxxxxx
  • 支持的参数:
    • --id:直播或录播的liveId。
    • --format:table或者json。格式化输出的信息。

例如可以执行命令:

48tools one --id=1157459593784004608 --format=json

根据liveId下载视频

48tools one download --id=xxxxxx
  • 支持的参数:
    • --id:直播或录播的liveId。
    • --name:下载视频文件的文件名。

开发

使用镜像

如果你无法翻墙,可以通过设置环境变量来代理下载go的软件包。

GOPROXY=https://mirrors.aliyun.com/goproxy/

或者直接执行:

node --run go:download

运行测试

在根目录运行如下命令,执行测试用例。

node --run test

编译

在根目录运行如下命令,执行编译。

node --run build

About

48tools的命令行工具

Resources

License

Stars

Watchers

Forks

Packages

No packages published