dictionary

package
v0.0.0-...-857e21e Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2026 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) Authors

func (d Common) Authors() bool

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) Preface

func (d Common) Preface() string

func (Common) ScanURL

func (d Common) ScanURL() string

func (Common) Slugifier

func (d Common) Slugifier() string

func (Common) Title

func (d Common) Title() string

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
	Preface() string
	Abbrevs() *Abbrevs
	ScanURL() string
	Slugifier() string
	Authors() 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
	DictProvidesIDs                  bool
	DictProvidesIDsWithoutDuplicates bool
	LowercaseSuggestions             bool
}

type Section

type Section struct {
	ID      string
	Name    string
	DictIDs []string
	Descr   string
}

func GetAllSections

func GetAllSections() []Section

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