ai_member_xiaoyan/fill_components.py

372 lines
7.4 KiB
Python
Raw Permalink 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 pandas as pd
from openpyxl import load_workbook
# 读取原始Excel
input_path = "/root/.openclaw/media/inbound/12-5---1879d0c9-7cdf-4cd5-9aff-f03091ebada3.xlsx"
output_path = "/root/.openclaw/workspace-xiaoyan/L1-S1-U12-L5_组件完成版.xlsx"
# 定义组件内容,按顺序对应表格中的组件行
components = [
# 1112501 对话朗读
"""【任务标题】描述当前时间
【资源配置】
图片时机:【互动内容】
音频载体:无
【情境引入】
【互动内容】
User: It is still night.(朗读)
【互动反馈】
正确:无
错误Vicky : Wait, that didn't sound right.
【后置对话】
""",
# 1112502 图片单选
"""【任务标题】等待清晨
【情境引入】
【互动内容】
题干We must wait for the $morning$.
选项:
00
01正确
辅助信息morning指"清晨"
【互动反馈】
正确:无
错误Sally : Oh no, that's not right. Look outside, it's still dark!
【后置对话】
""",
# 1112503 对话朗读
"""【任务标题】询问清晨时间
【资源配置】
图片时机:无
音频载体:无
【情境引入】
【互动内容】
Vicky: How do we know when it's morning?(朗读)
【互动反馈】
正确:无
错误Sally : Hmm, I didn't catch that. Can you say it again?
【后置对话】
""",
# 1112504 对话朗读
"""【任务标题】表达尝试意愿
【资源配置】
图片时机:无
音频载体:无
【情境引入】
【互动内容】
User: I'd like to try too.(朗读)
【互动反馈】
正确:无
错误Sally : Oh, that doesn't sound quite right.
【后置对话】
Ben: Me too.""",
# 1112505 对话朗读
"""【任务标题】尝试做手影狗
【资源配置】
图片时机:无
音频载体:无
【情境引入】
【互动内容】
User: I want to try to make a dog!(朗读)
【互动反馈】
正确:无
错误Lucy : Wait, what did you say? I didn't get it.
【后置对话】
""",
# 1112506 对话朗读
"""【任务标题】评价夜晚乐趣
【资源配置】
图片时机:无
音频载体:无
【情境引入】
【互动内容】
User: Night is so much fun!(朗读)
【互动反馈】
正确:无
错误Lucy : Hmm, that didn't sound right.
【后置对话】
""",
# 1112507 对话挖空
"""【任务标题】否定当前是清晨
【资源配置】
图片时机:无
音频载体:无
【情境引入】
【互动内容】
题干It isn't ____.
选项:
选项1night
选项2morning正确
辅助信息morning指"清晨"
【互动反馈】
正确:无
错误Ben : Oh no, that's wrong. It's still dark out!
【后置对话】
""",
# 1112508 对话挖空
"""【任务标题】确认当前是夜晚
【资源配置】
图片时机:无
音频载体:无
【情境引入】
【互动内容】
题干It is still ____!
选项:
选项1night正确
选项2morning
辅助信息night指"夜晚"
【互动反馈】
正确:无
错误Ben : Wait, that's not right. The sun isn't up yet!
【后置对话】
""",
# 1112509 对话朗读
"""【任务标题】提议逐个尝试
【资源配置】
图片时机:无
音频载体:无
【情境引入】
【互动内容】
User: Let's try them one by one!(朗读)
【互动反馈】
正确:无
错误Sally : Hmm, that didn't sound quite right.
【后置对话】
""",
# 1112510 对话选读
"""【任务标题】尝试下一个格子
【资源配置】
图片时机:无
音频载体:无
【情境引入】
【互动内容】
请选择一句朗读:
选项1Let's try the next!
选项2Let's try them one by one!
辅助信息:两个选项均为正确答案
【互动反馈】
正确:无
错误Sally : Oh, that's not one of the choices.
【后置对话】
""",
# 1112510 图片有序
"""【任务标题】排序跳格子顺序
【情境引入】
【互动内容】
题干Put the actions in order of $one by one$.
选项:
00
01
02
03
正确顺序00→01→02→03
辅助信息one by one指"一个接一个"
【互动反馈】
正确:无
错误Dan : Oops, that's the wrong order! We can't jump like that.
【后置对话】
""",
# 1112511 对话挖空
"""【任务标题】提议尝试另一块格子
【资源配置】
图片时机:无
音频载体:无
【情境引入】
【互动内容】
题干____ that one.
选项:
选项1let's try正确
选项2let's play
辅助信息let's try指"我们试试"
【互动反馈】
正确:无
错误Dan : Wait, that doesn't make sense.
【后置对话】
""",
# 1112512 对话朗读
"""【任务标题】询问下一个人选
【资源配置】
图片时机:无
音频载体:无
【情境引入】
【互动内容】
User: Who is the next?(朗读)
【互动反馈】
正确:无
错误Sally : Hmm, that didn't sound quite right.
【后置对话】
Vicky: It's my turn!""",
# 1112513 对话挖空
"""【任务标题】描述灯逐个亮起
【资源配置】
图片时机:【互动内容】
音频载体:无
【情境引入】
【互动内容】
题干The lights are turning on ____!
选项:
选项1one by one正确
选项2two by two
辅助信息one by one指"一个接一个"
【互动反馈】
正确:无
错误Lucy : Oh no, that's wrong! The lights are turning on in order.
【后置对话】
""",
# 1112514 对话组句
"""【任务标题】组句提议尝试
【资源配置】
图片时机:无
音频载体:无
【情境引入】
User: The first tile didn't work.
【互动内容】
题目:提议大家试试另一块格子
选项1try this
选项2Let's
选项3one.
答案Let's try this one.
辅助信息Let's do sth.是提议做某事的固定句式
【互动反馈】
正确:无
错误Sally : Oops, that's not the right sentence.
【后置对话】
""",
# 1112516 对话组句
"""【任务标题】组句逐个行动
【资源配置】
图片时机:无
音频载体:无
【情境引入】
Sally: We need to stand on the tiles one after another.
【互动内容】
题目:告诉大家要一个接一个做
选项1Let's do it
选项2one
选项3by
选项4one!
答案Let's do it one by one!
辅助信息one by one是固定搭配意思是"一个接一个"
【互动反馈】
正确:无
错误Sally : Oh, that doesn't make sense. Try again.
【后置对话】
""",
# 1112517 对话选择
"""【任务标题】判断当前时间
【资源配置】
图片时机:【互动内容】
音频载体:无
【情境引入】
Fred: I see the light from the lighthouse!
【互动内容】
Wow! It's so bright! ____
选项:
选项1It's morning now!(正确)
选项2It's night now!
辅助信息morning指"清晨"night指"夜晚"
【互动反馈】
正确:无
错误Fred : Wait, that's not right! Look at the sun in the sky!
【后置对话】
"""
]
# 加载工作簿
wb = load_workbook(input_path)
ws = wb.active
# 找到组件列第7列索引从1开始
component_col = 7
# 找到有组件ID的行从第6行开始是数据行
component_row_start = 6
# 逐个填入组件内容
for i, comp in enumerate(components):
row = component_row_start + i
ws.cell(row=row, column=component_col, value=comp)
# 保存文件
wb.save(output_path)
print(f"文件已保存到: {output_path}")