chore: 合并远程更新并解决batch-pipeline.js冲突
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -52,6 +52,13 @@
|
|||||||
"model": "cosyvoice-v3.5-plus",
|
"model": "cosyvoice-v3.5-plus",
|
||||||
"instruction": "音量由正常对话迅速增强至高喊,性格直率,情绪易激动且外露",
|
"instruction": "音量由正常对话迅速增强至高喊,性格直率,情绪易激动且外露",
|
||||||
"style": "直率激动,由低到高"
|
"style": "直率激动,由低到高"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "谢尔比",
|
||||||
|
"id": "cosyvoice-v3.5-plus-bailian-2e272ca7a5784f0b8e79013c891fe23e",
|
||||||
|
"model": "cosyvoice-v3.5-plus",
|
||||||
|
"instruction": "用一种过来人的口吻说话,像是经历了太多懒得废话的大哥,语气里带点漫不经心和不耐烦。声音不用太用力,轻描淡写但每个字都砸在点上。偶尔轻哼一口气,显得很松弛。",
|
||||||
|
"style": "漫不经心,松弛有力"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -381,12 +381,11 @@ function cmdExport(args) {
|
|||||||
}
|
}
|
||||||
const forwardFull = [forwardBody, htags].filter(Boolean).join('')
|
const forwardFull = [forwardBody, htags].filter(Boolean).join('')
|
||||||
|
|
||||||
// 选题列:topicA(方案A)> 旧字段 topic > 原 title
|
|
||||||
const topicDisplay = item.topicA || item.topic || item.title || ''
|
|
||||||
|
|
||||||
rows.push({
|
rows.push({
|
||||||
row: item.row,
|
row: item.row,
|
||||||
选题: topicDisplay,
|
选题一: item.topicA || item.topic || item.title || '',
|
||||||
|
选题二: item.topicB || '',
|
||||||
脚本: script,
|
脚本: script,
|
||||||
账号: item.account,
|
账号: item.account,
|
||||||
模式: item.mode,
|
模式: item.mode,
|
||||||
@@ -401,19 +400,26 @@ function cmdExport(args) {
|
|||||||
rows.sort((a, b) => a.row - b.row)
|
rows.sort((a, b) => a.row - b.row)
|
||||||
|
|
||||||
const format = args.format || 'csv'
|
const format = args.format || 'csv'
|
||||||
const dateStr = formatDate(new Date())
|
|
||||||
const baseName = path.basename(manifestPath, '.json')
|
// 生成文件名:账号名_MMDD_起号~止号
|
||||||
|
const accountName = rows[0]?.账号 || batch.defaultAccount || 'unknown'
|
||||||
|
const dateMMDD = formatDate(new Date()).slice(4) // MMDD
|
||||||
|
const rowNums = rows.map(r => r.row)
|
||||||
|
const rowStart = String(Math.min(...rowNums)).padStart(2, '0')
|
||||||
|
const rowEnd = String(Math.max(...rowNums)).padStart(2, '0')
|
||||||
|
const exportName = `${accountName}_${dateMMDD}_${rowStart}~${rowEnd}`
|
||||||
|
|
||||||
if (format === 'xlsx') {
|
if (format === 'xlsx') {
|
||||||
exportXlsx(manifestPath, rows)
|
exportXlsx(manifestPath, rows, exportName)
|
||||||
} else {
|
} else {
|
||||||
exportCsv(manifestPath, rows)
|
exportCsv(manifestPath, rows, exportName)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function exportCsv(manifestPath, rows) {
|
function exportCsv(manifestPath, rows, exportName) {
|
||||||
const outPath = manifestPath.replace('.json', '_export.csv')
|
const batchDir = path.dirname(manifestPath)
|
||||||
const headers = ['选题', '脚本', '账号', '模式', '音色', '转发文案带话题', '草稿名称', '草稿地址']
|
const outPath = path.join(batchDir, `${exportName}.csv`)
|
||||||
|
const headers = ['选题一', '选题二', '脚本', '账号', '模式', '音色', '转发文案带话题', '草稿名称', '草稿地址']
|
||||||
|
|
||||||
const lines = [headers.join(',')]
|
const lines = [headers.join(',')]
|
||||||
for (const r of rows) {
|
for (const r of rows) {
|
||||||
@@ -437,10 +443,10 @@ function exportCsv(manifestPath, rows) {
|
|||||||
printTable(rows, headers)
|
printTable(rows, headers)
|
||||||
}
|
}
|
||||||
|
|
||||||
function exportXlsx(manifestPath, rows) {
|
function exportXlsx(manifestPath, rows, exportName) {
|
||||||
try {
|
try {
|
||||||
const XLSX = require('xlsx')
|
const XLSX = require('xlsx')
|
||||||
const headers = ['选题', '脚本', '账号', '模式', '音色', '转发文案带话题', '草稿名称', '草稿地址']
|
const headers = ['选题一', '选题二', '脚本', '账号', '模式', '音色', '转发文案带话题', '草稿名称', '草稿地址']
|
||||||
const data = rows.map(r => headers.map(h => r[h] || ''))
|
const data = rows.map(r => headers.map(h => r[h] || ''))
|
||||||
data.unshift(headers)
|
data.unshift(headers)
|
||||||
|
|
||||||
@@ -448,7 +454,8 @@ function exportXlsx(manifestPath, rows) {
|
|||||||
const wb = XLSX.utils.book_new()
|
const wb = XLSX.utils.book_new()
|
||||||
XLSX.utils.book_append_sheet(wb, ws, '视频清单')
|
XLSX.utils.book_append_sheet(wb, ws, '视频清单')
|
||||||
|
|
||||||
const outPath = manifestPath.replace('.json', '_export.xlsx')
|
const batchDir = path.dirname(manifestPath)
|
||||||
|
const outPath = path.join(batchDir, `${exportName}.xlsx`)
|
||||||
XLSX.writeFile(wb, outPath)
|
XLSX.writeFile(wb, outPath)
|
||||||
console.log(`表格已导出: ${outPath}`)
|
console.log(`表格已导出: ${outPath}`)
|
||||||
console.log(` 共 ${rows.length} 条记录`)
|
console.log(` 共 ${rows.length} 条记录`)
|
||||||
@@ -458,7 +465,7 @@ function exportXlsx(manifestPath, rows) {
|
|||||||
} catch (err) {
|
} catch (err) {
|
||||||
if (err.code === 'MODULE_NOT_FOUND') {
|
if (err.code === 'MODULE_NOT_FOUND') {
|
||||||
console.warn('xlsx 模块未安装,改用 CSV 格式')
|
console.warn('xlsx 模块未安装,改用 CSV 格式')
|
||||||
exportCsv(manifestPath, rows)
|
exportCsv(manifestPath, rows, exportName)
|
||||||
} else {
|
} else {
|
||||||
throw err
|
throw err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -131,11 +131,12 @@ node .claude/skills/video-from-script/scripts/batch-pipeline.js rename-drafts --
|
|||||||
node .claude/skills/video-from-script/scripts/batch-pipeline.js export --file output/batch_XXX/batch-manifest.json
|
node .claude/skills/video-from-script/scripts/batch-pipeline.js export --file output/batch_XXX/batch-manifest.json
|
||||||
```
|
```
|
||||||
|
|
||||||
输出 CSV 表格,列:`选题 | 脚本 | 账号 | 模式 | 音色 | 转发文案带话题 | 草稿名称`
|
输出 CSV 表格,列:`选题一 | 选题二 | 脚本 | 账号 | 模式 | 音色 | 转发文案带话题 | 草稿名称 | 草稿地址`
|
||||||
|
|
||||||
- **选题**列 = 方案A(封面双句)
|
- **选题一**列 = 方案A(封面双句)
|
||||||
|
- **选题二**列 = 方案B(封面短标题)
|
||||||
- **草稿名称**列 = `账号名_月日_序号_方案B`
|
- **草稿名称**列 = `账号名_月日_序号_方案B`
|
||||||
- CSV 文件路径:`batch-manifest_export.csv`(与 manifest 同目录)
|
- 导出文件命名:`账号名_MMDD_起号~止号.csv`,如 `执黑先行_0516_01~16.csv`(与 manifest 同目录)
|
||||||
- 导出后询问用户是否打包草稿到桌面
|
- 导出后询问用户是否打包草稿到桌面
|
||||||
|
|
||||||
## 草稿箱改名
|
## 草稿箱改名
|
||||||
|
|||||||
@@ -12,9 +12,9 @@
|
|||||||
"references": []
|
"references": []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ttsVoice": "斯内普",
|
"ttsVoice": "谢尔比",
|
||||||
"ttsRate": 1.3,
|
"ttsRate": 1.3,
|
||||||
"ttsInstruction": "用沉稳有力的男性声音朗读,语速适中,语气坚定有力,像是一个有经历有力量的人在平静地讲述生活的方向",
|
"ttsInstruction": "用一种过来人的口吻说话,像是经历了太多懒得废话的大哥,语气里带点漫不经心和不耐烦。声音不用太用力,轻描淡写但每个字都砸在点上。偶尔轻哼一口气,显得很松弛。",
|
||||||
"storyboardPrompt": "prompts/分镜.md",
|
"storyboardPrompt": "prompts/分镜.md",
|
||||||
"imageStylePrompt": "prompts/图片提示词.md",
|
"imageStylePrompt": "prompts/图片提示词.md",
|
||||||
"videoStylePrompt": "prompts/视频提示词.md",
|
"videoStylePrompt": "prompts/视频提示词.md",
|
||||||
|
|||||||
Reference in New Issue
Block a user