ai_member_xiaobian/scripts/export_act3.py
2026-05-05 08:10:01 +08:00

97 lines
6.6 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import openpyxl
from openpyxl.styles import Font
wb = openpyxl.Workbook()
ws = wb.active
ws.title = "第3幕剧本"
col_widths = {"A": 12, "B": 8, "C": 10, "D": 10, "E": 50, "F": 15, "G": 50, "H": 10, "I": 15}
for col, w in col_widths.items():
ws.column_dimensions[col].width = w
headers = ["类型", "ID", "组件配置", "知识点", "剧情描述", "名字", "台词", "角色", "台词润色"]
bold = Font(bold=True)
for i, h in enumerate(headers, 1):
cell = ws.cell(row=1, column=i, value=h)
cell.font = bold
rows = [
# === 桥段1排队 ===
["TL", None, None, None, "Justin笑着摇头。", None, None, None, None],
[None, None, None, None, None, "Justin", "No no no. This is not hero change.", None, None],
[None, None, None, None, None, "Justin", "This is a dragon dance!", None, None],
[None, None, None, None, None, "Leo", "Dragon dance?", None, None],
[None, None, None, None, None, "Justin", "Yes! But first, you need to stand in a line.", None, None],
[None, None, None, None, None, "Justin", "Come! Everyone, stand in line!", None, None],
[None, None, None, None, "Leo第一个冲到最前面。", None, None, None, None],
[None, None, None, None, None, "Leo", "I'm number 1! I'm first in line!", None, None],
[None, None, None, None, "Ben排到Leo后面Vicky排第三。", None, None, None, None],
[None, None, None, None, None, "Ben", "I'm number 2.", None, None],
[None, None, None, None, None, "Vicky", "And I'm number 3 in line.", None, None],
[None, None, None, None, None, "Justin", "Good! Now, number 1 does move 1.", None, None],
[None, None, None, None, None, "Justin", "Number 2 does move 2.", None, None],
[None, None, None, None, None, "Justin", "When you all move together, you look like a dragon!", None, None],
# === 中互动8 ===
["中互动", None, None, None, "【教研图】教室场景同学散乱站着。User需要把Leo拖到位置1、Ben到位置2、Vicky到位置3排成一条line。完成后队列亮起。", None, None, None, None],
[None, None, None, None, None, "User", "Stand in line! Leo is 1, Ben is 2, Vicky is 3!", None, None],
# === 桥段2Justin示范Leo做不好 ===
["TL", None, None, None, "大家排好了。Justin走到队伍前方。", None, None, None, None],
[None, None, None, None, None, "Justin", "Number 1 is the dragon head.", None, None],
[None, None, None, None, None, "Justin", "The head move is very important.", None, None],
[None, None, None, None, None, "Justin", "Take me as an example.", None, None],
[None, None, None, None, None, "Justin", "Watch my head and arms.", None, None],
[None, None, None, None, "Justin做了一个流畅的龙头动作——抬头、双臂向前划。", None, None, None, None],
[None, None, None, None, None, "Leo", "Easy! Watch me!", None, None],
[None, None, None, None, "Leo尝试模仿但做成了超人变身招式。", None, None, None, None],
[None, None, None, None, None, "Justin", "No no, not hero change!", None, None],
[None, None, None, None, "Leo再试一次胳膊不协调地乱甩。", None, None, None, None],
[None, None, None, None, "【emoji】Leo emoji_sad", None, None, None, None],
[None, None, None, None, None, "Leo", "Hmm... it's hard.", None, None],
[None, None, None, None, "Justin看了一眼Vicky。", None, None, None, None],
[None, None, None, None, None, "Justin", "My Vicky's move is so good!", None, None],
[None, None, None, None, None, "Justin", "She's always the best!", None, None],
[None, None, None, None, "【emoji】Vicky emoji_shy", None, None, None, None],
[None, None, None, None, None, "Vicky", "Grandpa... not again...", None, None],
[None, None, None, None, "【emoji】全班 emoji_laugh", None, None, None, None],
# === 中互动9 ===
["中互动", None, None, None, None, "Justin", "Is Leo in the right place?", None, None],
[None, None, None, None, None, "User", "Leo is number 1 in line. But his move is wrong!", None, None],
# === 桥段3Leo退出User接替 ===
["TL", None, None, None, "Leo又试了一次还是做不好。", None, None, None, None],
[None, None, None, None, None, "Leo", "Ahh... I can't do it.", None, None],
[None, None, None, None, None, "Leo", "I'm a Hero... not a Dragon.", None, None],
[None, None, None, None, None, "Leo", "Hero change is my thing!", None, None],
[None, None, None, None, "Leo从1号位退出来有点失落。", None, None, None, None],
[None, None, None, None, None, "Ben", "It's okay Leo.", None, None],
[None, None, None, None, None, "Leo", "Someone better can be number 1.", None, None],
[None, None, None, None, "大家看向User。", None, None, None, None],
[None, None, None, None, None, "Justin", "We need a new number 1 in line.", None, None],
[None, None, None, None, None, "Justin", "Who wants to be the dragon head?", None, None],
# === 中互动10 ===
["中互动", None, None, None, None, "User", "I'll stand in line! I'm number 1!", None, None],
# === 桥段4User做龙头初次成功 ===
["TL", None, None, None, "User站到队伍最前面。队伍变成User 1号、Ben 2号、Vicky 3号。", None, None, None, None],
[None, None, None, None, None, "Justin", "Good! Now do the head move.", None, None],
[None, None, None, None, "Justin再次示范龙头动作。User跟着做比Leo协调。", None, None, None, None],
[None, None, None, None, None, "Justin", "Yes! Very good!", None, None],
[None, None, None, None, "Leo在后面挥拳。", None, None, None, None],
[None, None, None, None, None, "Leo", "Go go go! Dragon head!", None, None],
[None, None, None, None, None, "Justin", "Everyone, follow the head. Move!", None, None],
[None, None, None, None, "大家跟着动起来,歪歪扭扭但有了雏形。", None, None, None, None],
[None, None, None, None, "【emoji】全班 emoji_laugh", None, None, None, None],
[None, None, None, None, None, "Vicky", "We look so funny!", None, None],
[None, None, None, None, None, "Ben", "But it's working!", None, None],
# === 中互动11 ===
["中互动", None, None, None, None, "Leo", "How does it feel? Being the dragon head?", None, None],
[None, None, None, None, None, "User", "I'm the head of the line! Let's move together!", None, None],
]
for r_idx, row in enumerate(rows, 2):
for c_idx, val in enumerate(row, 1):
if val is not None:
ws.cell(row=r_idx, column=c_idx, value=val)
output_path = "/root/.openclaw/workspace-xiaobian/output/U18_L2_第3幕剧本.xlsx"
wb.save(output_path)
print(f"OK: {output_path}")