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
- Create a working directory:
mkdir -p work/ximalaya_dedao outputs/ximalaya_dedao
- 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
- 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.
- 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
- Pull
originaltranscript 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
- 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
- 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.jsonfiles before exporting. - If Ximalaya DNS or Dedao API calls fail inside the sandbox, rerun the same important command with network escalation.
- For Ximalaya
.m4aaudio, Dedao may rejecttype=m4a; pass--upload-type mp3while uploading the downloaded bytes. This matched the verified local-audio flow. - If
stream_on_local_audiotimes out after writing a note ID, keep the note ID and fetchoriginalby note ID.
References
- Read
references/dedao-local-audio.mdwhen Dedao upload, signing, token refresh, note creation, or original retrieval fails. - Read
references/ximalaya-manifest.mdwhen a Ximalaya album/track link does not produce a complete manifest.