summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md7
-rw-r--r--mkvtool/go.mod2
-rw-r--r--mkvtool/main.go12
3 files changed, 13 insertions, 8 deletions
diff --git a/README.md b/README.md
index 6ef4dcf..73c830c 100644
--- a/README.md
+++ b/README.md
@@ -103,13 +103,14 @@ ASS字幕字体子集化 MKV批量提取/生成
#可选"-cp"参数:指定缓存文件的保存目录.
```
- - 取得一个目录里所有ass字幕文件所需要的全部字体
+ - 取得一个(或目录里所有)ass字幕文件所需要的全部字体
```shell
- mkvtool -l -s input #从${input}获取
+ mkvtool -l -s input #从${input}目录获取
+ mkvtool -l -f file #从${file}文件获取
#可选"-cfc"参数:当"-cfc"存在时,将从字体缓存中复制需要的字体到指定目录.
#可选"-co"参数:指定字体复制的目标目录.
- #可选"-cp"参数:指定要使用的缓存文件.
+ #可选"-cp"参数:指定要使用的缓存目录.
```
- 标准工作流
```shell
diff --git a/mkvtool/go.mod b/mkvtool/go.mod
index 39e25ac..ac69a16 100644
--- a/mkvtool/go.mod
+++ b/mkvtool/go.mod
@@ -2,7 +2,7 @@ module github.com/KurenaiRyu/MkvAutoSubset/mkvtool
go 1.18
-require github.com/KurenaiRyu/MkvAutoSubset/mkvlib v0.0.0-20220503050011-aa9747d0d43f
+require github.com/KurenaiRyu/MkvAutoSubset/mkvlib v0.0.0-20220503073509-af54c17128f8
require github.com/google/uuid v1.3.0
diff --git a/mkvtool/main.go b/mkvtool/main.go
index d20f511..3c8f34d 100644
--- a/mkvtool/main.go
+++ b/mkvtool/main.go
@@ -19,7 +19,7 @@ import (
)
const appName = "MKV Tool"
-const appVer = "v3.7.7"
+const appVer = "v3.7.8"
const tTitle = appName + " " + appVer
var appFN = fmt.Sprintf("%s %s %s/%s", appName, appVer, runtime.GOOS, runtime.GOARCH)
@@ -170,13 +170,17 @@ func main() {
processer.Cache(ccs)
}
- if l && s != "" {
- list := processer.GetFontsList(s, nil)
+ if l && (s != "" || f != "") {
+ files := []string{f}
+ if s != "" {
+ files, _ = findPath(s, `\.ass$`)
+ }
+ list := processer.GetFontsList(files, nil)
if len(list) > 0 {
fmt.Println(strings.Join(list, "\n"))
}
if cfc {
- if !processer.CopyFontsFromCache(s, co, nil) {
+ if !processer.CopyFontsFromCache(files, co, nil) {
ec++
return
}