Ximalaya Dedao Transcripts
개요
이 스킬을 사용하여 공개 시마라야 오디오 링크를 더다오 브레인 노트 트랜스크립트로 변환하세요. 시마라야 매니페스트 추출, 더다오 토큰 갱신, 로컬 오디오 업로드/노트 생성, 원본 트랜스크립트 검색, 마크다운 내보내기 등 모든 취약한 단계는 번들 스크립트를 사용하는 것이 좋습니다.
긴 트랜스크립트 텍스트를 채팅에 붙여넣지 마세요. 사용자에게 전달할 트랜스크립트 결과물은 현재 작업 공간의 outputs/ 디렉터리에 저장하세요.
워크플로우
- 작업 디렉터리 생성:
mkdir -p work/ximalaya_dedao outputs/ximalaya_dedao
- 더다오 인증 파일 준비. 사용자가 작업 공간에 기존 토큰 파일을 가지고 있으면 읽어들이세요. 토큰을 채팅이나 로그에 절대 출력하지 마세요.
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
- 시마라야 매니페스트 생성:
node <skill>/scripts/ximalaya_manifest.mjs \
--url "https://xima.tv/..." \
--out work/ximalaya_dedao/manifest.json
매니페스트가 complete: false로 보고되면 references/ximalaya-manifest.md를 읽고 누락된 페이지를 수정한 후 더다오 노트를 생성하세요. 불완전한 앨범을 조용히 처리하지 마세요.
- 더다오 로컬 오디오 노트 생성:
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
- 모든 노트에 대해
original트랜스크립트 JSON 가져오기:
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
- 마크다운 결과물 내보내기:
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
- 최종 응답 전 검증:
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
품질 게이트
- 매니페스트 에피소드 수, 노트 ID 수, 원본 JSON 수, 내보낸 마크다운 파일 수를 비교하세요.
- 내보내기 전에 비어 있거나 지나치게 작은
originals/pNN.json파일을 검사하세요. - 샌드박스 내에서 시마라야 DNS 또는 더다오 API 호출이 실패하면 네트워크 승격을 통해 동일한 중요한 명령을 다시 실행하세요.
- 시마라야
.m4a오디오의 경우 더다오가type=m4a를 거부할 수 있습니다. 다운로드된 바이트를 업로드할 때--upload-type mp3를 전달하세요. 이는 검증된 로컬 오디오 흐름과 일치합니다. stream_on_local_audio가 노트 ID를 작성한 후 시간 초과되면 노트 ID를 유지하고 노트 ID로original을 가져오세요.
참고 자료
- 더다오 업로드, 서명, 토큰 갱신, 노트 생성 또는 원본 검색이 실패하면
references/dedao-local-audio.md를 읽으세요. - 시마라야 앨범/트랙 링크가 완전한 매니페스트를 생성하지 못하면
references/ximalaya-manifest.md를 읽으세요.