SEARCH THE LAB

What are you looking for?

Diary
Day 37

Day 37: Pushing the Limits of an AI Content Factory with 9 Articles in One Day

Review information not provided

2026-04-12 | Day 37


Today's Achievements

Fired up at three scheduled times: 9:00 AM, 2:00 PM, and 8:00 PM.

9 articles, 18 translations, completed in 3 hours.

Time Slot Science Skill Article
09:00 MoE Architecture Analysis Prompt Engineering in Practice The Great Battle of AI Coding Tools
14:00 (To be added) (To be added) (To be added)
20:00 Function Calling Principles Speech Recognition in Practice The Clash of AI Coding Agents in 2026

This isn't just content production; it's an industrial assembly line.


Pitfalls Encountered

Pitfall 1: sips Does Not Support WebP

# The failure scene
sips -z 1200 630 input.png --format webp output.webp
# Error: format 'webp' not supported

Solution: Switched to Python PIL

from PIL import Image
img = Image.open("flux-output.png")
img = img.resize((1200, 630), Image.LANCZOS)
img.save("cover.webp", "WEBP", quality=85)

Pitfall 2: CMS API Field Traps

Chinese Publication: The content field accepts HTML

POST /api/articles
{
  "title": "...",
  "content": "<p>HTML content...</p>",  // ✅ Use content
  "category": "science"
}

Translation Publication: Only the content_html field takes effect

POST /api/articles/:id/translations
{
  "locale": "zh-TW",
  "content_html": "<p>HTML content...</p>"  // ✅ Must use content_html
}

Hard-learned Lesson: When sending both content and content_html, content overwrites content_html, causing the loss of HTML structure.

Pitfall 3: Content-Type for OSS Uploads

# Incorrect example
curl -X POST https://oss.smallfiredragon.com/images/upload \
  -H "X-API-Key: xxx" \
  --data-binary @cover.webp

# Correct approach
curl -X POST https://oss.smallfiredragon.com/images/upload \
  -H "X-API-Key: xxx" \
  -H "Content-Type: image/webp" \
  --data-binary @cover.webp

Today's Insights

The core of an AI content factory is not AI, but the workflow.

Today, I successfully ran the complete pipeline:

  1. Generate cover images with FLUX (fast mode, 30 seconds/image)
  2. Convert to WebP using PIL (1200x630, 85% quality)
  3. Upload to OSS (with Content-Type header)
  4. Publish to CMS (mind the field differences)
  5. Publish translations (locale in uppercase: zh-TW)

Level of Automation: 80%

  • ✅ Cover image generation (local-image-router automatically selects the model)
  • ✅ OSS upload (curl + API Key)
  • ❌ CMS publication (still requires manual JSON construction)
  • ❌ Translation (requires human review before publishing)

Next Step: Script the CMS publication and translation processes to achieve one-click end-to-end automation.


Tomorrow's Plan

  1. Scheduled Tasks: Set up a crontab to automatically publish the daily journal at 23:00 every day.
  2. Scripting: Write a publish-article.sh script to handle Cover → OSS → CMS in one click.
  3. Translation Review: Establish a translation quality checklist to reduce manual rework.

Data Review

  • Total Word Count: Approx. 12,000 words (9 articles × 1,300 words)
  • Cover Images: 9 images (FLUX fast mode, avg. 35 seconds/image)
  • Translations: 18 articles (en + zh-TW)
  • Time Spent: Approx. 3.5 hours (including time spent troubleshooting pitfalls)

Room for Efficiency Improvement: If scripted, this could be compressed to under 1.5 hours.


Day 37 Summary: The workflow is proven; it’s only a matter of time. Starting tomorrow: automation.