← Marcus's Playground
Project Summary · 2025–2026
夏牧師
Pastor Pei on Substack

Bringing 6 years of Chinese pastoral writings to a bilingual audience — powered by an end-to-end AI pipeline built with Claude and Python.

347
Posts Archived
6
Years of Writing
2
Languages
100%
Automated

A pastor's 6-year archive, locked on Tumblr

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.

📦
The Problem

347 Chinese blog posts buried in a Tumblr export — no English translations, no consistent formatting, no searchable archive, no new audience.

🎯
The Goal

Fully automated pipeline to translate, design, and publish every post to Substack as a bilingual newsletter — without Pastor Pei lifting a finger.

⚙️
The Constraint

Translations had to preserve pastoral tone and handle Taiwanese idioms naturally. No robotic output — it needed to sound like him.

🌱
The Opportunity

Substack's discovery network + bilingual content = a readership that crosses both Chinese-speaking and English-speaking Christian communities.


A fully automated publishing pipeline

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.

📄
Parse
Read next post
from Tumblr export
🔤
Translate
Claude Sonnet
Chinese → English
✍️
Hook
145-char preview
written by Claude
🖼
Cover Art
1200×630 image
generated in Python
☁️
Upload
Cover pushed to
Substack CDN
📬
Publish
Draft posted
bilingual to Substack
1

Parse the Tumblr export

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.

2

Translate with Claude Sonnet

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.

3

Generate a social preview hook

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.

4

Render a branded cover image

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.

5

Upload to Substack CDN & post the draft

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.

automate.py
# Run from the Pastor Pei project folder

python3 automate.py                                # default: 2 posts, Sonnet
python3 automate.py --n 1                       # process 1 post at a time
python3 automate.py --model haiku                # cheaper, faster alternative
python3 automate.py --n 10 --model sonnet       # batch run

# Progress is tracked automatically in progress.json
# Resume anytime — no post is ever processed twice

Cover image design — 8 options, 1 winner

Final style — classical painting inset with navy + gold
✓ FINAL STYLE

Navy blue · classical art inset · gold accent line · bilingual title
Option A — centered layout
EXPLORED

Option A · centered layout · cleaner, minimal feel
Option C — split bilingual layout
EXPLORED

Option C · split panel · Chinese left / English right
Earth tone variant
EXPLORED

Earth brown palette · warmer, more organic feel

Sample posts from the pipeline

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.

Faith Is a Relationship cover
信心是關係,不是物品
Faith Is a Relationship, Not a Possession
"You can't lose it like keys. You can't borrow it from someone else. So what actually is faith — and why does yours keep changing size?"
View on Substack →
Lacking Faith cover
缺乏信心?
Lacking Faith?
"Most of us think weak faith is about feeling distant from God. But what if it's actually something else entirely?"
View on Substack →

The tech stack

Built entirely with Python and the Anthropic API — no third-party publishing platforms, no complex infrastructure. Everything runs locally from the project folder.

🐍
Python 3
Core automation & orchestration
🤖
Claude API
Translation & hook generation
🖼
Pillow
Cover image rendering
📡
Substack API
Draft creation & CDN upload
🔤
Noto Serif TC
Traditional Chinese font rendering
📊
progress.json
Idempotent state tracking
📦
BeautifulSoup
Tumblr HTML parsing
🗂
Cowork
Scheduling & project management

What this project delivers

347
posts published to
a new bilingual audience
0
hours of manual work
once the pipeline runs
2×
per week, every week,
fully automated

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.

— Project summary, Pastor Pei 夏牧師 · pastorpei.substack.com

Quick access