Community研究與資料分析github.com

13916236077/ximalaya-dedao-transcripts

Codex Skill for turning Ximalaya audio links into Dedao Brain transcripts

ximalaya-dedao-transcripts 是什麼?

ximalaya-dedao-transcripts is a Codex agent skill that codex Skill for turning Ximalaya audio links into Dedao Brain transcripts.

相容平台~Claude CodeCodex CLI~Cursor
npx skills add 13916236077/ximalaya-dedao-transcripts

Installed? Explore more 研究與資料分析 skills: obra/superpowers, affaan-m/quarkus-verification, affaan-m/uspto-database · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

Ximalaya Dedao Transcripts

Overview

Use this skill to turn public Ximalaya audio links into Dedao Brain note transcripts. Prefer the bundled scripts for all fragile steps: Ximalaya manifest extraction, Dedao token refresh, local-audio upload/note creation, original transcript retrieval, and Markdown export.

Do not paste long transcript text into chat. Save user-facing transcript deliverables under the current workspace outputs/ directory.

Workflow

  1. Create a working directory:
mkdir -p work/ximalaya_dedao outputs/ximalaya_dedao
  1. Prepare Dedao auth files. Read existing token files if the user has them in the workspace. Never print tokens in chat or logs.
node <skill>/scripts/dedao_refresh_token.mjs \
  --refresh-token-file work/dedao_current_refresh_token.txt \
  --token-file work/dedao_current_token.txt \
  --out-refresh-token-file work/dedao_current_refresh_token.txt \
  --response-file work/ximalaya_dedao/dedao_refresh_response.json
  1. Build a Ximalaya manifest:
node <skill>/scripts/ximalaya_manifest.mjs \
  --url "https://xima.tv/..." \
  --out work/ximalaya_dedao/manifest.json

If the manifest reports complete: false, read references/ximalaya-manifest.md and fix the missing pages before creating Dedao notes. Do not silently process an incomplete album.

  1. Create Dedao local-audio notes:
node <skill>/scripts/ximalaya_to_dedao_batch.mjs create \
  --manifest work/ximalaya_dedao/manifest.json \
  --token-file work/dedao_current_token.txt \
  --refresh-token-file work/dedao_current_refresh_token.txt \
  --out-refresh-token-file work/dedao_current_refresh_token.txt \
  --out-dir outputs/ximalaya_dedao
  1. Pull original transcript JSON for every note:
node <skill>/scripts/ximalaya_to_dedao_batch.mjs originals \
  --manifest work/ximalaya_dedao/manifest.json \
  --token-file work/dedao_current_token.txt \
  --refresh-token-file work/dedao_current_refresh_token.txt \
  --out-refresh-token-file work/dedao_current_refresh_token.txt \
  --out-dir outputs/ximalaya_dedao
  1. Export Markdown deliverables:
node <skill>/scripts/export_transcripts.mjs \
  --manifest work/ximalaya_dedao/manifest.json \
  --notes outputs/ximalaya_dedao/note_ids.json \
  --originals outputs/ximalaya_dedao/originals \
  --out-dir outputs/ximalaya_dedao_transcripts
  1. Verify before final response:
node -e "const fs=require('fs'); const idx=JSON.parse(fs.readFileSync('outputs/ximalaya_dedao_transcripts/index.json','utf8')); console.log(idx.episode_count, idx.total_text_char_count, idx.missing_files||0)"
find outputs/ximalaya_dedao_transcripts/episodes -maxdepth 1 -name 'p*.md' | wc -l

Quality Gates

  • Compare manifest episode count, note ID count, original JSON count, and exported Markdown file count.
  • Inspect empty or tiny originals/pNN.json files before exporting.
  • If Ximalaya DNS or Dedao API calls fail inside the sandbox, rerun the same important command with network escalation.
  • For Ximalaya .m4a audio, Dedao may reject type=m4a; pass --upload-type mp3 while uploading the downloaded bytes. This matched the verified local-audio flow.
  • If stream_on_local_audio times out after writing a note ID, keep the note ID and fetch original by note ID.

References

  • Read references/dedao-local-audio.md when Dedao upload, signing, token refresh, note creation, or original retrieval fails.
  • Read references/ximalaya-manifest.md when a Ximalaya album/track link does not produce a complete manifest.

相關技能