explaingit

bigdawnghost/wenyi

Analysis updated 2026-05-18

1,647PythonAudience · developerComplexity · 3/5Setup · moderate

TLDR

A command line tool that translates full length EPUB, FB2, TXT, Markdown, HTML, and PDF novels into Chinese, using whole book context to keep names and terms consistent.

Mindmap

mindmap
  root((Wenyi))
    What it does
      Translates novels
      Whole book context
      Chinese output
    Tech stack
      Python
      uv
      DeepSeek API
    Use cases
      EPUB translation
      Bilingual editions
      PDF conversion
    Audience
      Translators
      Developers
      Readers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Translate a full EPUB novel into Chinese while keeping character names and terms consistent.

USE CASE 2

Convert a PDF novel into a bilingual EPUB with the original text alongside a Chinese translation.

USE CASE 3

Resume an interrupted book translation without redoing finished chapters.

What is it built with?

PythonuvDeepSeek APIMinerU API

How does it compare?

bigdawnghost/wenyiwxyhgk/retain-pdfkarpathy/arxiv-sanity-lite
Stars1,6471,6541,637
LanguagePythonPythonPython
Last pushed2023-06-19
MaintenanceDormant
Setup difficultymoderateeasymoderate
Complexity3/53/52/5
Audiencedeveloperresearcherresearcher

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires a DeepSeek API key, and PDF input needs a separate MinerU API key.

In plain English

Wenyi is a command line tool that translates full length novels into Chinese. It works with EPUB, FB2, TXT, Markdown, HTML, and PDF files, and it can translate from multiple source languages. The project's goal is to get long form machine translation closer to something readable and consistent across an entire book, not just accurate sentence by sentence. The tool needs Python 3.10 or newer and a package manager called uv. After running a sync command and setting an API key for a translation model, a user can point the tool at a book file with a single translate command. By default it writes a Chinese only EPUB back into the book's own output folder, though a bilingual edition with both the source text and the translation side by side can be turned on if wanted. Wenyi tracks its progress in files under a state folder, and it can pick up a run again where it left off if it gets interrupted, rather than starting over. The pipeline behind a translation is more than one pass. It reads the whole book first to build a style guide and a glossary of names and recurring terms, then translates using that context, then optionally polishes and reviews the finished text before treating it as done. Reviewing the completed book is off by default and can be switched on or run separately once a translation is complete. For PDFs specifically, the first conversion uses an outside service called MinerU and needs its own API key, with the converted file cached afterward so later runs do not repeat that step. Wenyi also tries to keep an EPUB's original images, styling, table of contents, and internal links intact while replacing the text. This is described as an early personal project rather than a finished product. The author welcomes bug reports about naming inconsistencies, repeated phrasing, missing text, or formatting issues, and takes pull requests through GitHub. Community support runs through a Discord server and a QQ group. Do not publish copyrighted or private book text, or any state folder holding sensitive information, without permission.

Copy-paste prompts

Prompt 1
Show me the uv and Python commands to translate an EPUB novel with Wenyi into Chinese.
Prompt 2
Write a config.yaml for Wenyi that outputs a bilingual EPUB with the source text placed first.
Prompt 3
Give me the Wenyi commands to prepare a book, check its glossary, then resume translation after an interruption.
Prompt 4
Help me set up MINERU_API_KEY so Wenyi can convert a PDF novel into an EPUB before translating it.

Frequently asked questions

What is wenyi?

A command line tool that translates full length EPUB, FB2, TXT, Markdown, HTML, and PDF novels into Chinese, using whole book context to keep names and terms consistent.

What language is wenyi written in?

Mainly Python. The stack also includes Python, uv, DeepSeek API.

How hard is wenyi to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is wenyi for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.