https://github.com/eatgrass/mdict-parser
.mdx dictionary parser
https://github.com/eatgrass/mdict-parser
dictionary parser rust
Last synced: 5 months ago
JSON representation
.mdx dictionary parser
- Host: GitHub
- URL: https://github.com/eatgrass/mdict-parser
- Owner: eatgrass
- Created: 2023-02-11T14:49:00.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-04-11T14:28:29.000Z (almost 2 years ago)
- Last Synced: 2025-06-23T19:06:10.957Z (7 months ago)
- Topics: dictionary, parser, rust
- Language: Rust
- Homepage: https://crates.io/crates/mdict-parser
- Size: 23.6 MB
- Stars: 18
- Watchers: 2
- Forks: 5
- Open Issues: 3
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# mdict-parser
A Rust project for parsing mdict dictionaries.
## Introduction
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.
## Features
Parses mdict dictionary `.mdx` files into a structured format
Supports multi-value entries
Written in Rust for performance and safety
## Usage
Add the following to your Cargo.toml file:
```toml
[dependencies]
mdict-parser = "0.1.0"
```
Add the following to your Cargo.toml file:
```rust
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!("{:?}", key);
}
// iter all dictionary records
for item in dict.items() {
println!("{:?}", item);
}
}
```
## Unimplemented Features
* `.mdd` file format support
* mdict v3 format support
* Encrypted dictionary file support
## License
mdict-parser is licensed under the MIT License.