Browse Source

doc (readme): banner image

Rongxin 1 year ago
parent
commit
3ed6f6e585
3 changed files with 14 additions and 10 deletions
  1. 7 8
      README.md
  2. 7 2
      README_zh-CN.md
  3. BIN
      docs/images/banner.jpg

+ 7 - 8
README.md

@@ -1,9 +1,8 @@
 <div align="center">
 <div align="center">
-
+<img src="./docs/images/banner.jpg" alt="PDF2ZH">  
+  
 English | [简体中文](README_zh-CN.md)
 English | [简体中文](README_zh-CN.md)
 
 
-# PDFMathTranslate
-
 <p>
 <p>
   <!-- PyPI -->
   <!-- PyPI -->
   <a href="https://pypi.org/project/pdf2zh/">
   <a href="https://pypi.org/project/pdf2zh/">
@@ -39,18 +38,19 @@ pip install pdf2zh
 
 
 ## Usage
 ## Usage
 
 
-Execute the translation command in the command line to generate the translated document `example-zh.pdf` and the bilingual document `example-dual.pdf` in the current directory. Use Google as the default translation service. 
+Execute the translation command in the command line to generate the translated document `example-zh.pdf` and the bilingual document `example-dual.pdf` in the current directory. Use Google as the default translation service.
 
 
 Please refer to [ChatGPT](https://chatgpt.com/share/6734a83d-9d48-800e-8a46-f57ca6e8bcb4) for how to set environment variables.
 Please refer to [ChatGPT](https://chatgpt.com/share/6734a83d-9d48-800e-8a46-f57ca6e8bcb4) for how to set environment variables.
 
 
 ### Full / partial document translation
 ### Full / partial document translation
- - Entire document
+
+- Entire document
 
 
   ```bash
   ```bash
   pdf2zh example.pdf
   pdf2zh example.pdf
   ```
   ```
 
 
- - Part of the document
+- Part of the document
 
 
   ```bash
   ```bash
   pdf2zh example.pdf -p 1-3,5
   pdf2zh example.pdf -p 1-3,5
@@ -78,7 +78,6 @@ pdf2zh example.pdf -li en -lo ja
   pdf2zh example.pdf -s deepl
   pdf2zh example.pdf -s deepl
   ```
   ```
 
 
-
 - **DeepLX**
 - **DeepLX**
 
 
   See [DeepLX](https://github.com/OwO-Network/DeepLX)
   See [DeepLX](https://github.com/OwO-Network/DeepLX)
@@ -123,12 +122,12 @@ pdf2zh example.pdf -li en -lo ja
   - `AZURE_ENDPOINT`, e.g, `export AZURE_ENDPOINT=https://api.translator.azure.cn/`
   - `AZURE_ENDPOINT`, e.g, `export AZURE_ENDPOINT=https://api.translator.azure.cn/`
   - `AZURE_REGION`, e.g., `export AZURE_REGION=chinaeast2`
   - `AZURE_REGION`, e.g., `export AZURE_REGION=chinaeast2`
 
 
-
   ```bash
   ```bash
   pdf2zh example.pdf -s azure
   pdf2zh example.pdf -s azure
   ```
   ```
 
 
 ### Translate wih exceptions
 ### Translate wih exceptions
+
 Use regex to specify formula fonts and characters that need to be preserved.
 Use regex to specify formula fonts and characters that need to be preserved.
 
 
 ```bash
 ```bash

+ 7 - 2
README_zh-CN.md

@@ -1,9 +1,9 @@
 <div align="center">
 <div align="center">
 
 
+<img src="./docs/images/banner.jpg" alt="PDF2ZH">  
+  
 [English](README.md) | 简体中文
 [English](README.md) | 简体中文
 
 
-# PDFMathTranslate
-
 <p>
 <p>
   <!-- PyPI -->
   <!-- PyPI -->
   <a href="https://pypi.org/project/pdf2zh/">
   <a href="https://pypi.org/project/pdf2zh/">
@@ -72,6 +72,7 @@ pdf2zh example.pdf -li en -lo ja
 参考 [DeepL](https://support.deepl.com/hc/en-us/articles/360020695820-API-Key-for-DeepL-s-API)
 参考 [DeepL](https://support.deepl.com/hc/en-us/articles/360020695820-API-Key-for-DeepL-s-API)
 
 
 设置环境变量构建接入点:`{DEEPL_SERVER_URL}/translate`
 设置环境变量构建接入点:`{DEEPL_SERVER_URL}/translate`
+
 - `DEEPL_SERVER_URL`(可选), e.g., `export DEEPL_SERVER_URL=https://api.deepl.com`
 - `DEEPL_SERVER_URL`(可选), e.g., `export DEEPL_SERVER_URL=https://api.deepl.com`
 - `DEEPL_AUTH_KEY`, e.g., `export DEEPL_AUTH_KEY=xxx`
 - `DEEPL_AUTH_KEY`, e.g., `export DEEPL_AUTH_KEY=xxx`
 
 
@@ -84,6 +85,7 @@ pdf2zh example.pdf -s deepl
 参考 [DeepLX](https://github.com/OwO-Network/DeepLX)
 参考 [DeepLX](https://github.com/OwO-Network/DeepLX)
 
 
 设置环境变量构建接入点:`{DEEPLX_SERVER_URL}/translate`
 设置环境变量构建接入点:`{DEEPLX_SERVER_URL}/translate`
+
 - `DEEPLX_SERVER_URL`(可选), e.g., `export DEEPLX_SERVER_URL=https://api.deepl.com`
 - `DEEPLX_SERVER_URL`(可选), e.g., `export DEEPLX_SERVER_URL=https://api.deepl.com`
 - `DEEPLX_AUTH_KEY`, e.g., `export DEEPLX_AUTH_KEY=xxx`
 - `DEEPLX_AUTH_KEY`, e.g., `export DEEPLX_AUTH_KEY=xxx`
 
 
@@ -96,6 +98,7 @@ pdf2zh example.pdf -s deepl
 参考 [Ollama](https://github.com/ollama/ollama)
 参考 [Ollama](https://github.com/ollama/ollama)
 
 
 设置环境变量构建接入点:`{OLLAMA_HOST}/api/chat`
 设置环境变量构建接入点:`{OLLAMA_HOST}/api/chat`
+
 - `OLLAMA_HOST`(可选), e.g., `export OLLAMA_HOST=https://localhost:11434`
 - `OLLAMA_HOST`(可选), e.g., `export OLLAMA_HOST=https://localhost:11434`
 
 
 ```bash
 ```bash
@@ -107,6 +110,7 @@ pdf2zh example.pdf -s ollama:gemma2
 参考 [SiliconCloud](https://docs.siliconflow.cn/quickstart), [Zhipu](https://open.bigmodel.cn/dev/api/thirdparty-frame/openai-sdk)
 参考 [SiliconCloud](https://docs.siliconflow.cn/quickstart), [Zhipu](https://open.bigmodel.cn/dev/api/thirdparty-frame/openai-sdk)
 
 
 设置环境变量构建接入点:`{OPENAI_BASE_URL}/chat/completions`
 设置环境变量构建接入点:`{OPENAI_BASE_URL}/chat/completions`
+
 - `OPENAI_BASE_URL`(可选), e.g., `export OPENAI_BASE_URL=https://api.openai.com/v1`
 - `OPENAI_BASE_URL`(可选), e.g., `export OPENAI_BASE_URL=https://api.openai.com/v1`
 - `OPENAI_API_KEY`, e.g., `export OPENAI_API_KEY=xxx`
 - `OPENAI_API_KEY`, e.g., `export OPENAI_API_KEY=xxx`
 
 
@@ -119,6 +123,7 @@ pdf2zh example.pdf -s openai:gpt-4o
 参考 [Azure Text Translation](https://docs.azure.cn/en-us/ai-services/translator/text-translation-overview)
 参考 [Azure Text Translation](https://docs.azure.cn/en-us/ai-services/translator/text-translation-overview)
 
 
 需设置以下环境变量:
 需设置以下环境变量:
+
 - `AZURE_APIKEY`, e.g., `export AZURE_APIKEY=xxx`
 - `AZURE_APIKEY`, e.g., `export AZURE_APIKEY=xxx`
 - `AZURE_ENDPOINT`, e.g., `export AZURE_ENDPOINT=https://api.translator.azure.cn/`
 - `AZURE_ENDPOINT`, e.g., `export AZURE_ENDPOINT=https://api.translator.azure.cn/`
 - `AZURE_REGION`, e.g., `export AZURE_REGION=chinaeast2`
 - `AZURE_REGION`, e.g., `export AZURE_REGION=chinaeast2`

BIN
docs/images/banner.jpg