mirror: 还原 README 至上游原版(去除本地 provenance 注释),恢复 1:1 保真

This commit is contained in:
Li_Feiyu committed 2026-10-02 22:54:53 +08:00
1 parent fae8c948cd
commit 22fa75a439
1 file changed
+106 -107
+106 -107
View File
@@ -1,107 +1,106 @@
# 越南语词典(适用于 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。
# Từ điển tiếng Việt dành cho máy đọc sách Kindle, Pocketbook, Kobo, Boox, v.v. cũng như trên điện thoại và máy tính, như StarDict, Lingvo, Yomichan/Yomitan, v.v.
Đây là trang mã nguồn cho từ điển dành cho máy đọc sách.
Để sử dụng từ điển, download tại đây http://catusf.github.io/.
## Ghi chú
## Thực hiện
- Setup môi trường
`make setup`
- Test môi trường
`make test`
- Build mẫu vài từ điển
`make sample`
- Build tất cả từ điển
`make all`
### SSH Private Key
- Khi tạo khởi động CodeSpace để dev, thực hiện lệnh sau để đồng bộ SSH Private Key từ CodeSpace secret vào SSH Agent
```
eval $(ssh-agent -s)
ssh-add <(echo "$SSH_PRIVATE_TUDIEN_CODESPACE")
```
### Submodules
- Sync submodule về bằng lệnh
```
git submodule update --init --recursive
```
## Codespaces
Khi dùng Codespaces để develop, ban đầu hãy chạy 2 lệnh sau để cài đặt tool:
```
./bin/install_utilities.sh
./bin/install_wine32.sh
```
Sau đó test lại bằng
```
make sample
```
## Tại sao?
Do tôi thấy cần:
- Có các từ điển có chất lượng để giúp việc học hỏi của bản thân và mọi người
- Lập trình viên bất kỳ có thể dùng dữ liệu đầu vào ở đây để tạo output khác
- Có thể dễ dàng bổ sung từ điển - chỉ cần tạo 1 file văn bản phân cách bằng dấu \t (.tab) và 1 file mô tả .toml
Các từ điển cần:
- Chính xác và dễ tra cứu
- Dùng được trên nhiều thiết bị (Kindle, Kobo, Onyx, mobile và PC apps)
## Các bước cách tạo ra file từ điển mới
1. Cài Python 3.x
2. Cài các package cần thiết `pip install -r requirements.txt`
3. Tạo mới hay sửa file định nghĩa từ điển (như `./dict/TudienCuatoi.tab`)
4. Tạo một file mô tả từ điển (như `./dict/TudienCuatoi.toml`)
5. Chạy dòng lệnh `python ./bin/convert_all.py` để tạo từ điển. Kết quả sẽ có trong thư mục `output`
Việc còn lại là copy file .mobi vừa được tạo ra bằng dây cáp USB vào thư mục `documents` trên Kindle để bắt đầu sử dụng.
```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>);
```
## Danh sách các từ điển và số từ hiện có
Xem danh sách đầy đủ ở đây [catusf](https://catusf.github.io/).
## Chat với tác giả
👉 [**Chat với tác giả trên 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)