# 越南语词典(适用于 Kindle、Pocketbook、Kobo、Boox 等电子书阅读器,以及手机与电脑上的 StarDict、Lingvo、Yomichan/Yomitan 等) 本仓库为电子书阅读器用越南语词典的源代码页面。 如需使用词典,请在此处下载:http://catusf.github.io/。 ## 说明 ## 操作 - 配置环境 `make setup` - 测试环境 `make test` - 构建若干样例词典 `make sample` - 构建全部词典 `make all` ### SSH 私钥 - 在 CodeSpace 中启动时,执行以下命令可将 CodeSpace secret 中的 SSH 私钥同步至 SSH Agent ``` eval $(ssh-agent -s) ssh-add <(echo "$SSH_PRIVATE_TUDIEN_CODESPACE") ``` ### 子模块 - 使用以下命令同步子模块 ``` git submodule update --init --recursive ``` ## Codespaces 使用 Codespaces 进行开发时,请先运行以下两条命令安装工具: ``` ./bin/install_utilities.sh ./bin/install_wine32.sh ``` 随后再次测试: ``` make sample ``` ## 缘起 我之所以做这件事,是因为我认为有必要: - 提供高质量的词典,以裨益自身与大众的学习; - 任何开发者均可使用此处提供的输入数据,产出其他形式的输出; - 可便捷地增补词典——只需新建一个以制表符分隔的文本文件(.tab)与一个描述文件(.toml)。 所需词典应具备: - 准确且便于检索; - 可在多种设备上使用(Kindle、Kobo、Onyx、手机及电脑应用)。 ## 新建词典文件的步骤 1. 安装 Python 3.x 2. 安装所需依赖 `pip install -r requirements.txt` 3. 新建或修改词典定义文件(如 `./dict/TudienCuatoi.tab`) 4. 新建词典描述文件(如 `./dict/TudienCuatoi.toml`) 5. 运行命令 `python ./bin/convert_all.py` 以生成词典,结果将位于 `output` 目录。 剩余步骤为:通过 USB 数据线将新生成的 .mobi 文件复制到 Kindle 的 `documents` 目录即可开始使用。 ```mermaid graph LR; ReadMetadata(File mô tả <.toml>) --> GenTab(File định nghĩa <.tab>); ReadMetadata(File mô tả <.toml>) --> GenTxt(File định nghĩa Pleco <.txt>); GenTab -- tool tab2opf --> HTML_File(File <.opf/html>) -- mobigen --> KindleDict(Từ điển Kindle <.mobi>); GenTab -- tool convert2mdict --> HTML_TXT_File(File <.txt/html>) -- mdict_utils --> Mdict(Từ điển Mdict <.mdx>); GenTab -- chạy PyGlossary --> EpubDict(Từ điển <.epub>); GenTab -- chạy PyGlossary --> KoboDict(Từ điển Kobo <.kobo.zip>); GenTab -- chạy PyGlossary --> StarDict(Từ điển StarDict <.ifo>); GenTab -- chạy PyGlossary --> dictd(Từ điển dictd <.index>); GenTab -- chạy PyGlossary --> Yomitan(Từ điển dictd <.zip>); GenTab -- chạy DSL Tools --> DSLDict(Từ điển Lingvo <.dsl.dz>); GenTxt -- Dùng app Pleco import --> Pleco_PQB(Từ điển Pleco <.pqb>); dictd(Từ điển dictd <.index>) -- chạy makedict --> XDXF(Từ điển dạng XDXF); XDXF(Từ điển XDXF <.xdxf>) -- chạy Pocketbook converter.exe --> DIC(Từ điển Pocketbook <.dic>); ``` ## 现有词典及其词条数量 完整列表见 [catusf](https://catusf.github.io/)。 ## 与作者交流 👉 [**在 Discord 上与作者交流:**](https://discord.gg/Zr4XUgH7) [![Release all dictionaries](https://github.com/catusf/tudien/actions/workflows/release_all.yml/badge.svg)](https://github.com/catusf/tudien/actions/workflows/release_all.yml) ## 关于本镜像 本仓库系 catusf/tudien 的忠实镜像。原项目以 CC0 1.0 通用公共领域贡献许可发布,著作权已放弃,可供任何人自由使用。上游版本为 commit a7dd918(2025-12-19),抓取于 2026-10-02;来源与完整许可见本仓 LICENSE。