tagindex

package
v0.0.0-...-b0fc717 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2021 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SYNC_BEGIN             = 0
	SYNC_BEGIN_FULL        = iota
	SYNC_BEGIN_INCREMENTAL = iota

	SYNC_RESETSTAGING        = iota
	SYNC_TAGCHECKPOINT       = iota
	SYNC_VISIBLE             = iota
	SYNC_DELETED             = iota
	SYNC_GHOSTED             = iota
	SYNC_INCREMENTAL_HISTORY = iota
	SYNC_TAGS                = iota
	SYNC_TAGNORMALIZE        = iota

	SYNC_STAGEPROMOTE = iota

	SYNC_DONE  = iota
	SYNC_ERROR = iota
	SYNC_BREAK = iota
)
View Source
const (
	STATE_READY = 0
	STATE_COUNT = iota
)
View Source
const (
	MINLENGTH = 4
	POPFACTOR = 250
	TOLERANCE = 2
)
View Source
const (
	MODE_READY = iota
	MODE_DISTINCT
	MODE_EXCLUDE
	MODE_INCLUDE
	MODE_LIST
	MODE_FREQ_RATIO
	MODE_IGNORE
	MODE_UNIGNORE
	MODE_FIX
	MODE_REASON
	MODE_MARK
	MODE_DELETE
	MODE_INSPECT
	MODE_ENTRY
	MODE_PROMPT
	MODE_AUTOFIX
	MODE_SELECT_1
	MODE_SELECT_2
	MODE_SELECT_CAT
	MODE_THRESHOLD
	MODE_SELECT
	MODE_SKIP
	MODE_ALIAS
)

Variables

This section is empty.

Functions

func Blits

func Blits(ctx *gogram.MessageCtx)

func BlitsInternal

func BlitsInternal(tx storage.DBLike, control BlitsControl, progress *ProgMessage) error

func CalculateAliasedCountsInternal

func CalculateAliasedCountsInternal(tx storage.DBLike, progress *ProgMessage) error

func CatsInternal

func CatsInternal(tx storage.DBLike, control CatsControl, creds storage.UserCreds, progress *ProgMessage) error

func Concatenations

func Concatenations(ctx *gogram.MessageCtx)

func NewTagsFromOldTags

func NewTagsFromOldTags(oldtags []string, deltags, addtags map[string]bool) string

func Percent

func Percent(current, max int) string

func RecountTags

func RecountTags(ctx *gogram.MessageCtx, progress *ProgMessage, real_counts, alias_counts bool) error

func RecountTagsCommand

func RecountTagsCommand(ctx *gogram.MessageCtx)

func RecountTagsInternal

func RecountTagsInternal(tx storage.DBLike, progress *ProgMessage) error

func RefetchDeletedPosts

func RefetchDeletedPosts(ctx *gogram.MessageCtx, progress *ProgMessage) error

func RefetchDeletedPostsCommand

func RefetchDeletedPostsCommand(ctx *gogram.MessageCtx)

func RefetchDeletedPostsInternal

func RefetchDeletedPostsInternal(tx storage.DBLike, user, api_key string, progress *ProgMessage) error

func ResyncList

func ResyncList(ctx *gogram.MessageCtx, progress *ProgMessage) error

func ResyncListCommand

func ResyncListCommand(ctx *gogram.MessageCtx)

func ResyncListInternal

func ResyncListInternal(tx storage.DBLike, user, api_key string, file_data io.Reader, progress *ProgMessage) error

func Serialize

func Serialize(this TagExpression) (string, map[string]string)

func SyncAliases

func SyncAliases(ctx *gogram.MessageCtx, progress *ProgMessage) error

func SyncAliasesCommand

func SyncAliasesCommand(ctx *gogram.MessageCtx)

func SyncAliasesInternal

func SyncAliasesInternal(tx storage.DBLike, user, api_key string, progress *ProgMessage) error

func SyncOnlyPostsInternal

func SyncOnlyPostsInternal(tx storage.DBLike, user, api_key string, progress *ProgMessage, post_updates chan []types.TPostInfo) error

func SyncPosts

func SyncPosts(ctx *gogram.MessageCtx, aliases_too, recount_too bool, progress *ProgMessage) error

func SyncPostsCommand

func SyncPostsCommand(ctx *gogram.MessageCtx)

func SyncPostsInternal

func SyncPostsInternal(tx storage.DBLike, user, api_key string, aliases_too, recount_too bool, progress *ProgMessage, post_updates chan []types.TPostInfo) error

func SyncTags

func SyncTags(ctx *gogram.MessageCtx, progress *ProgMessage) error

