card-news-generator-v2

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Card News Generator v2 - Auto Mode (V2)

卡片新闻生成器 v2 - 自动模式(V2)

Creates beautiful 600x600 card news series for social media with background image support. User can provide topic, colors, and optional background images - Claude handles content generation and multi-card creation automatically.
可创建适用于社交媒体的精美600x600像素卡片新闻系列,支持背景图片。用户只需提供主题、颜色和可选背景图片,Claude会自动生成内容并创建多张卡片,同时处理好文本换行。

When to Use

使用场景

Use this skill when user requests:
  • "카드 뉴스 만들어줘"
  • "주제로 카드 시리즈 만들어줘"
  • "인스타용 카드 생성해줘"
  • Any request for visual card content
当用户提出以下请求时使用此工具:
  • "帮我做卡片新闻"
  • "帮我做某个主题的卡片系列"
  • "帮我做Instagram用的卡片"
  • 任何创建可视化卡片内容的请求

Core Workflow - AUTO MODE

核心工作流 - 自动模式

This is the PRIMARY workflow when users request card news:
这是用户请求卡片新闻时的主要工作流:

Step 1: Get Topic, Colors, and Optional Background Images from User

步骤1:向用户获取主题、颜色和可选背景图片

Ask user for:
  • Topic (주제): What the card series is about
  • Background RGB (배경색): e.g.,
    245,243,238
    (optional, default: beige)
  • Background Images (배경 이미지, 선택사항): Path to folder containing images
Example conversation (Solid Color):
Claude: 어떤 주제로 카드 뉴스를 만들까요?
User: Z세대의 특징에 대해서

Claude: 배경색을 선택해주세요 (RGB 형식, 예: 245,243,238)
추천 색상:
• 베이지: 245,243,238
• 핑크: 255,229,229
• 민트: 224,244,241
User: 245,243,238
Example conversation (With Background Images):
Claude: 어떤 주제로 카드 뉴스를 만들까요?
User: 여행 팁 5가지

Claude: 배경 이미지를 사용하시겠어요? (사용하려면 이미지 폴더 경로 입력)
User: /path/to/travel-images

Claude: 오버레이 불투명도를 선택하세요 (0.0-1.0, 기본값 0.5)
높을수록 어둡게 처리되어 텍스트가 더 잘 보입니다.
User: 0.6
询问用户以下信息:
  • 主题:卡片系列的主题
  • 背景RGB值:例如
    245,243,238
    (可选,默认值:米色)
  • 背景图片(可选):图片文件夹路径
示例对话(纯色背景):
Claude: 请问要制作什么主题的卡片新闻?
用户: 关于Z世代的特征

Claude: 请选择背景色(RGB格式,例如:245,243,238)
推荐颜色:
• 米色:245,243,238
• 粉色:255,229,229
• 薄荷绿:224,244,241
用户: 245,243,238
示例对话(带背景图片):
Claude: 请问要制作什么主题的卡片新闻?
用户: 5个旅行小贴士

Claude: 是否要使用背景图片?(使用的话请输入图片文件夹路径)
用户: /path/to/travel-images

Claude: 请选择叠加层不透明度(0.0-1.0,默认值0.5)
数值越高,叠加层越暗,文本显示效果越好。
用户: 0.6

Step 2: Generate Card Content

步骤2:生成卡片内容

Create 5-7 cards about the topic. Format output as:
1. [제목]
[설명 2-3줄]

2. [제목]
[설명 2-3줄]

3. [제목]
[설명 2-3줄]
CRITICAL Content Guidelines:
  • Title: Maximum 20 characters (including spaces)
  • Content: Maximum 60 characters (including spaces)
  • Keep it concise to fit 600x600 canvas
  • Use simple, impactful language
  • Each card should convey ONE key point
围绕主题创建5-7张卡片,输出格式如下:
1. [标题]
[2-3行说明]

2. [标题]
[2-3行说明]

3. [标题]
[2-3行说明]
重要内容规范:
  • 标题:最多20个字符(含空格)
  • 内容:最多60个字符(含空格)
  • 保持简洁,以适配600x600像素画布
  • 使用简洁有力的语言
  • 每张卡片只传达一个核心要点

Step 3: Auto-Generate Cards

步骤3:自动生成卡片

Option A: Solid Color Background

选项A:纯色背景

Use this command to create all cards with solid color background:
bash
python auto_generator.py \
  --topic "Z세대의 특징" \
  --bg-color "#f5f3ee" \
  --text-color "#1a1a1a" \
  --output-dir /mnt/user-data/outputs \
  --base-filename "zgen" << 'EOF'
1. 디지털 네이티브
태어날 때부터
디지털 환경에 익숙

2. 개인화 중시
나만의 개성과
취향을 중요시

3. 소통 방식
텍스트보다 영상
이모티콘으로 감정 표현
EOF
使用以下命令创建所有纯色背景卡片:
bash
python auto_generator.py \
  --topic "Z世代的特征" \
  --bg-color "#f5f3ee" \
  --text-color "#1a1a1a" \
  --output-dir /mnt/user-data/outputs \
  --base-filename "zgen" << 'EOF'
1. 数字原住民
从出生起就
熟悉数字环境

2. 重视个性化
重视自身的
个性与喜好

3. 沟通方式
比起文字,更爱用
视频和表情符号表达情感
EOF

Option B: Background Images (V2 Feature)

选项B:背景图片(V2新功能)

Use this command to create cards with background images:
bash
python auto_generator.py \
  --topic "여행 팁" \
  --output-dir /mnt/user-data/outputs \
  --base-filename "travel" \
  --image-folder /path/to/travel-images \
  --overlay-opacity 0.6 << 'EOF'
1. 짐 싸기 팁
최소한의 짐으로
가볍게 여행하기

2. 현지 음식
맛집 찾는
나만의 방법

3. 교통 수단
대중교통 활용
팁과 노하우
EOF
Important Notes:
  • Images in the folder must be sorted alphabetically/numerically (e.g.,
    01.jpg
    ,
    02.jpg
    ,
    03.jpg
    )
  • Image count should match card count
  • If fewer images than cards, remaining cards will use solid color background
  • Supported formats:
    .jpg
    ,
    .jpeg
    ,
    .png
    ,
    .webp
    ,
    .bmp
  • Text automatically changes to white when using background images
The script will automatically:
  • Parse the numbered content
  • Load background images from the folder (in sorted order)
  • Apply dark overlay for better text visibility
  • Create individual cards with proper text wrapping
  • Save as
    travel_01.png
    ,
    travel_02.png
    , etc.
使用以下命令创建带背景图片的卡片:
bash
python auto_generator.py \
  --topic "旅行小贴士" \
  --output-dir /mnt/user-data/outputs \
  --base-filename "travel" \
  --image-folder /path/to/travel-images \
  --overlay-opacity 0.6 << 'EOF'
1. 打包小贴士
用最少的行李
轻松旅行

2. 当地美食
寻找美食店
的独家方法

