translate: 如何做好临终关怀; project setup: skills, AGENTS.md, readme.dj, dj2docx.fish, bilingual workflow
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
## Skills
|
||||
|
||||
MPI skills live in `skills/` and are loaded via `~/.hermes/config.yaml`:
|
||||
Skills in `skills/`. Loaded via `~/.hermes/config.yaml`:
|
||||
|
||||
```yaml
|
||||
skills:
|
||||
@@ -10,32 +10,44 @@ skills:
|
||||
- /home/user/documents/mpi/skills
|
||||
```
|
||||
|
||||
Available skills: `terms-search`, `dharma-translation`, `translation-review`, `chinese-text-normalize`, `pptx-translate`, `pdf-to-docx-conversion`.
|
||||
{% `hermes config set` stringifies list values — edit config.yaml directly. %}
|
||||
|
||||
{% `hermes config set` stringifies list values — edit config.yaml directly for proper YAML list syntax. %}
|
||||
Available: `terms-search`, `dharma-translation`, `translation-review`, `chinese-text-normalize`, `pptx-translate`, `pdf-to-docx-conversion`.
|
||||
|
||||
## Terms Database
|
||||
|
||||
- DB: `terms-search/termlib.duckdb`
|
||||
- CLI: `terms-search/search.py <query> [limit]`
|
||||
- Source priority: DoT定稿 > 内部特色词 > 佛教术语 > 经论名
|
||||
- CLI: `terms-search/search.py <query> [limit]` (preferred over HTTP)
|
||||
- Priority: DoT定稿 > 内部特色词 > 佛教术语 > 经论名
|
||||
|
||||
## Directory Structure
|
||||
|
||||
```
|
||||
translate-files/<topic>/<article>/
|
||||
source.dj — Chinese original
|
||||
target.dj — English translation (match source line count)
|
||||
bilingual.dj — interleaved (source line, blank, target line, blank)
|
||||
```
|
||||
|
||||
`.docx` output → `/tmp/`. Don't commit binaries.
|
||||
|
||||
## Translation Workflow
|
||||
|
||||
1. Load `dharma-translation` and `terms-search` skills
|
||||
2. Search terms DB for key terms before translating
|
||||
3. Translate directly (agent IS the model — no external translation APIs)
|
||||
4. Write `target.dj` alongside `source.dj`, matching source line count
|
||||
5. TOC: bullet list, no link targets
|
||||
2. Search terms DB with `search.py` for key terms before translating
|
||||
3. Translate directly — agent IS the model, no external APIs
|
||||
4. Write `target.dj`, match source line count exactly
|
||||
5. TOC: bullet list, no link targets. No page numbers.
|
||||
6. Create `bilingual.dj` (interleave source/target lines)
|
||||
|
||||
## Djot Conventions
|
||||
## Djot
|
||||
|
||||
- Comments: `{% ... %}`
|
||||
- Em dashes in English: three hyphens (`---`)
|
||||
- En dashes in English: two hyphens (`--`)
|
||||
- No `对照.dj` files — don't create or delete them
|
||||
- Translation formatting: preserve source formatting exactly
|
||||
- Dashes: `---` em, `--` en. Pandoc converts in docx output.
|
||||
- Preserve source formatting — don't add/remove emphasis
|
||||
|
||||
## Scripts
|
||||
|
||||
Fish shell. Live in `scripts/`.
|
||||
Fish shell in `scripts/`.
|
||||
|
||||
- `scripts/dj2docx.fish <target.dj>` — pandoc to `/tmp/`
|
||||
|
||||
Reference in New Issue
Block a user