dictionary

package
v0.0.0-...-8145f48 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitDictionaries

func InitDictionaries() error

Types

type Abbrev

type Abbrev struct {
	Keys  []string
	Value string
}

type Abbrevs

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

func (*Abbrevs) MarshalJSON

func (a *Abbrevs) MarshalJSON() ([]byte, error)

type Common

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

func (Common) Abbrevs

func (d Common) Abbrevs() *Abbrevs

func (Common) Aliases

func (d Common) Aliases() []string

func (Common) Boost

func (d Common) Boost() float32

func (Common) ID

func (d Common) ID() string

func (Common) IndexID

func (d Common) IndexID() string

func (Common) IndexSettings

func (d Common) IndexSettings() IndexSettings

func (Common) Slugifier

func (d Common) Slugifier() string

func (Common) Title

func (d Common) Title() string

func (Common) Unlisted

func (d Common) Unlisted() bool

type DSL

type DSL struct {
	Common
	RenderRefs bool
}

DSL dictionary

func (DSL) ToHTML

func (d DSL) ToHTML(content string) template.HTML

ToHTML implements Dictionary interface

type Dictionary

type Dictionary interface {
	ID() string
	IndexID() string
	Boost() float32
	Aliases() []string
	Title() string
	ToHTML(content string) template.HTML
	Abbrevs() *Abbrevs
	Slugifier() string
	Unlisted() bool
	IndexSettings() IndexSettings
}

Dictionary represents a dictionary

func Get

func Get(idOrAlias string) Dictionary

func GetAll

func GetAll() []Dictionary

func GetAllListed

func GetAllListed() []Dictionary

func GetByID

func GetByID(id string) Dictionary

func GetByIndex

func GetByIndex(index string) Dictionary

type GrammarDB

type GrammarDB struct {
	Common
}

func (GrammarDB) ToHTML

func (d GrammarDB) ToHTML(content string) template.HTML

type HTML

type HTML struct {
	Common
}

func (HTML) ToHTML

func (d HTML) ToHTML(content string) template.HTML

type IndexSettings

type IndexSettings struct {
	PrependContentWithTitle     bool
	ConvertHeadwordsToLowercase bool
}

type Stardict

type Stardict struct {
	Common
}

Stardict dictionary

func (Stardict) ToHTML

func (d Stardict) ToHTML(content string) template.HTML

ToHTML implements Dictionary interface

Directories

Path Synopsis
generated from grammar.peg
generated from grammar.peg

Jump to

Keyboard shortcuts

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