feat: package docker deployment and publish flow
This commit is contained in:
@ -155,6 +155,60 @@ User edits config
|
||||
- `base_delay_seconds`
|
||||
- `poll_interval_seconds`
|
||||
|
||||
## Upload And Comment Templates
|
||||
|
||||
`paths.upload_config_file` 指向 `runtime/upload_config.json`。这个文件不只控制 `biliup upload` 的标题、简介、动态和标签,也控制 B 站置顶评论格式。
|
||||
|
||||
投稿字段在 `template` 中:
|
||||
|
||||
```json
|
||||
{
|
||||
"template": {
|
||||
"title": "【{streamer} (歌曲纯享版)】 {date} 共{song_count}首歌",
|
||||
"description": "{streamer} {date} 歌曲纯享版。\n\n完整歌单与时间轴见置顶评论。\n直播完整版:{current_full_video_link}\n上次直播:{previous_full_video_link}",
|
||||
"tag": "可爱,王海颖,唱歌,音乐",
|
||||
"dynamic": "{streamer} {date} 歌曲纯享版已发布。\n直播完整版:{current_full_video_link}"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
评论字段在 `comment_template` 中:
|
||||
|
||||
```json
|
||||
{
|
||||
"comment_template": {
|
||||
"split_header": "当前视频:歌曲纯享版:只保留本场直播中的歌曲片段,歌单见下方。\n直播完整版:{current_full_video_link} (完整录播,含聊天/互动/完整流程)\n上次纯享:{previous_pure_video_link} (上一场歌曲纯享版)",
|
||||
"full_header": "当前视频:直播完整版:保留本场完整录播内容,歌曲时间轴见下方。\n歌曲纯享版:{current_pure_video_link} (只听歌曲看这里)\n上次完整版:{previous_full_video_link} (上一场完整录播)",
|
||||
"split_part_header": "P{part_index}:",
|
||||
"full_part_header": "P{part_index}:",
|
||||
"split_song_line": "{song_index}. {title}{artist_suffix}",
|
||||
"split_text_song_line": "{song_index}. {song_text}",
|
||||
"full_timeline_line": "{song_index}. {line_text}"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
可用变量:
|
||||
|
||||
- `streamer`:主播名。
|
||||
- `date`:从文件名解析出来的日期和时间。
|
||||
- `song_count`:识别到的歌曲数量。
|
||||
- `songs_list`:`songs.txt` 原始歌单内容。
|
||||
- `daily_quote` / `quote_author`:随机引用文本。
|
||||
- `current_full_video_bvid` / `current_full_video_link`:本场直播完整版 BV 和链接。
|
||||
- `current_pure_video_bvid` / `current_pure_video_link`:本场歌曲纯享版 BV 和链接。
|
||||
- `previous_full_video_bvid` / `previous_full_video_link`:上一场直播完整版 BV 和链接。
|
||||
- `previous_pure_video_bvid` / `previous_pure_video_link`:上一场歌曲纯享版 BV 和链接。
|
||||
- `part_index`:评论中的 `P1/P2/P3` 分段序号。
|
||||
- `song_index`:全局歌曲序号。
|
||||
- `title` / `artist` / `artist_suffix`:从 `songs.json` 生成纯享歌单时使用。
|
||||
- `song_text`:从 `songs.txt` 兜底生成纯享歌单时使用,通常不含时间戳。
|
||||
- `line_text`:完整版时间轴的原始行,通常包含时间戳。
|
||||
|
||||
评论头部模板有一条额外规则:如果某一行包含空链接变量,例如 `{previous_full_video_link}` 为空,这一整行会自动跳过,避免发出空链接提示。
|
||||
|
||||
Docker 部署时 `./runtime` 是宿主机挂载目录。镜像更新不会覆盖已有 `runtime/upload_config.json`,因此调整文案或评论格式时应修改宿主机上的这个文件,然后重启容器。
|
||||
|
||||
### collection
|
||||
|
||||
- `enabled`
|
||||
|
||||
Reference in New Issue
Block a user