Crates.io | mdict-parser |
lib.rs | mdict-parser |
version | 0.1.1 |
source | src |
created_at | 2023-02-13 14:04:18.406455 |
updated_at | 2023-02-13 14:18:53.747062 |
description | Mdict dictionary mdx file parser |
homepage | |
repository | https://github.com/eatgrass/mdict-parser.git |
max_upload_size | |
id | 783968 |
size | 22,292 |
A Rust project for parsing mdict dictionaries.
mdict-parser is a tool for parsing mdict dictionaries, a commonly used file format for dictionaries. The resulting output is in a format that can be easily used for other purposes, such as building a dictionary or integrating with other applications.
Parses mdict dictionary .mdx
files into a structured format
Supports multi-value entries
Written in Rust for performance and safety
Add the following to your Cargo.toml file:
[dependencies]
mdict-parser = "0.1.0"
Add the following to your Cargo.toml file:
use mdict_parser::{parser, mdict::Record};
fn main() {
let input = include_bytes!("../dictionary.mdx");
let dict = parser::parse(input);
// iter dictionary entries
for key in dict.keys() {
println!("{:?}" item)
}
// iter all dictionary records
for item in dict.items() {
println!("{:?}" item)
}
}
.mdd
file format supportmdict-parser is licensed under the MIT License.