优化工作路径拼接方法

This commit is contained in:
lifei6671
2018-07-11 14:18:27 +08:00
parent a5d7be92af
commit 894382dfe0
5 changed files with 39 additions and 16 deletions

View File

@@ -72,6 +72,13 @@ var (
ebookConvert = "ebook-convert"
)
func CheckConvertCommand() error {
args := []string{ "--version" }
cmd := exec.Command(ebookConvert, args...)
return cmd.Run()
}
// 接口文档 https://manual.calibre-ebook.com/generated/en/ebook-convert.html#table-of-contents
//根据json配置文件创建文档转化对象
func NewConverter(configFile string, debug ...bool) (converter *Converter, err error) {