Skip to content
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

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
Draft

docs: ✨ doc update #661

wants to merge 12 commits into from

Conversation

hellofinch
Copy link
Contributor

add API usage example with custom prompt.

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.
@hellofinch
Copy link
Contributor Author

@awwaawwa 确认一下config这个逻辑合理不。

@awwaawwa awwaawwa self-requested a review February 22, 2025 11:54
@awwaawwa awwaawwa marked this pull request as draft February 24, 2025 16:54
@hellofinch hellofinch marked this pull request as ready for review February 27, 2025 09:47
@hellofinch hellofinch marked this pull request as draft February 27, 2025 09:59
@awwaawwa awwaawwa requested a review from Copilot March 4, 2025 02:12

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.

@awwaawwa awwaawwa added the Won't Merge Further research is needed label Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Won't Merge Further research is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants