Skip to content

jianshuo/claude-skills / wjs-converting-text-to-video

wjs-converting-text-to-video

Verified

Use when the user wants a 王建硕-style WeChat article (article.md) turned into a narrated short MP4 video — TTS voiceover via 火山引擎 Volcano TTS, HyperFrames CSS/GSAP animation per scene, subtle SFX, abstract watercolor background, full pipeline rendering to 1080×1920 portrait MP4 (30-90s). Triggers — "把这篇文章做成视频", "做一个解说视频", "讲解视频", "/wjs-converting-text-to-video".

FileKindSize
SKILL.mdskill md29.8 KB
scripts/bootstrap-project.shexecutablescript2.5 KB
scripts/daily-upload-batch.shexecutablescript2.5 KB
scripts/generate-bg.shexecutablescript2.1 KB
scripts/publish-to-youtube.pyexecutablescript8.4 KB
scripts/retrofit-bg-image.pyexecutablescript3.9 KB
scripts/strip-dark-scene-bgs.pyexecutablescript3.4 KB
scripts/synth-sfx.shexecutablescript1.4 KB
scripts/tts.pyexecutablescript5.7 KB

scripts/daily-upload-batch.sh

View on GitHub
#!/usr/bin/env bash
# Daily YouTube upload: pick up to 5 articles where the MP4 exists but no
# .youtube.json record, upload them, save records. Designed for cron — stays
# under YouTube daily quota (default 6 uploads/day @ 1600 quota points each).
#
# Crontab: 0 10 * * * /Users/jianshuo/.claude/skills/wjs-converting-text-to-video/scripts/daily-upload-batch.sh
set -euo pipefail

MAX_PER_DAY="${MAX_PER_DAY:-5}"
ARTICLES_ROOT="${ARTICLES_ROOT:-/Users/jianshuo/code/wechat-publish/articles}"
PUBLISH_SCRIPT="/Users/jianshuo/.claude/skills/wjs-converting-text-to-video/scripts/publish-to-youtube.py"
LOG_DIR="/Users/jianshuo/code/wechat-publish/.upload-logs"
mkdir -p "$LOG_DIR"
LOG="$LOG_DIR/$(date +%Y%m%d).log"

# Source env (Volcano TTS not needed here, but proxy + YouTube creds may be)
if [[ -f "$HOME/code/.env" ]]; then
  set -a
  source "$HOME/code/.env"
  set +a
fi

# Ensure python deps reachable
export PATH="/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:$PATH"

echo "[$(date)] === daily-upload-batch starting (max $MAX_PER_DAY) ===" | tee -a "$LOG"

# Find candidates: <article-folder>/*.mp4 exists, .youtube.json missing
# Process oldest article first (clear backlog from old → new)
candidates=()
for d in "$ARTICLES_ROOT"/*/; do
  [[ -d "$d" && -f "$d/article.md" ]] || continue
  # Skip if already uploaded
  [[ -f "$d/.youtube.json" ]] && continue
  # Find an MP4 in the article root (not video/)
  mp4=$(ls "$d"*.mp4 2>/dev/null | grep -v -- "-OLD\|-silang\|-raw" | head -1 || true)
  [[ -z "$mp4" ]] && continue
  candidates+=("$d")
done

echo "[$(date)] found ${#candidates[@]} unuploaded MP4s" | tee -a "$LOG"

if [[ ${#candidates[@]} -eq 0 ]]; then
  echo "[$(date)] nothing to upload" | tee -a "$LOG"
  exit 0
fi

# Sort by article date (folder name starts with YYYY-MM-DD) — oldest first
sorted=($(printf '%s\n' "${candidates[@]}" | sort))

uploaded=0
for d in "${sorted[@]}"; do
  if [[ $uploaded -ge $MAX_PER_DAY ]]; then
    echo "[$(date)] reached daily cap $MAX_PER_DAY, stopping" | tee -a "$LOG"
    break
  fi
  name=$(basename "$d")
  echo "" | tee -a "$LOG"
  echo "[$(date)] === uploading $name ===" | tee -a "$LOG"
  if python3 "$PUBLISH_SCRIPT" "$d" 2>&1 | tee -a "$LOG"; then
    uploaded=$((uploaded + 1))
  else
    echo "[$(date)] upload failed for $name — possibly quota exhausted, will retry tomorrow" | tee -a "$LOG"
    # Don't increment uploaded — but also don't continue, since further uploads will likely fail too
    break
  fi
done

echo "" | tee -a "$LOG"
echo "[$(date)] === done: uploaded $uploaded videos ===" | tee -a "$LOG"
writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deploymentStars: 322kUpdated Claude CodeCodexVerifiedInstall
xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release.Stars: 118kUpdated Claude CodeCodexVerifiedInstall