diff --git a/Dockerfile b/Dockerfile index c6dc7ba..4aeb9db 100644 --- a/Dockerfile +++ b/Dockerfile @@ -174,9 +174,9 @@ ENV PATH="/root/.local/bin:${PATH}" RUN mkdir -p /models/pdfmathtranslate && \ # 預先下載 DocLayout-YOLO ONNX 模型 python3 -c "from huggingface_hub import hf_hub_download; \ - hf_hub_download(repo_id='wybxc/DocLayout-YOLO-DocStructBench-onnx', \ - filename='model.onnx', \ - local_dir='/models/pdfmathtranslate')" && \ + hf_hub_download(repo_id='wybxc/DocLayout-YOLO-DocStructBench-onnx', \ + filename='model.onnx', \ + local_dir='/models/pdfmathtranslate')" && \ # 執行 babeldoc warmup 預載入模型 babeldoc --warmup || true && \ # 清理 cache @@ -185,15 +185,15 @@ RUN mkdir -p /models/pdfmathtranslate && \ # 下載 PDFMathTranslate 所需字型 RUN mkdir -p /app && \ curl -L -o /app/GoNotoKurrent-Regular.ttf \ - "https://github.com/satbyy/go-noto-universal/releases/download/v7.0/GoNotoKurrent-Regular.ttf" && \ + "https://github.com/satbyy/go-noto-universal/releases/download/v7.0/GoNotoKurrent-Regular.ttf" && \ curl -L -o /app/SourceHanSerifCN-Regular.ttf \ - "https://github.com/timelic/source-han-serif/releases/download/main/SourceHanSerifCN-Regular.ttf" && \ + "https://github.com/timelic/source-han-serif/releases/download/main/SourceHanSerifCN-Regular.ttf" && \ curl -L -o /app/SourceHanSerifTW-Regular.ttf \ - "https://github.com/timelic/source-han-serif/releases/download/main/SourceHanSerifTW-Regular.ttf" && \ + "https://github.com/timelic/source-han-serif/releases/download/main/SourceHanSerifTW-Regular.ttf" && \ curl -L -o /app/SourceHanSerifJP-Regular.ttf \ - "https://github.com/timelic/source-han-serif/releases/download/main/SourceHanSerifJP-Regular.ttf" && \ + "https://github.com/timelic/source-han-serif/releases/download/main/SourceHanSerifJP-Regular.ttf" && \ curl -L -o /app/SourceHanSerifKR-Regular.ttf \ - "https://github.com/timelic/source-han-serif/releases/download/main/SourceHanSerifKR-Regular.ttf" + "https://github.com/timelic/source-han-serif/releases/download/main/SourceHanSerifKR-Regular.ttf" # PDFMathTranslate 環境變數 ENV PDFMATHTRANSLATE_MODELS_PATH="/models/pdfmathtranslate" diff --git a/README.md b/README.md index 51b5299..907466e 100644 --- a/README.md +++ b/README.md @@ -157,16 +157,16 @@ docker compose up -d ## 支援格式 -| 轉換器 | 用途 | 格式數 | -| ---------------- | ------------ | ------ | -| FFmpeg | 影音 | 400+ | -| ImageMagick | 圖片 | 200+ | -| LibreOffice | 文件 | 60+ | -| Pandoc | 文件 | 100+ | -| Calibre | 電子書 | 40+ | -| Inkscape | 向量圖 | 20+ | -| MinerU | 文件→MD | 2 | -| PDFMathTranslate | PDF 翻譯 | 15+ | +| 轉換器 | 用途 | 格式數 | +| ---------------- | -------- | ------ | +| FFmpeg | 影音 | 400+ | +| ImageMagick | 圖片 | 200+ | +| LibreOffice | 文件 | 60+ | +| Pandoc | 文件 | 100+ | +| Calibre | 電子書 | 40+ | +| Inkscape | 向量圖 | 20+ | +| MinerU | 文件→MD | 2 | +| PDFMathTranslate | PDF 翻譯 | 15+ | 完整列表 → [docs/converters.md](docs/converters.md) @@ -196,6 +196,7 @@ PDFMathTranslate 是一個內容轉換引擎,用於翻譯 PDF 文件同時保 ### 輸出格式 所有輸出一律打包為 `.tar` 檔案,包含: + - `original.pdf` — 原始 PDF 文件 - `translated-.pdf` — 翻譯後的 PDF 文件 @@ -215,10 +216,10 @@ PDFMathTranslate ### 環境變數 -| 變數 | 說明 | 預設值 | -| --------------------------- | -------------------------- | ------- | -| `PDFMATHTRANSLATE_SERVICE` | 翻譯服務提供商 | google | -| `PDFMATHTRANSLATE_MODELS_PATH` | 模型路徑 | /models/pdfmathtranslate | +| 變數 | 說明 | 預設值 | +| ------------------------------ | -------------- | ------------------------ | +| `PDFMATHTRANSLATE_SERVICE` | 翻譯服務提供商 | google | +| `PDFMATHTRANSLATE_MODELS_PATH` | 模型路徑 | /models/pdfmathtranslate | ### 注意事項