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 等) # 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.
如需使用词典,请在此处下载:http://catusf.github.io/。 Để 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` `make setup`
- 测试环境 - Test môi trường
`make test` `make test`
- 构建若干样例词典 - Build mẫu vài từ điển
`make sample` `make sample`
- 构建全部词典 - Build tất cả từ điển
`make all` `make all`
### SSH 私钥
### SSH Private Key
- 在 CodeSpace 中启动时,执行以下命令可将 CodeSpace secret 中的 SSH 私钥同步至 SSH Agent
- 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") eval $(ssh-agent -s)
``` ssh-add <(echo "$SSH_PRIVATE_TUDIEN_CODESPACE")
```
### 子模块
### Submodules
- 使用以下命令同步子模块
- Sync submodule về bằng lệnh
```
git submodule update --init --recursive ```
``` git submodule update --init --recursive
```
## Codespaces
## Codespaces
使用 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 ./bin/install_utilities.sh
``` ./bin/install_wine32.sh
随后再次测试: ```
``` Sau đó test lại bằng
make sample
``` ```
make sample
## 缘起 ```
我之所以做这件事,是因为我认为有必要:
- 提供高质量的词典,以裨益自身与大众的学习; ## Tại sao?
- 任何开发者均可使用此处提供的输入数据,产出其他形式的输出; Do tôi thấy cần:
- 可便捷地增补词典——只需新建一个以制表符分隔的文本文件(.tab)与一个描述文件(.toml)。 - 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
- 准确且便于检索;
- 可在多种设备上使用(Kindle、Kobo、Onyx、手机及电脑应用)。 Các từ điển cần:
## 新建词典文件的步骤 - Chính xác và dễ tra cứu
1. 安装 Python 3.x - Dùng được trên nhiều thiết bị (Kindle, Kobo, Onyx, mobile và PC apps)
2. 安装所需依赖 `pip install -r requirements.txt`
3. 新建或修改词典定义文件(如 `./dict/TudienCuatoi.tab`) ## Các bước cách tạo ra file từ điển mới
4. 新建词典描述文件(如 `./dict/TudienCuatoi.toml`) 1. Cài Python 3.x
5. 运行命令 `python ./bin/convert_all.py` 以生成词典,结果将位于 `output` 目录。 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`)
剩余步骤为:通过 USB 数据线将新生成的 .mobi 文件复制到 Kindle 的 `documents` 目录即可开始使用。 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`
```mermaid
graph LR; 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.
ReadMetadata(File mô tả <.toml>) --> GenTab(File định nghĩa <.tab>);
ReadMetadata(File mô tả <.toml>) --> GenTxt(File định nghĩa Pleco <.txt>); ```mermaid
GenTab -- tool tab2opf --> HTML_File(File <.opf/html>) -- mobigen --> KindleDict(Từ điển Kindle <.mobi>); graph LR;
GenTab -- tool convert2mdict --> HTML_TXT_File(File <.txt/html>) -- mdict_utils --> Mdict(Từ điển Mdict <.mdx>); ReadMetadata(File mô tả <.toml>) --> GenTab(File định nghĩa <.tab>);
GenTab -- chạy PyGlossary --> EpubDict(Từ điển <.epub>); ReadMetadata(File mô tả <.toml>) --> GenTxt(File định nghĩa Pleco <.txt>);
GenTab -- chạy PyGlossary --> KoboDict(Từ điển Kobo <.kobo.zip>); GenTab -- tool tab2opf --> HTML_File(File <.opf/html>) -- mobigen --> KindleDict(Từ điển Kindle <.mobi>);
GenTab -- chạy PyGlossary --> StarDict(Từ điển StarDict <.ifo>); GenTab -- tool convert2mdict --> HTML_TXT_File(File <.txt/html>) -- mdict_utils --> Mdict(Từ điển Mdict <.mdx>);
GenTab -- chạy PyGlossary --> dictd(Từ điển dictd <.index>); GenTab -- chạy PyGlossary --> EpubDict(Từ điển <.epub>);
GenTab -- chạy PyGlossary --> Yomitan(Từ điển dictd <.zip>); GenTab -- chạy PyGlossary --> KoboDict(Từ điển Kobo <.kobo.zip>);
GenTab -- chạy DSL Tools --> DSLDict(Từ điển Lingvo <.dsl.dz>); GenTab -- chạy PyGlossary --> StarDict(Từ điển StarDict <.ifo>);
GenTxt -- Dùng app Pleco import --> Pleco_PQB(Từ điển Pleco <.pqb>); GenTab -- chạy PyGlossary --> dictd(Từ điển dictd <.index>);
dictd(Từ điển dictd <.index>) -- chạy makedict --> XDXF(Từ điển dạng XDXF); GenTab -- chạy PyGlossary --> Yomitan(Từ điển dictd <.zip>);
XDXF(Từ điển XDXF <.xdxf>) -- chạy Pocketbook converter.exe --> DIC(Từ điển Pocketbook <.dic>); 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/)。
## Danh sách các từ điển và số từ hiện có
## 与作者交流
👉 [**在 Discord 上与作者交流:**](https://discord.gg/Zr4XUgH7) Xem danh sách đầy đủ ở đây [catusf](https://catusf.github.io/).
[![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) ## 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)
本仓库系 catusf/tudien 的忠实镜像。原项目以 CC0 1.0 通用公共领域贡献许可发布,著作权已放弃,可供任何人自由使用。上游版本为 commit a7dd918(2025-12-19),抓取于 2026-10-02;来源与完整许可见本仓 LICENSE。