# -*- coding: utf-8 -*- """Dump all Lubu storyboard shot prompts (tasks 13100-13361) into a markdown analysis source.""" import json, ssl, pathlib, urllib.request BASE = "https://192.168.31.88:8042" CFG = pathlib.Path(r"C:\Users\admin\.zcode\cli\config.json") pat = json.loads(CFG.read_text(encoding="utf-8-sig"))["mcp"]["servers"]["sorb"]["env"]["SORB_PAT"] ctx = ssl._create_unverified_context() def get(url): req = urllib.request.Request(url, headers={"Authorization": "Bearer " + pat}) return urllib.request.urlopen(req, context=ctx, timeout=60) # storyboard shot tasks: id -> shot label SHOTS = { 13100: "S1-2v6 锁赤兔朝城门疾驰(旧轴,弃用)", 13146: "S1-4 迎雪正面", 13177: "S2-2 面部特写", 13183: "S2-1 全貌亮相v2", 13165: "S1-6 v2失败", 13168: "S1-6 v3失败", 13325: "S1-6 侧跟疾驰v4", 13244: "S3-1 冲阵v3", 13245: "S3-2 关羽", 13246: "S3-3 张飞", 13247: "S3-4 刘备", 13248: "S3-5 横扫", 13249: "S03场景v3", 13250: "S08场景v3", 13326: "S4-1 濮阳大远景", 13327: "S4-2 六将剪影", 13328: "S4-3 戟挑矛", 13329: "S4-4 戟尾反打", 13330: "S4-5 破围而出", 13331: "S5-1 辕门张弓", 13332: "S5-2 弦满箭出", 13333: "S5-3 箭钉戟枝", 13334: "S6-1 凤仪亭", 13335: "S6-2 戟影烛灭", 13336: "S6-3 雨夜画戟", 13337: "S6-4 泥水红翎", 13338: "S7-1 戟指怒吼", 13339: "S7-2 万军后退", 13340: "S7-3 眼神锁定", 13341: "S7-4 单骑对万军", 13342: "S8-8 游戏亮相", 13343: "S9-1 三面围拢", 13344: "S9-2 戟刃蓄势", 13345: "S10-1 普攻1", 13346: "S10-2 普攻2", 13347: "S10-3 普攻3", 13348: "S10-4 八格横扫", 13349: "S10-5 护甲裂纹", 13350: "S10-7 戟尖收势", 13351: "S11-1 定妆", } out = ["# 吕布PV 分镜提示词全量底料(后台 task 原文)\n"] for tid in sorted(SHOTS): try: d = json.loads(get(f"{BASE}/api/external/v1/tasks/{tid}").read().decode("utf-8")) except Exception as e: out.append(f"\n## task {tid} {SHOTS[tid]}\n\n(获取失败: {str(e)[:80]})\n") continue refs = [r.get("id") for r in (d.get("references") or []) if isinstance(r, dict)] out.append(f"\n## task {tid} | {SHOTS[tid]} | refs={refs}\n") out.append("```\n" + (d.get("prompt") or "(无prompt)") + "\n```\n") pathlib.Path(r"D:\腾讯\吕布\吕布PV_分镜提示词底料.md").write_text("\n".join(out), encoding="utf-8") print("written, tasks:", len(SHOTS))