summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorMkvAutoSubset <[email protected]>2021-10-17 20:17:58 +0800
committerKurenai <[email protected]>2021-10-17 20:17:58 +0800
commitc0f88cb080950879bc8af5cf498ac3aa8a8c68fb (patch)
treecaa193ee7f100a1b22d5fa7fa8dfe1120f7ae757 /cmd
parent70a7c4edba281122c05ef46e9efffe5309ef8448 (diff)
Bump to 3.1.3
- 增加C函数导出 - 增加python调用的demo
Diffstat (limited to 'cmd')
-rw-r--r--cmd/main.go14
-rw-r--r--cmd/title.go2
2 files changed, 10 insertions, 6 deletions
diff --git a/cmd/main.go b/cmd/main.go
index 509de29..abf0603 100644
--- a/cmd/main.go
+++ b/cmd/main.go
@@ -12,7 +12,7 @@ import (
)
const appName = "MKV Tool"
-const appVer = "3.1.1"
+const appVer = "v3.1.3"
const tTitle = appName + " " + appVer
var processer = mkvlib.GetInstance()
@@ -43,6 +43,7 @@ func main() {
q := false
v := false
clean := false
+ ans := false
sl, st := "", ""
af, ao := "", ""
asses := new(arrayArg)
@@ -55,10 +56,11 @@ func main() {
flag.Var(asses, "a", "ASS files. (multiple & join ass mode)")
flag.BoolVar(&n, "n", false, "Not do ass font subset. (dump mode only)")
flag.BoolVar(&clean, "clean", false, "Clean original file subtitles and fonts. (create mode only)")
- flag.StringVar(&sl, "sl", "chi", " Subtitle language. (create & make mode only)")
- flag.StringVar(&st, "st", "", " Subtitle title. (create & make mode only)")
- flag.StringVar(&af, "af", "", " ASS fonts folder. (ASS mode only)")
- flag.StringVar(&ao, "ao", "", " ASS output folder. (ASS mode only)")
+ flag.StringVar(&sl, "sl", "chi", "Subtitle language. (create & make mode only)")
+ flag.StringVar(&st, "st", "", "Subtitle title. (create & make mode only)")
+ flag.StringVar(&af, "af", "", "ASS fonts folder. (ass mode only)")
+ flag.StringVar(&ao, "ao", "", "ASS output folder. (ass mode only)")
+ flag.BoolVar(&ans, "ans", false, `ASS output not to the new "subseted" folder. (ass mode only)`)
flag.StringVar(&data, "data", "data", "Subtitles & Fonts folder (dump & make mode only)")
flag.StringVar(&dist, "dist", "dist", "Results output folder (make mode only)")
@@ -77,7 +79,7 @@ func main() {
}
if len(*asses) > 0 {
- if !processer.ASSFontSubset(*asses, af, ao) {
+ if !processer.ASSFontSubset(*asses, af, ao, !ans) {
ec++
}
return
diff --git a/cmd/title.go b/cmd/title.go
index b292eb5..b49043d 100644
--- a/cmd/title.go
+++ b/cmd/title.go
@@ -2,6 +2,8 @@
package main
+import "fmt"
+
func setWindowTitle(title string) {
fmt.Printf("\033]0;%s\007", title)
}