word

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 4, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Group

type Group struct {
	Name string

	Words []Word
	// contains filtered or unexported fields
}

func AllGroups

func AllGroups() ([]*Group, error)

func NewGroup

func NewGroup(groupName string) (*Group, error)

func (*Group) AddLearnedWord

func (g *Group) AddLearnedWord(w Word)

func (*Group) GetCurrentWord

func (g *Group) GetCurrentWord() Word

func (*Group) GetLearnedWords

func (g *Group) GetLearnedWords() []Word

func (*Group) GetLearnedWordsCount

func (g *Group) GetLearnedWordsCount() int

func (*Group) GetName

func (g *Group) GetName() string

func (*Group) GetProcess

func (g *Group) GetProcess() int

func (*Group) GetRealLearnedWords

func (g *Group) GetRealLearnedWords() []Word

func (*Group) GetWords

func (g *Group) GetWords() []Word

func (*Group) GetWordsCount

func (g *Group) GetWordsCount() int

func (*Group) LoadLearnedWordsFromFile

func (g *Group) LoadLearnedWordsFromFile() error

func (*Group) LoadProcessFromFile

func (g *Group) LoadProcessFromFile() error

func (*Group) LoadWordsFromFile

func (g *Group) LoadWordsFromFile() error

func (*Group) ProcessAddOne

func (g *Group) ProcessAddOne() int

func (*Group) ProcessFileExist

func (g *Group) ProcessFileExist() bool

func (*Group) ProcessMinusOne

func (g *Group) ProcessMinusOne() error

func (*Group) ResetLearnedWords

func (g *Group) ResetLearnedWords()

func (*Group) ResetProcess

func (g *Group) ResetProcess()

func (*Group) SaveLearnedWordsToFile

func (g *Group) SaveLearnedWordsToFile() error

func (*Group) SaveProcessToFile

func (g *Group) SaveProcessToFile() error

func (*Group) SaveWordsToFile

func (g *Group) SaveWordsToFile() error

type List

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

func NewList

func NewList(groupName string) (*List, error)

func (*List) AllWords added in v0.1.2

func (l *List) AllWords() []Word

func (*List) CurrentWord

func (l *List) CurrentWord() (bool, Word)

func (*List) NextWord

func (l *List) NextWord() (bool, Word)

func (*List) PickWord

func (l *List) PickWord() (bool, Word)

func (*List) PrevWord

func (l *List) PrevWord() (bool, Word)

func (*List) Progress

func (l *List) Progress() (int, int)

func (*List) Reset

func (l *List) Reset()

func (*List) Verge

func (l *List) Verge() bool

type Word

type Word struct {
	English string `json:"english"`
	Chinese string `json:"chinese,omitempty"`
	// 在搜索引擎搜索图片时搜索什么,如果 Query 为空则把 English 作为 query
	Query string `json:"query,omitempty"`
}

func (Word) GetQuery added in v0.1.2

func (w Word) GetQuery() string

func (Word) Key

func (w Word) Key() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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