Open lhy1024 opened 1 year ago
https://www.zhihu.com/question/621008317/answer/3204256571
# variables 是需要用户填入的文本变量,可以有多个,每个对应生成器的一个输入框。 [[variables]] id = "people1" description = "人物1" default = "王洪文" [[variables]] id = "team" description = "人物1所在的组织" default = "四人帮" [[variables]] id = "people2" description = "人物2" default = "卫士" [[variables]] id = "team2" description = "人物2所在的组织" default = "特别行动小组" [[variables]] id = "people3" description = "人物3" default = "华国锋" [[variables]] id = "people4" description = "人物4" default = "叶剑英" [[variables]] id = "action" description = "行为" default = "开会" [[variables]] id = "something" description = "某物" default = "随身警卫" [[variables]] id = "position1" description = "地点1" default = "院子" [[variables]] id = "position2" description = "地点2" default = "正厅" [[variables]] id = "position3" description = "地点3" default = "走廊" [[variables]] id = "history1" description = "人物1的经历" default = "当过兵,练过武" [[variables]] id = "history2" description = "人物4的经历" default = "开国元帅" [[variables]] id = "file" description = "某文件" default = "逮捕决定" [templates] # toml 支持多行文本 p2 = [ """ {people1}是第一个被抓的,当时{people1}接到通知要{action},他兴冲冲的刚进{position1}时,他的{something}即被留在外面。{people1}感到事情有些不大对头,但也没在意。当{people1}快走进{position2}大门时,专门对付他的{team2}立即走了过来。 {team2}几个{people2}在{position3}里把他扭住的时候,{people1}惊慌失措,一边大声说 “我是来{action}的,你们要干什么?”一边拳打脚踢,拼命进行反抗。{team2}的{people2}个个身手不凡,{people1}很快就被{team2}制服了,被扭着双臂押到了{position2}里。 在{position2}里,等待他的{people3}把“{file}”念了一遍。还没等{people3}念完,{people1}突然大吼一声,挣脱{people2}的扭缚,向五六米远地方的{people4}猛扑过去。{people1}{history1},一旦扑过去,打伤了{history2},这还了得?{people4}久经沙场,不慌不忙的冷眼看着{people1}的疯狂举动。在这千钧一发之际,一旁的{people2}反应迅速,猛冲上去把{people1}扑倒,死死地把他摁住,给他戴上了手铐。在抓捕“{team}”的成员过程中,{people1}是唯一被戴上手铐的人。{people1}被捕后,对他的监管也最严格的。 """ ] # 'main' 模板展开后是最终的输出 main = ["{p2}"]
已发布: https://disksing.com/sao-gen-gen/92
https://www.zhihu.com/question/621008317/answer/3204256571