Documentation
¶
Overview ¶
Package export 将 OFD 文档导出为 ofd-creator 可读取的 manifest。
Index ¶
- func Export(input any, output io.Writer, options Options) error
- func ExportAll(input any, outputDir string) error
- func ExportAllWithFormat(input any, outputDir, format string) error
- func ExportAllWithOptions(input any, outputDir string, options Options) error
- func ExportDocument(input any, index int, output io.Writer, options Options) error
- type BundleDocument
- type BundleIndex
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Export ¶
Export 将 OFD 导出为 manifest,并将字体和多媒体资源写入 AssetRoot。 导出的 manifest 可以作为 ofd-creator 的输入,但不承诺原始 OFD 的字节级还原。
func ExportAllWithFormat ¶
ExportAllWithFormat 将 OFD 的全部文档体导出为指定格式的目录包。
func ExportAllWithOptions ¶
ExportAllWithOptions 将 OFD 的全部文档体导出为指定格式的目录包,并应用输出选项。
Types ¶
type BundleDocument ¶
type BundleDocument struct {
Index int `json:"index" yaml:"index"`
ID string `json:"id" yaml:"id"`
Title string `json:"title" yaml:"title"`
Manifest string `json:"manifest" yaml:"manifest"`
AssetRoot string `json:"asset_root" yaml:"asset_root"`
Pages int `json:"pages" yaml:"pages"`
}
BundleDocument identifies one document manifest in an export bundle.
type BundleIndex ¶
type BundleIndex struct {
Version int `json:"version" yaml:"version"`
Documents []BundleDocument `json:"documents" yaml:"documents"`
}
BundleIndex describes the manifests produced by ExportAll.
Click to show internal directories.
Click to hide internal directories.