Documentation
¶
Index ¶
- func BackupCahceFiles()
- func ClearCahceFiles()
- func DeleteWords(args []string) error
- func DisplayLogo(version string)
- func DisplayWords(withPlay int)
- func DoPlayFile(aFile string) error
- func Execute(workDir, script string, args ...string) bool
- func GetBakFileName() string
- func IsAvailableOS() bool
- func IsChinese(str string) bool
- func ListWords(withPlay int)
- func LoadEnv()
- func OpenLocalDB() (*leveldb.DB, error)
- func ParseArgs(args []string) (words []string, withVoice int, withMore bool, isQuiet bool, withCache bool, ...)
- func SaveVoiceFile(name string, body io.ReadCloser) (string, error)
- func ScanWords() (map[string]DictResult, error)
- type DictResult
- type QueryParam
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BackupCahceFiles ¶
func BackupCahceFiles()
func ClearCahceFiles ¶
func ClearCahceFiles()
func DeleteWords ¶
func DisplayLogo ¶
func DisplayLogo(version string)
func DisplayWords ¶
func DisplayWords(withPlay int)
func DoPlayFile ¶
func GetBakFileName ¶
func GetBakFileName() string
GetBakFileName generates a backup file name by current date and time
func IsAvailableOS ¶
func IsAvailableOS() bool
func OpenLocalDB ¶
func SaveVoiceFile ¶
func SaveVoiceFile(name string, body io.ReadCloser) (string, error)
func ScanWords ¶
func ScanWords() (map[string]DictResult, error)
Types ¶
type DictResult ¶
type DictResult struct { WordString string PartOfSpeech string Meanings []string Hints [][]string Pronounce string Result string Sentences [][]string AudioFilePath string }
func QueryLocalDB ¶
func QueryLocalDB(key string, db *leveldb.DB) (*DictResult, error)
func (DictResult) Print ¶
func (this DictResult) Print(fromTag string, playCount int)
func (DictResult) RemoveAudioFile ¶
func (this DictResult) RemoveAudioFile() error
func (DictResult) SaveLocalDB ¶
func (this DictResult) SaveLocalDB(db *leveldb.DB) error
type QueryParam ¶
type QueryParam struct { Words []string WordString string IsSentence bool IsQuiet bool IsChinese bool IsMulti bool WithMore bool WithCache bool WithVoice int }
func (QueryParam) DoQuery ¶
func (this QueryParam) DoQuery()
func (QueryParam) ParseWeb ¶
func (this QueryParam) ParseWeb(doc, docMore *goquery.Document) DictResult
Click to show internal directories.
Click to hide internal directories.