Bringing 6 years of Chinese pastoral writings to a bilingual audience — powered by an end-to-end AI pipeline built with Claude and Python.
Pastor Pei (夏牧師) wrote 347 reflections on faith, scripture, and pastoral life on Tumblr from 2013 to 2019 — entirely in Traditional Chinese. With Tumblr declining and his congregation growing more bilingual, those writings risked being lost or inaccessible to the next generation. The goal: rescue, translate, and republish every post to Substack, automatically, with no ongoing manual work.
347 Chinese blog posts buried in a Tumblr export — no English translations, no consistent formatting, no searchable archive, no new audience.
Fully automated pipeline to translate, design, and publish every post to Substack as a bilingual newsletter — without Pastor Pei lifting a finger.
Translations had to preserve pastoral tone and handle Taiwanese idioms naturally. No robotic output — it needed to sound like him.
Substack's discovery network + bilingual content = a readership that crosses both Chinese-speaking and English-speaking Christian communities.
Every post goes through 6 stages entirely without human intervention — from raw Tumblr HTML to a formatted, bilingual Substack draft with a branded cover image.
Reads the next unprocessed post chronologically from the raw HTML export. Extracts the Chinese title, body paragraphs, and original publish date. Logs each completed post to progress.json so no post is ever processed twice, even if the script is interrupted.
Sends the full Chinese text to Claude's API with a prompt tuned for pastoral writing — preserving idioms, scripture references, and the warmth of the original voice. Not word-for-word literal, but faithfully tonal. Haiku can be used as a faster, cheaper alternative.
Claude also writes a punchy 145-character English hook — the kind of question or observation that makes a reader want to open the email. This appears as the post's subtitle and email preview text on Substack.
Python (Pillow) renders a 1200×630 cover image with the Chinese title, English title, "Pastor Pei 夏牧師" branding, original post date, and a subtle cross motif — all in the navy and gold brand palette. Iterated through 8 design options before landing on the final style.
The cover image is uploaded via Substack's image API to get a CDN URL. Then the full bilingual draft is posted — Chinese body first, then an "English Translation" heading, then the English body, followed by a subscribe call-to-action widget.
Every post gets a unique cover image generated programmatically using Python's Pillow library. Before settling on the final style, 8 distinct layout concepts were explored across three color palettes — navy blue, earth brown, and sage green — testing centered, split, ghost, bottom-anchored, and minimal compositions.
Each Substack post is bilingual — the original Chinese followed by an English translation — with a custom cover image, a pastoral hook, and a subscribe widget. Here are the first posts processed.
Built entirely with Python and the Anthropic API — no third-party publishing platforms, no complex infrastructure. Everything runs locally from the project folder.
Six years of a pastor's writing — reflections on faith, doubt, scripture, and daily life — were sitting in a declining blog, visible only to those who could read Chinese and knew where to look. This pipeline doesn't just translate words. It opens a door.