Documentation
¶
Index ¶
Constants ¶
View Source
const (
ISO8601 = "2006-01-02T15:04:05"
)
View Source
const (
MimeTypePfx = "application/vnd.oasis.opendocument."
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DocStats ¶
type DocStats struct {
Tables int `xml:"table-count,attr"`
Cells int `xml:"cell-count,attr"`
Images int `xml:"image-count,attr"`
Objects int `xml:"object-count,attr"`
Pages int `xml:"page-count,attr"`
Paragraphs int `xml:"paragraph-count,attr"`
Words int `xml:"word-count,attr"`
Characters int `xml:"character-count,attr"`
}
type DocumentMeta ¶
type File ¶
func NewReader ¶
NewReader initializes a File struct with an already opened ODF file, and checks the file's MIME type. The returned *File provides access to files embedded in the ODF file, like content.xml.
func Open ¶
Open an OpenDocument file for reading, and check its MIME type. The returned *File provides -- via its Open method -- access to files embedded in the ODF, like content.xml.
func (*File) Meta ¶
func (f *File) Meta() (docMeta *DocumentMeta, err error)
type Meta ¶
type Meta struct {
Title string `xml:"title"`
InitialCreator Time `xml:"initial-creator"`
CreationDate Time `xml:"creation-date"`
DcCreator string `xml:"dc creator"`
DcDate string `xml:"dc date"`
DcLang string `xml:"dc language"`
EditingCycles int `xml:"editing-cycles"`
EditingDuration string `xml:"editing-duration"`
Stats DocStats `xml:"document-statistic"`
Generator string `xml:"generator"`
UserDefined []struct {
Name string `xml:"name,attr"`
Text string `xml:",chardata"`
} `xml:"user-defined"`
}
Click to show internal directories.
Click to hide internal directories.