python-docs-zh-tw icon indicating copy to clipboard operation
python-docs-zh-tw copied to clipboard

Upgrade Makefile, it can build single html now

Open griiid opened this issue 1 year ago • 6 comments

更新 Makefile 讓他可以只轉換單一 html 檔。

指令為:VERSION=3.12 make build/<path-to-file> 例如:VERSION=3.12 make build/library/internet,就是要 build library/internet.po 的檔案

目前的版本需要大家至少有 make all 一次,之後才能夠使用 make build/<path-to-file> 來轉換單一 html 檔。 如果 clone 後沒有 make all 過,會失敗;這個問題暫時還找不到解法,附上遇到的錯誤訊息如下:

Traceback (most recent call last):
  File "/Users/griiid/.venvs/python-docs-i18n/lib/python3.10/site-packages/sphinx/builders/html/__init__.py", line 937, in load_indexer
    with open(searchindexfn, encoding='utf-8') as ft:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/griiid/test/cpython/Doc/build/html/searchindex.js'

需要討論:

現在暫時的語法為 make build/<path-to-file>,會看起來很像是要 make build/ 路徑下的檔案 需要大家集思廣益,語法應該要怎麼訂比較好,謝謝。

griiid avatar Sep 03 '23 16:09 griiid