Documentation ¶
Index ¶
- Constants
- Variables
- type Article
- func (a *Article) CheckDisambiguation() bool
- func (a *Article) CheckRedirect() (bool, *WikiLink)
- func (a *Article) GenText() error
- func (a *Article) GetAbstract() string
- func (a *Article) GetExternalLinks() []string
- func (a *Article) GetLinks() []WikiLink
- func (a *Article) GetMedia() []WikiLink
- func (a *Article) GetText() string
- func (a *Article) GetTextLinks() []FullWikiLink
- func (a *Article) ParseSimple() error
- func (a *Article) PrintParseTree()
- func (a *Article) Tokenize(mw string, g PageGetter) ([]*Token, error)
- func (a *Article) TranscludeTemplatesRecursive(mw string, params map[string]string, g PageGetter, depth int) string
- type DummyPageGetter
- type FullWikiLink
- type Namespaces
- type PageGetter
- type ParseNode
- type Template
- type TemplateRenderer
- type Token
- type WikiLink
Constants ¶
View Source
const ( QS_none int = iota QS_i QS_b QS_ib QS_bi )
View Source
const (
TClosed int = 1 << iota
)
Variables ¶
View Source
var DebugLevel int = 0
var Debug bool = false
View Source
var MagicMap map[string]TemplateRenderer = map[string]TemplateRenderer{ "DISPLAYTITLE": nil, }
Functions ¶
This section is empty.
Types ¶
type Article ¶
type Article struct { MediaWiki string Title string Links []WikiLink ExtLinks []string Type string AbstractText string Media []WikiLink Tokens []*Token // OldTokens []*Token Root *ParseNode Parsed bool Text string TextLinks []FullWikiLink Templates []*Template // contains filtered or unexported fields }
func NewArticle ¶
func ParseArticle ¶
func ParseArticle(title, text string, g PageGetter) (*Article, error)
func (*Article) CheckDisambiguation ¶
func (*Article) CheckRedirect ¶
func (*Article) GetAbstract ¶
func (*Article) GetExternalLinks ¶
func (*Article) GetTextLinks ¶
func (a *Article) GetTextLinks() []FullWikiLink
func (*Article) ParseSimple ¶
func (*Article) PrintParseTree ¶
func (a *Article) PrintParseTree()
func (*Article) TranscludeTemplatesRecursive ¶
type DummyPageGetter ¶
type DummyPageGetter struct{}
type FullWikiLink ¶
type Namespaces ¶
var StandardNamespaces Namespaces = map[string]string{
"media": "Media",
"special": "Special",
"talk": "Talk",
"user": "User",
"user talk": "User talk",
"wikipedia": "Wikipedia",
"wikipedia talk": "Wikipedia talk",
"file": "File",
"file talk": "File talk",
"mediawiki": "MediaWiki",
"mediawiki talk": "MediaWiki talk",
"template": "Template",
"template talk": "Template talk",
"help": "Help",
"help talk": "Help talk",
"category": "Category",
"category talk": "Category talk",
"portal": "Portal",
"portal talk": "Portal talk",
"book": "Book",
"book talk": "Book talk",
"draft": "Draft",
"draft talk": "Draft talk",
"education program": "Education Program",
"education program talk": "Education Program talk",
"timedtext": "TimedText",
"timedtext talk": "TimedText talk",
"module": "Module",
"module talk": "Module talk",
"topic": "Topic",
}
func (Namespaces) WikiCanonicalFormNamespaceEsc ¶
func (namespaces Namespaces) WikiCanonicalFormNamespaceEsc(l string, defaultNamespace string, unescape bool) WikiLink
type PageGetter ¶
type TemplateRenderer ¶
type WikiLink ¶
func WikiCanonicalForm ¶
func WikiCanonicalFormEsc ¶
func (*WikiLink) FullPagename ¶
func (*WikiLink) FullPagenameAnchor ¶
func (*WikiLink) IsImplicitSelfLink ¶
Click to show internal directories.
Click to hide internal directories.