Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Source sets target source. Source = func(v string) Option { return func(c *config) { c.source = v } } // Query sets CSS query for the target. Query = func(v string) Option { return func(c *config) { c.query = v } } // Content sets content of the target. Content = func(v string) Option { return func(c *config) { c.content = v } } // TargetType sets content type of the target. TargetType = func(v ContentType) Option { return func(c *config) { c.contentType = v } } // Limit sets the limit of tags for the target. Limit = func(v int) Option { return func(c *config) { c.limit = v } } // Verbose enables high verbosity. Verbose = func(v bool) Option { return func(c *config) { c.verbose = v } } // NoStopWords enables stop-words exclusion from the output. NoStopWords = func(v bool) Option { return func(c *config) { c.noStopWords = v } } // ContentOnly ignores all none content related parts of the HTML page. ContentOnly = func(v bool) Option { return func(c *config) { c.contentOnly = v } } // FullSite tells parser to process full site (HTML only). FullSite = func(v bool) Option { return func(c *config) { c.fullSite = v } } // TagWeights string with the custom tag weights for the HTML & Markdown tagging. TagWeights = func(v string) Option { return func(c *config) { c.tagWeights = v } } // TagWeightsJSON JSON file with the custom tag weights for the HTML & Markdown tagging. TagWeightsJSON = func(v string) Option { return func(c *config) { c.tagWeightsJSON = v } } AdjustScores = func(v bool) Option { return func(c *config) { c.adjustScores = v } } )
Functions ¶
Types ¶
type ContentType ¶ added in v0.2.0
type ContentType byte
ContentType ...
const ( Unknown ContentType = iota Text HTML Markdown )
Content types
func ContentTypeOf ¶ added in v0.2.0
func ContentTypeOf(contentType string) ContentType
ContentTypeOf returns ContentType based on string value.
type Meta ¶ added in v0.29.0
type Meta struct { ContentType ContentType DocTitle string DocHash string }
Meta extra information.
type Result ¶ added in v0.29.0
Result represents result of Tagify.
func (*Result) ForEach ¶ added in v0.40.0
ForEach iterates through the slice of Tags and calls provided "fn" on every iteration.
func (*Result) TagsStrings ¶ added in v0.29.0
TagsStrings transforms slice of tags into a slice of strings.
Click to show internal directories.
Click to hide internal directories.