parsing

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2025 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Tag related parsing functions

Index

Constants

View Source
const (

	//#start test2 #test3 elol
	//#start word with #end
	//word in the #middle of sentence
	//tags with a #dot.caracter
	//this is a end of sentence #tag
	// ReTags = `\B#(?P<tag>\w+\.?\w+)`
	ReTags = `#(?P<tag>[a-zA-Z0-9_.-]+)`
	// #tag:notify
	ReNotify = `\b(?P<tag>[a-zA-Z0-9_.-]+):notify`
)

Variables

This section is empty.

Functions

func ParseBkTags

func ParseBkTags(b *gosuki.Bookmark) error

func ParseNodeTags

func ParseNodeTags(n *tree.Node) error

Types

type BrowserCounter

type BrowserCounter struct {
	// contains filtered or unexported fields
}

func (*BrowserCounter) AddTotal

func (c *BrowserCounter) AddTotal(n uint)

AddTotal implements Counter.

func (*BrowserCounter) IncNodeCount

func (c *BrowserCounter) IncNodeCount()

IncNodeCount implements Counter.

func (*BrowserCounter) IncURLCount

func (c *BrowserCounter) IncURLCount()

IncUrlCount implements Counter.

func (*BrowserCounter) LastFullTreeParseRT

func (c *BrowserCounter) LastFullTreeParseRT() time.Duration

LastFullTreeParseRT implements Counter.

func (*BrowserCounter) NodeCount

func (c *BrowserCounter) NodeCount() uint

NodeCount implements Counter.

func (*BrowserCounter) Progress

func (c *BrowserCounter) Progress() float64

func (*BrowserCounter) ResetCount

func (c *BrowserCounter) ResetCount()

func (*BrowserCounter) SetLastTreeParseRuntime

func (c *BrowserCounter) SetLastTreeParseRuntime(d time.Duration)

SetLastTreeParseRuntime implements Counter.

func (*BrowserCounter) SetLastWatchRuntime

func (c *BrowserCounter) SetLastWatchRuntime(d time.Duration)

SetLastWatchTime implements Counter.

func (*BrowserCounter) SetTotal

func (c *BrowserCounter) SetTotal(count uint)

func (*BrowserCounter) SetURLCount

func (c *BrowserCounter) SetURLCount(count uint)

SetUrlCount implements Counter.

func (*BrowserCounter) Total

func (c *BrowserCounter) Total() uint

Total implements Counter.

func (*BrowserCounter) URLCount

func (c *BrowserCounter) URLCount() uint

URLCount implements Counter.

type Counter

type Counter interface {

	// Current number of loaded bookmarks
	URLCount() uint
	NodeCount() uint

	// Progress in domain [0,1]
	Progress() float64

	// Reset all internal counters
	ResetCount()

	// Set total bookmarks to be loaded
	SetTotal(uint)

	// Total bookmark count that will be loaded
	Total() uint

	AddTotal(uint)

	SetLastWatchRuntime(time.Duration)

	SetLastTreeParseRuntime(time.Duration)
	LastFullTreeParseRT() time.Duration

	IncNodeCount()
	IncURLCount()
	SetURLCount(uint)
}

This interface should be implemented by modules who can expose counters on numbers of available bookmarks

Jump to

Keyboard shortcuts

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