feat: 封面生成流水线、执黑先行二号风格扩展、账号配置更新

- 新增 gen-covers 系列脚本(kling/gpt/t2i/batch/direct/final等方案)
- 执黑先行二号添加9种风格提示词目录(梦核/剪纸/水墨/毛毡/硬核线条等)
- 执黑先行添加封面提示词、执黑先行二号更新图片提示词
- product_viral_factory 账号配置扩充并添加 cover_template 参考图
- capcut_assemble/kling-video-generator/oss-upload/poll-utils 细节修复
- CLAUDE.md 更新流程文档

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
lc
2026-06-06 16:44:47 +08:00
parent 1e110219ff
commit 9cbdabda31
71 changed files with 2444 additions and 119 deletions

View File

@@ -38,12 +38,14 @@ const { syncDraft, registerDraft } = require('./sync-to-jianying')
const ossUpload = require(path.join(__dirname, 'oss-upload'))
async function uploadToOSS(filePath) {
const { url } = await ossUpload.uploadFile(filePath)
async function uploadToOSS(filePath, ossName) {
const opts = ossName ? { name: ossName } : {}
const { url } = await ossUpload.uploadFile(filePath, opts)
return url
}
async function batchUploadToOSS(inputDir, files, concurrency = 3) {
const dirPrefix = path.basename(inputDir) + '_'
const urls = {}
const queue = [...files]
const workers = Array(Math.min(concurrency, queue.length)).fill(null).map(async () => {
@@ -52,11 +54,12 @@ async function batchUploadToOSS(inputDir, files, concurrency = 3) {
if (!file) break
const filePath = path.join(inputDir, file)
if (!fs.existsSync(filePath)) continue
const ossName = dirPrefix + path.basename(filePath)
try {
urls[file] = await uploadToOSS(filePath)
console.log(` 上传: ${file} -> OK`)
urls[file] = await uploadToOSS(filePath, ossName)
console.log(` 上传: ${ossName} -> OK`)
} catch (err) {
console.error(` 上传失败: ${file} - ${err.message}`)
console.error(` 上传失败: ${ossName} - ${err.message}`)
}
}
})
@@ -65,6 +68,7 @@ async function batchUploadToOSS(inputDir, files, concurrency = 3) {
}
async function batchUploadAudio(inputDir, items) {
const dirPrefix = path.basename(inputDir) + '_'
const urls = {}
for (const item of items) {
// 处理主音频
@@ -74,11 +78,12 @@ async function batchUploadAudio(inputDir, items) {
? item.audio
: path.resolve(inputDir, item.audio)
if (fs.existsSync(filePath)) {
const ossName = dirPrefix + path.basename(filePath)
try {
urls[item.audio] = await uploadToOSS(filePath)
console.log(` 上传: ${path.basename(filePath)} -> OK`)
urls[item.audio] = await uploadToOSS(filePath, ossName)
console.log(` 上传: ${ossName} -> OK`)
} catch (err) {
console.error(` 上传失败: ${path.basename(filePath)} - ${err.message}`)
console.error(` 上传失败: ${ossName} - ${err.message}`)
}
}
}
@@ -97,11 +102,12 @@ async function batchUploadAudio(inputDir, items) {
console.error(` 音频文件不存在: ${filePath}`)
continue
}
const ossName = dirPrefix + path.basename(filePath)
try {
urls[seg.audio] = await uploadToOSS(filePath)
console.log(` 上传: ${path.basename(filePath)} -> OK`)
urls[seg.audio] = await uploadToOSS(filePath, ossName)
console.log(` 上传: ${ossName} -> OK`)
} catch (err) {
console.error(` 上传失败: ${path.basename(filePath)} - ${err.message}`)
console.error(` 上传失败: ${ossName} - ${err.message}`)
}
}
}