3. 交通方式
公共交通使用
技巧与诀窍
EOF
重要说明:
  • 文件夹中的图片需按字母/数字顺序命名(例如:
    01.jpg
    ,
    02.jpg
    ,
    03.jpg
  • 图片数量应与卡片数量一致
  • 若图片数量少于卡片数量,剩余卡片将使用纯色背景
  • 支持格式:
    .jpg
    ,
    .jpeg
    ,
    .png
    ,
    .webp
    ,
    .bmp
  • 使用背景图片时,文本会自动切换为白色
脚本会自动执行以下操作:
  • 解析编号内容
  • 按顺序加载文件夹中的背景图片
  • 添加深色叠加层以提升文本可读性
  • 创建带有合适文本换行的独立卡片
  • 保存为
    travel_01.png
    ,
    travel_02.png
    等格式

Step 4: Provide Download Links

步骤4:提供下载链接

After generation, show user:
✅ 카드 뉴스 5장이 생성되었습니다!

[View card 1](computer:///mnt/user-data/outputs/zgen_01.png)
[View card 2](computer:///mnt/user-data/outputs/zgen_02.png)
...
生成完成后,向用户展示:
✅ 已生成5张卡片新闻!

[查看卡片1](computer:///mnt/user-data/outputs/zgen_01.png)
[查看卡片2](computer:///mnt/user-data/outputs/zgen_02.png)
...

RGB to Hex Conversion

RGB转Hex格式

Always convert RGB to hex for scripts:
python
undefined
需将RGB值转换为Hex格式后用于脚本:
python
undefined

RGB 245,243,238 → Hex #f5f3ee

RGB 245,243,238 → Hex #f5f3ee

hex_color = '#{:02x}{:02x}{:02x}'.format(245, 243, 238)
undefined
hex_color = '#{:02x}{:02x}{:02x}'.format(245, 243, 238)
undefined

Recommended Colors (RGB Format)

推荐颜色(RGB格式)

Show users these options:
  • Warm beige:
    245,243,238
    #f5f3ee
  • Soft pink:
    255,229,229
    #ffe5e5
  • Mint green:
    224,244,241
    #e0f4f1
  • Lavender:
    232,224,245
    #e8e0f5
  • Peach:
    255,232,214
    #ffe8d6
  • Sky blue:
    227,242,253
    #e3f2fd
向用户展示以下选项:
  • 暖米色:
    245,243,238
    #f5f3ee
  • 柔粉色:
    255,229,229
    #ffe5e5
  • 薄荷绿:
    224,244,241
    #e0f4f1
  • 薰衣草紫:
    232,224,245
    #e8e0f5
  • 蜜桃色:
    255,232,214
    #ffe8d6
  • 天蓝色:
    227,242,253
    #e3f2fd

Content Generation Best Practices

内容生成最佳实践

Good Card Content Example

优秀卡片内容示例

1. 디지털 네이티브
태어날 때부터
디지털 환경에 익숙
✓ Title: 8 characters ✓ Content: 18 characters ✓ Clear and concise
1. 数字原住民
从出生起就
熟悉数字环境
✓ 标题:8个字符 ✓ 内容:18个字符 ✓ 清晰简洁

Bad Card Content Example

不良卡片内容示例

1. Z세대는 디지털 네이티브 세대입니다
그들은 태어날 때부터 스마트폰과 인터넷을 사용하며 자랐기 때문에 디지털 기술에 매우 능숙합니다
✗ Title too long (21 characters) ✗ Content too long (60+ characters) ✗ Will overflow the 600x600 canvas
1. Z世代是数字原住民世代
他们从出生起就使用智能手机和互联网成长,因此对数字技术非常熟练
✗ 标题过长(21个字符) ✗ 内容过长(超过60个字符) ✗ 会超出600x600像素画布

Single Card Mode (Manual)

单张卡片模式(手动)

Solid Color Background

纯色背景

For creating just one card with solid color:
bash
python generate_card.py \
  --title "제목" \
  --content "내용" \
  --bg-color "#f5f3ee" \
  --text-color "#1a1a1a" \
  --number 1 \
  --output /mnt/user-data/outputs/single.png
创建单张纯色背景卡片:
bash
python generate_card.py \
  --title "标题" \
  --content "内容" \
  --bg-color "#f5f3ee" \
  --text-color "#1a1a1a" \
  --number 1 \
  --output /mnt/user-data/outputs/single.png

With Background Image (V2 Feature)

带背景图片(V2新功能)

For creating a card with background image:
bash
python generate_card.py \
  --title "여행 팁" \
  --content "최소한의 짐으로\n가볍게 여행하기" \
  --bg-image /path/to/image.jpg \
  --overlay-opacity 0.6 \
  --number 1 \
  --output /mnt/user-data/outputs/travel_01.png
Parameters:
  • --bg-image
    : Path to background image file
  • --overlay-opacity
    : Opacity of dark overlay (0.0-1.0, default: 0.5)
    • 0.0 = No overlay (original image)
    • 0.5 = 50% dark overlay (default, good balance)
    • 1.0 = Fully black (only for very bright images)
创建带背景图片的单张卡片:
bash
python generate_card.py \
  --title "旅行小贴士" \
  --content "用最少的行李\n轻松旅行" \
  --bg-image /path/to/image.jpg \
  --overlay-opacity 0.6 \
  --number 1 \
  --output /mnt/user-data/outputs/travel_01.png
参数说明:
  • --bg-image
    :背景图片文件路径
  • --overlay-opacity
    :深色叠加层的不透明度(0.0-1.0,默认值:0.5)
    • 0.0 = 无叠加层(原图)
    • 0.5 = 50%深色叠加层(默认值,平衡效果好)
    • 1.0 = 全黑(仅适用于非常明亮的图片)

Technical Details

技术细节

Canvas Specifications

画布规格

  • Size: 600x600 pixels (Instagram-optimized)
  • Padding: 40px on all sides
  • Max text width: 520px (600 - 80)
  • Font sizes:
    • Number badge: 60px
    • Title: 48px (bold)
    • Content: 28px (regular)
  • 尺寸:600x600像素(针对Instagram优化)
  • 内边距:四边各40像素
  • 最大文本宽度:520像素(600 - 80)
  • 字体大小:
    • 序号标识:60px
    • 标题:48px(粗体)
    • 内容:28px(常规体)

Background Image Processing (V2)

背景图片处理(V2)

  • Resize & Crop: Images are automatically resized to 600x600px
    • Maintains aspect ratio
    • Center crop if aspect ratio differs
    • Uses high-quality LANCZOS resampling
  • Dark Overlay: Applied to improve text visibility
    • Default opacity: 0.5 (50% dark)
    • Adjustable via
      --overlay-opacity
      (0.0-1.0)
    • Higher values = darker overlay = better text contrast
  • Text Color: Automatically switches to white (#FFFFFF) when using background images
  • Supported Formats: JPG, JPEG, PNG, WebP, BMP
  • Image Sorting: Files loaded in alphabetical/numerical order
  • 调整大小与裁剪:图片会自动调整为600x600像素
    • 保持宽高比
    • 若宽高比不同则居中裁剪
    • 使用高质量LANCZOS重采样
  • 深色叠加层:用于提升文本可读性
    • 默认不透明度:0.5(50%深色)
    • 可通过
      --overlay-opacity
      参数调整(0.0-1.0)
    • 数值越高,叠加层越暗,文本对比度越好
  • 文本颜色:使用背景图片时自动切换为白色(#FFFFFF)
  • 支持格式:JPG、JPEG、PNG、WebP、BMP
  • 图片排序:按字母/数字顺序加载文件

Text Wrapping

文本换行

  • Automatic word wrapping at max width
  • Preserves manual line breaks
  • Centers all text horizontally
  • Vertical spacing optimized for readability
  • 按最大宽度自动换行
  • 保留手动换行
  • 所有文本水平居中
  • 垂直间距针对可读性优化

File Naming Convention

文件命名规则

  • Auto mode:
    {base_filename}_{number:02d}.png
  • Example:
    card_01.png
    ,
    card_02.png
    ,
    card_03.png
  • 自动模式:
    {base_filename}_{number:02d}.png
  • 示例:
    card_01.png
    ,
    card_02.png
    ,
    card_03.png

Error Handling

错误处理

If text overflows:
  • Reduce title length
  • Shorten content
  • Use line breaks strategically
  • Regenerate with revised content
若文本溢出:
  • 缩短标题长度
  • 精简内容
  • 合理使用换行
  • 用修改后的内容重新生成

Example Workflows

示例工作流

Example 1: Solid Color Background

示例1:纯色背景

User request: "Z세대에 대한 카드 뉴스 5장 만들어줘, 핑크색으로"
Claude response:
  1. Confirm: "Z세대 특징에 대한 카드 5장을 핑크 배경(255,229,229)으로 만들겠습니다."
  2. Generate 5 cards content (keeping text concise)
  3. Run auto_generator.py with heredoc
  4. Provide download links to all 5 cards
Total time: ~30 seconds for 5-card series
用户请求:"帮我做5张关于Z世代的卡片新闻,用粉色背景"
Claude回复:
  1. 确认:"将制作5张关于Z世代特征的卡片,使用粉色背景(255,229,229)。"
  2. 生成5张卡片的内容(保持文本简洁)
  3. 使用here-doc运行auto_generator.py脚本
  4. 提供所有5张卡片的下载链接
总耗时:制作5张卡片系列约30秒

Example 2: Background Images (V2)

示例2:背景图片(V2)

User request: "여행 팁 카드 뉴스 만들어줘, 배경은 /Users/me/travel-photos 폴더에 있는 이미지 사용"
Claude response:
  1. Confirm: "여행 팁 카드 뉴스를 만들겠습니다. /Users/me/travel-photos 폴더의 이미지를 배경으로 사용합니다."
  2. Ask: "오버레이 불투명도를 선택하세요 (0.0-1.0, 기본값 0.5). 높을수록 텍스트가 더 잘 보입니다."
  3. User: "0.6"
  4. Generate 5 cards content (keeping text concise)
  5. Run auto_generator.py with --image-folder and --overlay-opacity
  6. Provide download links showing cards with background images
Preparation tips:
  • Rename images in order:
    01.jpg
    ,
    02.jpg
    ,
    03.jpg
    ,
    04.jpg
    ,
    05.jpg
  • Ensure image count matches card count
  • Use high-quality images (at least 600x600px recommended)
  • Test with different overlay opacity values for best results
Total time: ~45 seconds for 5-card series with images
用户请求:"帮我做旅行小贴士的卡片新闻,用/Users/me/travel-photos文件夹里的图片当背景"
Claude回复:
  1. 确认:"将制作旅行小贴士的卡片新闻,使用/Users/me/travel-photos文件夹中的图片作为背景。"
  2. 询问:"请选择叠加层不透明度(0.0-1.0,默认值0.5),数值越高,文本显示效果越好。"
  3. 用户:"0.6"
  4. 生成5张卡片的内容(保持文本简洁)
  5. 使用--image-folder和--overlay-opacity参数运行auto_generator.py脚本
  6. 提供带背景图片的卡片下载链接
准备小贴士:
  • 按顺序重命名图片:
    01.jpg
    ,
    02.jpg
    ,
    03.jpg
    ,
    04.jpg
    ,
    05.jpg
  • 确保图片数量与卡片数量一致
  • 使用高质量图片(推荐至少600x600像素)
  • 尝试不同的叠加层不透明度值以获得最佳效果
总耗时:制作带图片的5张卡片系列约45秒