decoder

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2024 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Overview

Package decoder provides a way to decode MDX/MDD file in a native way, rather than an external python scripts. It can provides users with easer usage of utilizing existed MDX dictionaries. For more details, please to refer to:

https://github.com/zhansliu/writemdict/blob/master/fileformat.md
https://bitbucket.org/xwang/mdict-analysis/src

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Header struct {
	GeneratedByEngineVersion string `xml:"GeneratedByEngineVersion,attr"`
	RequiredEngineVersion    string `xml:"RequiredEngineVersion,attr"`
	Encrypted                string `xml:"Encrypted,attr"`
	Encoding                 string `xml:"Encoding,attr"`
	Format                   string `xml:"Format,attr"`
	CreationDate             string `xml:"CreationDate,attr"`
	Compact                  string `xml:"Compact,attr"`
	Compat                   string `xml:"Compat,attr"`
	KeyCaseSensitive         string `xml:"KeyCaseSensitive,attr"`
	Description              string `xml:"Description,attr"`
	Title                    string `xml:"Title,attr"`
	DataSourceFormat         string `xml:"DataSourceFormat,attr"`
	StyleSheet               string `xml:"StyleSheet,attr"`
	RegisterBy               string `xml:"RegisterBy,attr"`
	RegCode                  string `xml:"RegCode,attr"`
}

type MDict

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

func (*MDict) Decode

func (m *MDict) Decode(fileName string) error

func (*MDict) DumpData

func (m *MDict) DumpData() error

func (*MDict) DumpDict

func (m *MDict) DumpDict() (map[string]string, error)

DumpDict may cost quite a long time, use it when you actually need the whole data

func (*MDict) Get

func (m *MDict) Get(word string) string

func (*MDict) Keys

func (m *MDict) Keys() []string

Jump to

Keyboard shortcuts

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