Documentation ¶
Index ¶
- Constants
- func DOCFileParseToString(FileToParse string) (string, error)
- func DOCX2Text(file io.ReaderAt, size int64) (string, error)
- func DOCXFileParseToString(FileToParse string) (string, error)
- func DetectFileType(StreamToDetect []byte) (string, string, error)
- func DetectFileTypeMIME(StreamToDetect []byte) (string, string, error)
- func IsFileDOCX(data []byte) bool
- func IsFilePPTX(data []byte) bool
- func ODTFileParseToString(FileToParse string) (string, error)
- func ODTParseToString(StreamToParse []byte) (string, error)
- func OfficeFileMetadata(FileToParse string) (*metagoffice.XMLContent, error)
- func OpenOfficeFileMetadata(FileToParse string) (*metagopenoffice.OpenOfficeXML, error)
- func PDFFileMetadata(FileToParse string) (*pdf_parser.PdfInfo, error)
- func PDFFileParseToString(FileToParse string) (string, error)
- func PPTX2Text(file io.ReaderAt, size int64) (string, error)
- func PPTXFileParseToString(FileToParse string) (string, error)
- func RTFFileParseToString(FileToParse string) (string, error)
- func RTFParseToString(StreamToParse []byte) (string, error)
- func TXTFileParseToString(FileToParse string) (string, error)
- func TXTParseToString(StreamToParse []byte) (string, error)
- type PPTXDocument
- type PPTXSlide
- type SlideNumberSorter
- type WordDocument
- type WordParagraph
- type WordRow
- type WordStyle
Constants ¶
const Version = "0.0.7"
Version exposes the current package version.
Variables ¶
This section is empty.
Functions ¶
func DOCFileParseToString ¶ added in v0.0.7
func DOCX2Text ¶ added in v0.0.3
DOCX2Text extracts text of a Word document Size is the full size of the input file.
func DOCXFileParseToString ¶ added in v0.0.3
func IsFileDOCX ¶ added in v0.0.3
IsFileDOCX checks if the data indicates a DOCX file DOCX has a signature of 50 4B 03 04
func IsFilePPTX ¶ added in v0.0.5
IsFilePPTX checks if the data indicates a PPTX file PPTX has a signature of 50 4B 03 04 Warning: This collides with ZIP, DOCX and other zip-based files.
func ODTFileParseToString ¶ added in v0.0.4
func ODTParseToString ¶ added in v0.0.3
func OfficeFileMetadata ¶ added in v0.0.6
func OfficeFileMetadata(FileToParse string) (*metagoffice.XMLContent, error)
func OpenOfficeFileMetadata ¶ added in v0.0.6
func OpenOfficeFileMetadata(FileToParse string) (*metagopenoffice.OpenOfficeXML, error)
See for return: https://stackoverflow.com/questions/50697914/return-nil-for-a-struct-in-go
func PDFFileMetadata ¶ added in v0.0.5
func PDFFileMetadata(FileToParse string) (*pdf_parser.PdfInfo, error)
See: https://www.lazy-tech.net/project/pdf_metadata_parsing_golang
func PDFFileParseToString ¶ added in v0.0.4
func PPTX2Text ¶ added in v0.0.5
PPTX2Text extracts text of a PowerPoint document Size is the full size of the input file.
func PPTXFileParseToString ¶ added in v0.0.5
func RTFFileParseToString ¶ added in v0.0.4
func RTFParseToString ¶
func TXTFileParseToString ¶ added in v0.0.4
func TXTParseToString ¶
Types ¶
type PPTXDocument ¶ added in v0.0.5
type PPTXDocument struct {
Slides []PPTXSlide
}
PPTXDocument is a PPTX document loaded into memory
func (PPTXDocument) AsText ¶ added in v0.0.5
func (doc PPTXDocument) AsText() (text string)
AsText returns the text on all slides
type SlideNumberSorter ¶ added in v0.0.5
type SlideNumberSorter []PPTXSlide
SlideNumberSorter is used for sorting
func (SlideNumberSorter) Len ¶ added in v0.0.5
func (a SlideNumberSorter) Len() int
func (SlideNumberSorter) Less ¶ added in v0.0.5
func (a SlideNumberSorter) Less(i, j int) bool
func (SlideNumberSorter) Swap ¶ added in v0.0.5
func (a SlideNumberSorter) Swap(i, j int)
type WordDocument ¶ added in v0.0.3
type WordDocument struct {
Paragraphs []WordParagraph
}
WordDocument is a full word doc
func WordParse ¶ added in v0.0.3
func WordParse(doc string) (WordDocument, error)
WordParse parses a word file
func (WordDocument) AsText ¶ added in v0.0.3
func (w WordDocument) AsText() string
AsText returns all text in the document
type WordParagraph ¶ added in v0.0.3
WordParagraph is a single paragraph