2023-06-24 20:39:55 +08:00
|
|
|
|
// SiYuan - Refactor your thinking
|
2022-05-26 15:18:53 +08:00
|
|
|
|
// Copyright (c) 2020-present, b3log.org
|
|
|
|
|
|
//
|
|
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
|
|
|
|
// it under the terms of the GNU Affero General Public License as published by
|
|
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
|
// (at your option) any later version.
|
|
|
|
|
|
//
|
|
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
|
// GNU Affero General Public License for more details.
|
|
|
|
|
|
//
|
|
|
|
|
|
// You should have received a copy of the GNU Affero General Public License
|
|
|
|
|
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
|
|
|
|
package conf
|
|
|
|
|
|
|
|
|
|
|
|
type Export struct {
|
2024-01-28 00:22:47 +08:00
|
|
|
|
ParagraphBeginningSpace bool `json:"paragraphBeginningSpace"` // 是否使用中文排版段落开头空两格
|
|
|
|
|
|
AddTitle bool `json:"addTitle"` // 是否添加标题
|
|
|
|
|
|
// 内容块引用导出模式
|
|
|
|
|
|
// 2:锚文本块链
|
|
|
|
|
|
// 3:仅锚文本
|
2024-12-08 17:08:18 +08:00
|
|
|
|
// 4:块引转脚注+锚点哈希
|
|
|
|
|
|
// (5:锚点哈希 https://github.com/siyuan-note/siyuan/issues/10265 已经废弃 https://github.com/siyuan-note/siyuan/issues/13331)
|
|
|
|
|
|
// (0:使用原始文本,1:使用 Blockquote,都已经废弃 https://github.com/siyuan-note/siyuan/issues/3155)
|
2024-01-28 00:22:47 +08:00
|
|
|
|
BlockRefMode int `json:"blockRefMode"`
|
|
|
|
|
|
BlockEmbedMode int `json:"blockEmbedMode"` // 内容块引用导出模式,0:使用原始文本,1:使用 Blockquote
|
|
|
|
|
|
BlockRefTextLeft string `json:"blockRefTextLeft"` // 内容块引用导出锚文本左侧符号,默认留空
|
|
|
|
|
|
BlockRefTextRight string `json:"blockRefTextRight"` // 内容块引用导出锚文本右侧符号,默认留空
|
|
|
|
|
|
TagOpenMarker string `json:"tagOpenMarker"` // 标签开始标记符,默认是 #
|
|
|
|
|
|
TagCloseMarker string `json:"tagCloseMarker"` // 标签结束标记符,默认是 #
|
|
|
|
|
|
FileAnnotationRefMode int `json:"fileAnnotationRefMode"` // 文件标注引用导出模式,0:文件名 - 页码 - 锚文本,1:仅锚文本
|
|
|
|
|
|
PandocBin string `json:"pandocBin"` // Pandoc 可执行文件路径
|
|
|
|
|
|
MarkdownYFM bool `json:"markdownYFM"` // Markdown 导出时是否添加 YAML Front Matter https://github.com/siyuan-note/siyuan/issues/7727
|
2025-09-18 16:37:47 +08:00
|
|
|
|
InlineMemo bool `json:"inlineMemo"` // 是否导出行级备注 https://github.com/siyuan-note/siyuan/issues/14605
|
2024-01-28 00:22:47 +08:00
|
|
|
|
PDFFooter string `json:"pdfFooter"` // PDF 导出时页脚内容
|
|
|
|
|
|
DocxTemplate string `json:"docxTemplate"` // Docx 导出时模板文件路径
|
|
|
|
|
|
PDFWatermarkStr string `json:"pdfWatermarkStr"` // PDF 导出时水印文本或水印文件路径
|
|
|
|
|
|
PDFWatermarkDesc string `json:"pdfWatermarkDesc"` // PDF 导出时水印位置、大小和样式等
|
|
|
|
|
|
ImageWatermarkStr string `json:"imageWatermarkStr"` // 图片导出时水印文本或水印文件路径
|
|
|
|
|
|
ImageWatermarkDesc string `json:"imageWatermarkDesc"` // 图片导出时水印位置、大小和样式等
|
2022-05-26 15:18:53 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func NewExport() *Export {
|
|
|
|
|
|
return &Export{
|
|
|
|
|
|
ParagraphBeginningSpace: false,
|
|
|
|
|
|
AddTitle: true,
|
2024-10-19 12:46:33 +08:00
|
|
|
|
BlockRefMode: 4,
|
2022-05-26 15:18:53 +08:00
|
|
|
|
BlockEmbedMode: 1,
|
|
|
|
|
|
BlockRefTextLeft: "",
|
|
|
|
|
|
BlockRefTextRight: "",
|
|
|
|
|
|
TagOpenMarker: "#",
|
|
|
|
|
|
TagCloseMarker: "#",
|
|
|
|
|
|
FileAnnotationRefMode: 0,
|
|
|
|
|
|
PandocBin: "",
|
2023-03-21 11:52:13 +08:00
|
|
|
|
MarkdownYFM: false,
|
2025-04-20 17:27:14 +08:00
|
|
|
|
InlineMemo: false,
|
2023-03-31 20:51:32 +08:00
|
|
|
|
PDFFooter: "%page / %pages",
|
2022-05-26 15:18:53 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|