-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: ✨ doc update #661
base: main
Are you sure you want to change the base?
docs: ✨ doc update #661
Conversation
add API usage example with custom prompt.
if config save null, it will save `NULL`. When get the key, `NULL` will ignore and read the environment and the default value.
@awwaawwa 确认一下config这个逻辑合理不。 |
TMT with config miss env which lead to fail to translate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Overview
This pull request updates the documentation with a new API usage example featuring a custom prompt and adjusts code to support dynamic font URLs and regional configuration.
- Refactors font download logic to use a dynamic URL from the configuration and adds progress reporting.
- Introduces a new command-line argument (--CN) to toggle regional settings and update environment variables.
- Updates API and advanced documentation with instructions for custom prompt usage and Docker configuration, and adjusts translator classes to include an "iskey" attribute.
Reviewed Changes
File | Description |
---|---|
pdf2zh/high_level.py | Refactors font download logic to use a configurable URL and provides progress UI. |
pdf2zh/pdf2zh.py | Adds a new "--CN" argument and reorders configuration calls. |
docs/APIS.md | Updates curl examples and adds a custom prompt usage example. |
pdf2zh/gui.py | Dynamically sets input field type based on translator "iskey" settings. |
docs/ADVANCED.md | Adds Docker-specific custom configuration instructions. |
pdf2zh/translator.py | Adds "iskey" attributes with accompanying comments across translator classes. |
README.md | Updates documentation to reference new Docker configuration guidance. |
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
add API usage example with custom prompt.