Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/version-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Version Check
on:
pull_request:
branches:
- 'main'

jobs:
check-version-bump:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Check version bump
uses: bachmacintosh/need-npm-package-version-bump@v1

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
1. 进入视频所在目录
2. 命令行执行:`npx dual-subtitle`

注:有些环境(比如群晖)如果没有npx,可以试试用`npm exec dual-subtitle`代替。
注:有些环境(比如群晖)如果没有`npx`,可以用`npm exec`代替。

生成的字幕文件会以`.chs-eng.srt`结尾。

Expand Down
4 changes: 3 additions & 1 deletion extractSub.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import readline from 'readline';
import ffmpegInstaller from '@ffmpeg-installer/ffmpeg';
import ffmpeg from 'fluent-ffmpeg';
import {config} from "./config.js";
Expand Down Expand Up @@ -44,7 +45,8 @@ export const extractSub = (filename, targetSubs) => {
})
.on('progress', function (progress) {
const progressPercent = Math.round((timemarkToSeconds(progress.timemark) / duration) * 100);
console.log(`进行中,完成${(progressPercent || 0)}%`);
readline.cursorTo(process.stdout, 0);
process.stdout.write(`进行中,完成${(progressPercent || 0)}%`);
})
.on('end', function (str) {
console.log('转换任务完成!');
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dual-subtitle",
"version": "0.3.0",
"version": "0.3.1",
"main": "index.js",
"type": "module",
"bin": {
Expand Down