Logo di Mineru Pdf Translate

Mineru Pdf Translate

Community
flycalm
mineru-pdf-translate

Translate local PDF papers through MinerU and an OpenAI-compatible model into final PDFs. Correct OCR using source PDF crops during translation, preserve figures, and validate formula and image rendering.

Panoramica

Pubblicato daflycalm
Repositorymineru-pdf-translate
Nome della skillmineru-pdf-translate
Stelle
99
Fork
3
File inclusi
4
LicenzaMIT
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • File inclusi: 4

    Script, template e riferimenti che il modello può leggere mentre lavora. I file sono di sola lettura e non vengono mai eseguiti.

  • Open source

    Pubblicata da flycalm su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Mineru Pdf Translate in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/flycalm/mineru-pdf-translate/tree/main/mineru-pdf-translate
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/flycalm/mineru-pdf-translate.git /tmp/mineru-pdf-translate
mkdir -p .claude/skills
cp -r /tmp/mineru-pdf-translate/mineru-pdf-translate .claude/skills/mineru-pdf-translate
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Mineru Pdf Translate in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Mineru Pdf Translate non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Mineru Pdf Translate non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

MinerU PDF Translate

Run scripts/pdf_translate.py on the folder containing the source PDFs. Translate the entire document, including appendices and captions. Deliver the final PDFs in translated/; keep intermediate files out of that folder. Do not produce a separate inspection report unless requested.

Translation and correction

The default --ocr-correction auto supplies the translation model with original PDF crops and MinerU's OCR strings for formulas and tables. Corrections are returned separately from the translated prose, so the model cannot accidentally remove or reorder protected units.

  • Correct transcription errors against the source, including empty-set symbols, norm bars, signs, accents, indices, equation numbering and table cell alignment. Preserve the author's mathematics, data and claims.
  • Correct obvious OCR errors in prose using context. A word mistakenly detected as inline math can return to ordinary translated text.
  • Use source images for units the model cannot read confidently, for invalid corrections, and for models that reject image input. Translate surrounding prose and captions normally. Internal labels in source images remain in the original language.
  • Preserve formula numbering. A MathJax syntax error in a corrected formula triggers a source-image fallback during rendering.
  • Source comparison needs MinerU layout.json and Python PyMuPDF. If unavailable, explain the limitation; use --ocr-correction off only when the user accepts translation without automatic source comparison.
  • Custom ocr_repairs.json remains available for exact, source-verified prose repairs. Do not add paper-specific symbols, file names or inferred formulas to the built-in rules.

The correction process is conservative but cannot guarantee semantic correctness. Inspect representative complex equations, tables and the appendix ending against the original before delivery. Internal validation runs without creating a separate report.

Configuration

Read configuration privately; never display credentials or signed storage URLs. Prefer explicit command options, then files in the PDF folder, then environment variables.

Supported files:

  • mineru密钥.txt: MinerU token.
  • 翻译大模型url以及key.txt: base URL and API key on two lines.
  • 大模型和mineru的key.txt: labelled model:, url:, key: and mineru: fields. A value may occupy the next line. Do not duplicate these keys into the skill folder.

Environment alternatives: MINERU_API_TOKEN, PDF_TRANSLATE_LLM_BASE_URL, PDF_TRANSLATE_LLM_API_KEY, PDF_TRANSLATE_MODEL. Choose a model accepting image input for automatic OCR correction. The script uses the model supplied in configuration; the legacy default applies only when no model is specified.

The renderer needs Node.js, Playwright and an installed Edge/Chrome/Chromium browser. It discovers the Codex bundled Node/Playwright runtime when available. Outside Codex, use an installed Node playwright package or set PDF_TRANSLATE_NODE_MODULES to its node_modules folder. Override the executables with PDF_TRANSLATE_NODE, PDF_TRANSLATE_BROWSER or --browser-path. The Python markdown package is installed automatically if missing; PyMuPDF is needed for source crops.

