docxparse

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 11, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDocxRawText

func GetDocxRawText(filename string) (string, error)

func ReadDocx

func ReadDocx(filename string) (paragraphs []string)

Types

type Attr

type Attr struct {
	Fonts *RFonts `xml:"rFonts"`
	Size  *Sz     `xml:"sz,omitempty"`
}

func (*Attr) UnmarshalToken

func (attr *Attr) UnmarshalToken(tok *xmltokenizer.Tokenizer, se *xmltokenizer.Token) error

type P

type P struct {
	Ppr *PPr `xml:"pPr"`
	R   []*R `xml:"r"`
}

func (*P) GetFont

func (p *P) GetFont() *RFonts

func (*P) GetSize

func (p *P) GetSize() int

func (*P) IsH1

func (p *P) IsH1() bool

func (*P) IsH2

func (p *P) IsH2() bool

func (*P) IsTitle

func (p *P) IsTitle() bool

func (*P) Text

func (p *P) Text() string

func (*P) UnmarshalToken

func (p *P) UnmarshalToken(tok *xmltokenizer.Tokenizer, se *xmltokenizer.Token) error

type PPr

type PPr struct {
	Spacing *Spacing `xml:"w:spacing,omitempty"`
}

func (*PPr) UnmarshalToken

func (ppr *PPr) UnmarshalToken(tok *xmltokenizer.Tokenizer, se *xmltokenizer.Token) error

type R

type R struct {
	Text string `xml:"t,omitempty"`
	Attr *Attr  `xml:"rPr"`
}

func (*R) UnmarshalToken

func (r *R) UnmarshalToken(tok *xmltokenizer.Tokenizer, se *xmltokenizer.Token) error

type RFonts

type RFonts struct {
	Ascii    string `xml:"w:ascii,attr"`
	HAnsi    string `xml:"w:hAnsi,attr"`
	EastAsia string `xml:"w:eastAsia,attr"`
}

func (*RFonts) UnmarshalToken

func (rfonts *RFonts) UnmarshalToken(tok *xmltokenizer.Tokenizer, se *xmltokenizer.Token) error

type Spacing

type Spacing struct {
	Line     string `xml:"w:line,attr"`
	LineRule string `xml:"w:lineRule,attr"`
}

func (*Spacing) UnmarshalToken

func (spacing *Spacing) UnmarshalToken(tok *xmltokenizer.Tokenizer, se *xmltokenizer.Token) error

type Sz

type Sz struct {
	Val string `xml:"w:val,attr"`
}

func (*Sz) UnmarshalToken

func (sz *Sz) UnmarshalToken(tok *xmltokenizer.Tokenizer, se *xmltokenizer.Token) error

type Tbl

type Tbl struct {
	Rows []*Tr `xml:"tr"`
}

func (*Tbl) String

func (tbl *Tbl) String() string

func (*Tbl) UnmarshalToken

func (tbl *Tbl) UnmarshalToken(tok *xmltokenizer.Tokenizer, se *xmltokenizer.Token) error

type Tc

type Tc struct {
	P *P `xml:"p"`
}

func (*Tc) String

func (tc *Tc) String() string

func (*Tc) UnmarshalToken

func (tc *Tc) UnmarshalToken(tok *xmltokenizer.Tokenizer, se *xmltokenizer.Token) error

type Tr

type Tr struct {
	Cells []*Tc `xml:"tc"`
}

func (*Tr) Strings

func (tr *Tr) Strings() []string

func (*Tr) UnmarshalToken

func (tr *Tr) UnmarshalToken(tok *xmltokenizer.Tokenizer, se *xmltokenizer.Token) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL