diff --git a/converter/converter.go b/converter/converter.go index 020450f0..375ab80b 100644 --- a/converter/converter.go +++ b/converter/converter.go @@ -137,19 +137,22 @@ func (this *Converter) Convert() (err error) { case "epub": if err = this.convertToEpub(); err != nil { errs = append(errs, err.Error()) + fmt.Println("转换EPUB文档失败:" + err.Error()) } case "mobi": if err = this.convertToMobi(); err != nil { errs = append(errs, err.Error()) + fmt.Println("转换MOBI文档失败:" + err.Error()) } case "pdf": if err = this.convertToPdf(); err != nil { - fmt.Println(err) + fmt.Println("转换PDF文档失败:" + err.Error()) errs = append(errs, err.Error()) + } case "docx": if err = this.convertToDocx(); err != nil { - fmt.Println(err) + fmt.Println("转换WORD文档失败:" + err.Error()) errs = append(errs, err.Error()) } } diff --git a/models/book_result.go b/models/book_result.go index 3a457bdd..30e37de2 100644 --- a/models/book_result.go +++ b/models/book_result.go @@ -199,7 +199,7 @@ func (m *BookResult) Converter(sessionId string) (ConvertBookResult, error) { defer func(p string) { os.RemoveAll(p) }(tempOutputPath) - + if utils.FileExists(pdfpath) && utils.FileExists(epubpath) && utils.FileExists(mobipath) && utils.FileExists(docxpath) { convertBookResult.EpubPath = epubpath convertBookResult.MobiPath = mobipath @@ -245,8 +245,8 @@ func (m *BookResult) Converter(sessionId string) (ConvertBookResult, error) { Cover: m.Cover, Timestamp: time.Now().Format("2006-01-02 15:04:05"), Description: string(blackfriday.MarkdownBasic([]byte(m.Description))), - Footer: "

本文档使用 MinDoc 构建 - _PAGENUM_ -

", - Header: "

_SECTION_

", + Footer: "\"

本文档使用 MinDoc 构建 - _PAGENUM_ -

\"", + Header: "\"

_SECTION_

\"", Identifier: "", Language: "zh-CN", Creator: m.CreateName, diff --git a/views/document/markdown_edit_template.tpl b/views/document/markdown_edit_template.tpl index 9665cf84..5e8c5c2f 100644 --- a/views/document/markdown_edit_template.tpl +++ b/views/document/markdown_edit_template.tpl @@ -41,7 +41,7 @@
-
+
@@ -103,7 +103,7 @@
-
+