forked from speauty/anto
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: 调整目录结构; 统一cron实现; 调整log; 引入nohup;
- Loading branch information
Showing
78 changed files
with
1,052 additions
and
950 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package detector | ||
|
||
import ( | ||
"anto/cron/reader" | ||
"anto/cron/translate" | ||
"anto/dependency/service/translator" | ||
_type "anto/type" | ||
) | ||
|
||
type StrDetectorData struct { | ||
Translator translator.InterfaceTranslator | ||
FromLang string | ||
ToLang string | ||
TranslateMode _type.TranslateMode | ||
MainTrackReport _type.LangDirection | ||
SrtFile string | ||
SrtDir string | ||
FlagTrackExport int | ||
} | ||
|
||
func (customData StrDetectorData) toReaderData(filePath string) *reader.SrtReaderData { | ||
return &reader.SrtReaderData{ | ||
FilePath: filePath, | ||
PtrTranslatorOpts: &translate.SrtTranslateOpts{ | ||
Translator: customData.Translator, | ||
FromLang: customData.FromLang, ToLang: customData.ToLang, | ||
TranslateMode: customData.TranslateMode, MainTrackReport: customData.MainTrackReport, | ||
FlagTrackExport: customData.FlagTrackExport, | ||
}, | ||
} | ||
} |
Oops, something went wrong.