Commands

Resolve <skill-dir> to this skill's directory. On Windows, use py if python resolves to a nonworking Store alias.

Translate and retain caches for inspection or rerendering:

powershell
python <skill-dir>\scripts\pdf_translate.py --workdir <pdf-folder> --keep-temp

Re-render cached translations without MinerU or model calls:

powershell
python <skill-dir>\scripts\pdf_translate.py --workdir <pdf-folder> --render-only --keep-temp

Other options:

  • --workers 3: maximum simultaneous translation requests. Lower this for a rate-limited endpoint.
  • --target-language "Japanese" --target-suffix ja: choose another target.
  • --force: discard document caches and rebuild. Do not use this merely to retry interrupted chunks or fix rendering.
  • --ocr-correction off: protect extracted formulas without source comparison; use only for an explicitly accepted legacy workflow.

Reliability and rendering

  • Failed or interrupted runs retain their caches. MinerU task IDs survive upload, polling and download failures; resume an existing task rather than paying for another parse. Successful translation chunks are written atomically and reused only for matching source, model, endpoint, language and correction mode.
  • Preserve source whitespace at chunk boundaries. Never concatenate stripped chunks in a way that joins headings to paragraphs or words together. Limit image evidence per request without changing source order.
  • Embed local images into the render HTML and use short temporary rendering paths to avoid Windows path-loading failures. Group multi-panel figures only when the layout identifies one figure and the image references are contiguous; do not swallow captions or intervening text.
  • Wait for fonts, images and MathJax startup to finish. Missing images, remaining placeholder tokens and unresolved formula errors fail rendering. Print without browser headers or footers. Replace a previous output only after a valid new PDF exists.
  • Disable MathJax's noundefined extension so unknown commands raise detectable errors rather than printing macro names (see MathJax v3 documentation).
  • MathJax v3 is loaded from the existing CDN; if unavailable, report the render failure and retain caches. Do not treat file existence alone as proof that equations rendered.
  • MinerU uploads directly to its own storage by default. Connection errors use bounded retries and can try its OSS acceleration hostname. PDF_TRANSLATE_UPLOAD_HOST overrides the alternate hostname. Optional PDF_TRANSLATE_DOWNLOAD_RESOLVE=host:443:ip uses curl's route override with normal TLS verification; do not change system DNS or disable certificate verification.
  • --keep-temp retains MinerU output, source crops and per-chunk translation caches in .pdf_translate_tmp/. No QA report is written. Failed-file diagnostics stay in the temporary folder.

If the user also requests Zotero import, use an available Zotero tool, deduplicate by reliable metadata, attach the original and final translation to the same parent item, and verify the stored attachments. PDF translation alone does not request a Zotero mutation.

Resources

  • scripts/pdf_translate.py: batch parsing, translation, resumable caching and rendering.
  • scripts/source_evidence.py: source-coordinate crops, formula/table pairing and correction validation.
  • scripts/render_pdf.cjs: browser completion waits and source fallback for invalid math.

File inclusi

Il modello legge questi file quando servono, mentre la skill è caricata. Sono accessibili in sola lettura e non vengono mai eseguiti.

Domande frequenti

Cosa fa la skill IA Mineru Pdf Translate?

Translate local PDF papers through MinerU and an OpenAI-compatible model into final PDFs. Correct OCR using source PDF crops during translation, preserve figures, and validate formula and image rendering.

Perché usare Mineru Pdf Translate su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Mineru Pdf Translate è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Mineru Pdf Translate in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/flycalm/mineru-pdf-translate/tree/main/mineru-pdf-translate. TypingMind legge il file SKILL.md, include i file associati e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Mineru Pdf Translate?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Mineru Pdf Translate?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Mineru Pdf Translate: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Mineru Pdf Translate è gratuita?

Sì. È pubblicata su GitHub da flycalm con licenza MIT. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