summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrail Finder <wohilas@gmail.com>2023-02-14 21:51:27 +0600
committerGrail Finder <wohilas@gmail.com>2023-02-14 21:51:27 +0600
commit507332e184e4da7ba49ef608143ba47c913cb0d5 (patch)
tree8e1874a7aec6a4a52dbe3d5f2cc248fc15105045
parentf373a7c67cc2b37ddb8532c3e8100da8fcf097ac (diff)
Fix: use abs path
-rw-r--r--main.go4
-rw-r--r--readme.md1
2 files changed, 3 insertions, 2 deletions
diff --git a/main.go b/main.go
index 61e0515..2c9d3a4 100644
--- a/main.go
+++ b/main.go
@@ -160,7 +160,7 @@ func dirRun(dirpath string) []*Utterance {
resp := []*Utterance{}
vttFiles := getVttList(dirpath)
for _, vtt := range vttFiles {
- utterances := oneFileRun(path.Join(dirpath, vtt))
+ utterances := oneFileRun(vtt)
resp = append(resp, utterances...)
}
return resp
@@ -175,7 +175,7 @@ func getVttList(dirpath string) []string {
return err
}
if strings.Contains(info.Name(), subExt) {
- resp = append(resp, info.Name())
+ resp = append(resp, path)
}
return nil
})
diff --git a/readme.md b/readme.md
index 97bbbbe..f5a6239 100644
--- a/readme.md
+++ b/readme.md
@@ -3,3 +3,4 @@
- key-pair in metadata doesnt guarantee existence of audiofile;
- instead of writing ffmpeg commands to file maybe better to run them in go;
- change metadata format from json to csv for lower memory consumption;
+- add config file; move constance to config file;