| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181 |
- {
- "name": "GenerateNote",
- "description": "生成小红书图文笔记",
- "variables": {
- "send-btn-pos": "",
- "prompt": "健康减脂:科学饮食与运动习惯,适合做小红书笔记",
- "img-prompt-arr": [
- "健康减脂餐 轻食沙拉 低卡高蛋白 摆盘",
- "居家有氧运动 女生健身 燃脂操"
- ],
- "download-path": "tmp",
- "img-url-arr": [],
- "idx": 0,
- "pos": "",
- "thumbRect": ""
- },
- "execute": [
- {
- "type": "echo",
- "inVars": ["开始生成小红书图文笔记"]
- },
- {
- "type": "ai",
- "method": "text2text",
- "inVars": ["根据以下主题写一篇小红书风格的图文稿件,要求:长文,至少 500 字,分段清晰、吸引人、适当使用 emoji、适合发笔记。只输出稿件正文,不要标题。主题:{{prompt}}", ""],
- "outVars": ["{article}"]
- },
- {
- "type": "save-txt",
- "inVars": ["{article}", "tmp/article.txt"],
- "outVars": []
- },
- {
- "type": "echo",
- "inVars": ["开始生图"]
- },
- {
- "type": "for",
- "indexVariable": "{idx}",
- "items": "{img-prompt-arr}",
- "body": [
- {
- "type": "echo",
- "inVars": ["请根据描述词找一张确认可下载的图片 URL。描述词:{img-prompt-arr}[{idx}]"]
- },
- {
- "type": "try",
- "try": [
- {
- "type": "ai",
- "method": "text2text",
- "inVars": [
- "请根据以下描述词找一张图片,只返回一张确认过可以正常下载的图片 URL(必须是当前可访问、能直接 GET 下载的地址),不要任何说明、markdown 或换行。描述词:{img-prompt-arr}[{idx}]",
- "doubao"
- ],
- "outVars": ["{img-url-arr}"]
- },
- {
- "type": "download",
- "inVars": ["{img-url-arr}", "tmp/pic{idx}.png"],
- "outVars": []
- }
- ],
- "fail": [
- {
- "type": "try",
- "try": [
- {
- "type": "ai",
- "method": "text2text",
- "inVars": [
- "请根据描述词找一张图片,只返回一个当前可访问、能直接 GET 下载的图片 URL(不要说明、markdown 或换行)。描述词:{img-prompt-arr}[{idx}]",
- "doubao"
- ],
- "outVars": ["{img-url-arr}"]
- },
- {
- "type": "download",
- "inVars": ["{img-url-arr}", "tmp/pic{idx}.png"],
- "outVars": []
- }
- ],
- "fail": [
- {
- "type": "ai",
- "method": "text2text",
- "inVars": [
- "请根据描述词找一张图片,只返回一个可访问的图片 URL(仅 URL,无说明)。描述词:{img-prompt-arr}[{idx}]",
- "doubao"
- ],
- "outVars": ["{img-url-arr}"]
- },
- {
- "type": "download",
- "inVars": ["{img-url-arr}", "tmp/pic{idx}.png"],
- "outVars": []
- }
- ]
- }
- ]
- },
- {
- "type": "echo",
- "inVars": ["豆包返回链接原文:", "{img-url-arr}"]
- },
- {
- "type": "echo",
- "inVars": ["第{{idx}}张图片下载结束"]
- },
- {
- "type": "adb",
- "method": "send-img-to-device",
- "inVars": ["tmp/pic{idx}.png"],
- "outVars": []
- }
- ]
- },
- {
- "type": "img-center-point-location",
- "inVars": ["添加笔记.png"],
- "outVars": ["{send-btn-pos}"]
- },
- {
- "type": "adb",
- "method": "click",
- "inVars": ["{send-btn-pos}"]
- },
- {
- "type": "img-center-point-location",
- "inVars": ["从相册选择.png"],
- "outVars": ["{send-btn-pos}"]
- },
- {
- "type": "adb",
- "method": "click",
- "inVars": ["{send-btn-pos}"]
- },
- {
- "type": "for",
- "indexVariable": "{idx}",
- "items": "{img-prompt-arr}",
- "body": [
- {
- "type": "echo",
- "inVars": ["tmp/pic{idx}.png"]
- },
- {
- "type": "img-center-point-location",
- "method": "template",
- "inVars": ["tmp/pic{idx}.png"],
- "outVars": ["{pos}"]
- },
- {
- "type": "adb",
- "method": "click",
- "inVars": ["{pos}"]
- },
- {
- "type": "img-center-point-location",
- "inVars": ["选中图片.png"],
- "outVars": ["{pos}"]
- },
- {
- "type": "adb",
- "method": "click",
- "inVars": ["{pos}"]
- },
- {
- "type": "adb",
- "method": "keyevent",
- "inVars": ["4"],
- "outVars": []
- }
- ]
- },
- {
- "type": "echo",
- "inVars": ["流程结束"]
- }
- ]
- }
|