Skip to content

Commit 2cde74b

Browse files
committed
docs: Update translate_only.py command instructions in README
- Add clear instructions to run from tools/ai-markmap-agent/ directory - Fix Windows PowerShell path separators (use \ instead of /) - Add alternative examples using absolute paths from project root - Clarify path resolution requirements to prevent empty output files
1 parent f54c056 commit 2cde74b

File tree

1 file changed

+31
-4
lines changed

1 file changed

+31
-4
lines changed

tools/ai-markmap-agent/README.md

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -243,22 +243,49 @@ The output will be saved to:
243243

244244
If you want to translate a specific English file:
245245

246+
**Important**: Run the command from the `tools/ai-markmap-agent/` directory, or use absolute paths.
247+
248+
**Unix/macOS:**
246249
```bash
247-
# Translate a specific file
250+
# Navigate to the script directory first
251+
cd tools/ai-markmap-agent
252+
253+
# Translate a specific file (auto-detects output path)
248254
python translate_only.py --input ../../docs/mindmaps/neetcode_ontology_agent_evolved_en.md
249255

250256
# Or with explicit output path
251257
python translate_only.py \
252258
--input ../../docs/mindmaps/neetcode_ontology_agent_evolved_en.md \
253259
--output ../../docs/mindmaps/neetcode_ontology_agent_evolved_zh-TW.md
254-
255260
```
256261

257262
**Windows PowerShell:**
258263
```powershell
264+
# Navigate to the script directory first
265+
cd tools\ai-markmap-agent
266+
267+
# Translate a specific file (auto-detects output path)
268+
python translate_only.py --input ..\..\docs\mindmaps\neetcode_ontology_agent_evolved_en.md
269+
270+
# Or with explicit output path
259271
python translate_only.py `
260-
--input ../../docs/mindmaps/neetcode_ontology_agent_evolved_en.md `
261-
--output ../../docs/mindmaps/neetcode_ontology_agent_evolved_zh-TW.md
272+
--input ..\..\docs\mindmaps\neetcode_ontology_agent_evolved_en.md `
273+
--output ..\..\docs\mindmaps\neetcode_ontology_agent_evolved_zh-TW.md
274+
```
275+
276+
**Alternative: Use absolute paths from any directory:**
277+
```bash
278+
# Unix/macOS
279+
python tools/ai-markmap-agent/translate_only.py \
280+
--input docs/mindmaps/neetcode_ontology_agent_evolved_en.md \
281+
--output docs/mindmaps/neetcode_ontology_agent_evolved_zh-TW.md
282+
```
283+
284+
```powershell
285+
# Windows PowerShell
286+
python tools\ai-markmap-agent\translate_only.py `
287+
--input docs\mindmaps\neetcode_ontology_agent_evolved_en.md `
288+
--output docs\mindmaps\neetcode_ontology_agent_evolved_zh-TW.md
262289
```
263290
**Method 3: Translate and Generate HTML in One Step**
264291

0 commit comments

Comments
 (0)