0.0.1 • Published 9 months ago

mdx-dict-parser v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

MDX-DICT-PARSER

This is a package based on napi-rs and mdict-parser, which provides the node-binding to read all the words and their definitions from mdict(.mdx) file.

Usage

This package is ESM only.

First, install the package

npm i mdx-dict-parser

You can write such code in typescript.

import { parseMdict, DictRecord } from "mdx-dict-parser";

const filePath = "./the/path/to/your/dictionary.mdx";
const data: DictRecord[] = parseMdict(filePath);
const thirdRecord = data[3];
console.log(thirdRecord); // Print the third record.

Roadmap

This project is planned to implement these following functions soon.

  • mdict 1.0 and 3.0 support.
  • Read details for mdict file.
  • MDD parser support.

LICENSE

MIT@但为君故.

0.0.1

9 months ago

0.0.0

9 months ago