func SyncTagsCommand

func SyncTagsCommand(ctx *gogram.MessageCtx)

func SyncTagsInternal

func SyncTagsInternal(tx storage.DBLike, user, api_key string, progress *ProgMessage) error

func Tokenize

func Tokenize(expression string) []string

func Traverse

func Traverse(words []string, solutions chan []string, so_far []string, combined string)

func Typos

func Typos(ctx *gogram.MessageCtx)

func TyposInternal

func TyposInternal(tx storage.DBLike, control TyposControl, creds storage.UserCreds, progress *ProgMessage) error

Types

type BlitsControl

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

type CatsControl

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

type ListSettings

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

func (*ListSettings) Apply

func (ls *ListSettings) Apply(other ListSettings)

type Pair

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

func (Pair) String

func (p Pair) String() string

func (Pair) TypoData

func (p Pair) TypoData() storage.TypoData

type ProgMessage

type ProgMessage struct {

	// public shared fields. These must be initialized before anything calls.
	UpdateInterval time.Duration
	InitialMessage data.OMessage
	Bot            *gogram.TelegramBot

	// public shared fields which are initialized after the first push.
	Ctx *gogram.MessageCtx
	// contains filtered or unexported fields
}

func ProgressMessage2

func ProgressMessage2(initial_message data.OMessage,
	initial_text string,
	interval time.Duration,
	bot *gogram.TelegramBot) (*ProgMessage, error)

func (*ProgMessage) Active

func (this *ProgMessage) Active() string

func (*ProgMessage) AppendNotice

func (this *ProgMessage) AppendNotice(text string) error

func (*ProgMessage) Close

func (this *ProgMessage) Close()

func (*ProgMessage) Push

func (this *ProgMessage) Push(text string) error

func (*ProgMessage) ReplaceNotice

func (this *ProgMessage) ReplaceNotice(text string) error

func (*ProgMessage) Respin

func (this *ProgMessage) Respin(previous, notice, status string) string

func (*ProgMessage) SetMessage

func (this *ProgMessage) SetMessage(text string) error

func (*ProgMessage) SetStatus

func (this *ProgMessage) SetStatus(text string) error

type SearchChanBox

type SearchChanBox struct {
	Channel chan types.TPostInfo
}

func (*SearchChanBox) Close

func (this *SearchChanBox) Close()

type TEAnd

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

func (*TEAnd) SerializeReal

func (this *TEAnd) SerializeReal(buf *bytes.Buffer, index *int, tokens map[string]string)

type TENegate

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

func (*TENegate) SerializeReal

func (this *TENegate) SerializeReal(buf *bytes.Buffer, index *int, tokens map[string]string)

type TEOr

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

func (*TEOr) SerializeReal

func (this *TEOr) SerializeReal(buf *bytes.Buffer, index *int, tokens map[string]string)

type TETag

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

func (*TETag) SerializeReal

func (this *TETag) SerializeReal(buf *bytes.Buffer, index *int, tokens map[string]string)

type TagEditBox

type TagEditBox struct {
	EditDistance int
	Tag          types.TTagData
	Mode         storage.CorrectionMode
}

type TagExpression

type TagExpression interface {
	SerializeReal(buf *bytes.Buffer, index *int, tokens map[string]string)
}

func Parse

func Parse(tokens []string) TagExpression

func ParseExpression

func ParseExpression(pushdown stack, maxlevel int) (TagExpression, stack)

func ParseIntersection

func ParseIntersection(first TagExpression, s stack) (TagExpression, stack)

func ParseLiteral

func ParseLiteral(s stack) (TagExpression, stack)

func ParseNegation

func ParseNegation(s stack) (TagExpression, stack)

func ParseSubExpression

func ParseSubExpression(s stack) (TagExpression, stack)

func ParseUnion

func ParseUnion(first TagExpression, s stack) (TagExpression, stack)

type Triplet

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

func GetAllWildCats

func GetAllWildCats(tagMap map[string]*types.TTagData, blitMap map[string]*storage.BlitData, ratio int, with_empty, with_typed bool) []Triplet

func GetSpecificWildCats

func GetSpecificWildCats(tagMap map[string]*types.TTagData, blitMap map[string]*storage.BlitData, search string, prefixes, suffixes bool, ratio int, with_empty, with_typed bool) []Triplet

func (Triplet) CatData

func (t Triplet) CatData() storage.CatData

func (Triplet) String

func (t Triplet) String() string

type TyposControl

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

type UserError

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

func (UserError) Error

func (this UserError) Error() string

Jump to

Keyboard shortcuts

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