Files
mixly3-server/mixly/boards/default/python_mixpy/examples/AipOcr.mix
2026-01-24 16:13:38 +08:00

1 line
4.3 KiB
XML

<xml version=\"1.0Beta\" board=\"mixpy\" xmlns=\"http://www.w3.org/1999/xhtml\"><block type=\"procedures_defreturn\" id=\"Qb=X9[1.)DQ-;0^i85%Y\" x=\"0\" y=\"0\"><mutation><arg name=\"path\"></arg></mutation><field name=\"NAME\">procedure</field><statement name=\"STACK\"><block type=\"storage_fileopen\" id=\"%eYwvpbP*1].*t0ctb}x\"><field name=\"MODE\">rb</field><value name=\"FILENAME\"><shadow type=\"text\" id=\"KEWG5_6$b]ER.VQ`bj/g\"><field name=\"TEXT\">filename.txt</field></shadow><block type=\"variables_get\" id=\"9rm]@}VrTg1_d7?pA;,t\"><field name=\"VAR\">path</field></block></value><value name=\"FILE\"><shadow type=\"variables_get\" id=\"zupqr.)),IMtPOm,Got:\"><field name=\"VAR\">f</field></shadow></value></block></statement><value name=\"RETURN\"><block type=\"storage_get_contents\" id=\"Kp7!XsdLF*3Q:uoNZg-!\"><field name=\"MODE\">read</field><value name=\"FILE\"><shadow type=\"variables_get\" id=\"{j`!MHr_12C0ZeuIKf|W\"><field name=\"VAR\">f</field></shadow></value><value name=\"SIZE\"><shadow type=\"math_number\" id=\"uu$NUi8/S^^igXzLsKBo\"><field name=\"NUM\">-1</field></shadow></value></block></value></block><block type=\"AI_client\" id=\"_BO_AvQdtb}4OIpulF0F\" x=\"20\" y=\"150\"><field name=\"CTYPE\">AipOcr</field><value name=\"SUB\"><shadow type=\"variables_get\" id=\"-cB|N|~GUC%pmT_m8__Q\"><field name=\"VAR\">client</field></shadow></value><value name=\"APP_ID\"><shadow type=\"text\" id=\"dk;zXxC:yfNL^[0dEBoH\"><field name=\"TEXT\">14298851</field></shadow></value><value name=\"API_KEY\"><shadow type=\"text\" id=\"x={C|FO5+i,S^]!aK{`S\"><field name=\"TEXT\">WhPHPqF88PxpV0yEohosGa7C</field></shadow></value><value name=\"SECRET_KEY\"><shadow type=\"text\" id=\"6*FxOLGHfjS{B-JQV!H=\"><field name=\"TEXT\">FWBHpZMI5yg2eqPwUQZHuBA6imhGGLsQ</field></shadow></value><next><block type=\"variables_set\" id=\"l]qT@BvGo%Ely4}2yg]k\"><field name=\"VAR\">image</field><value name=\"VALUE\"><block type=\"procedures_callreturn\" id=\"VG/=w|o:Y+2$iu9psrvu\"><mutation name=\"procedure\"><arg name=\"path\"></arg></mutation><value name=\"ARG0\"><block type=\"AI_ChooseAndGet\" id=\"os;F*^.R[@a|^HAum8#J\"><field name=\"TYPE\">getOneFile</field></block></value></block></value><next><block type=\"variables_set\" id=\"(fU;VaWmc@qXE|=QenGc\"><field name=\"VAR\">result</field><value name=\"VALUE\"><block type=\"AI_Ocr\" id=\"Vs`WMF-gV[MZ|$QSgOAr\"><value name=\"SUB\"><shadow type=\"variables_get\" id=\"^iF/RlawLSv5[Xy|^k[5\"><field name=\"VAR\">client</field></shadow></value><value name=\"FUNC\"><shadow type=\"AI_Ocr_Func\" id=\"wn{wq%*PzU-vThHppO@J\"><field name=\"TYPE\">basicGeneral</field></shadow></value><value name=\"ADDR\"><shadow type=\"text\" id=\"t`n+t9JHI4)_S%AhffId\"><field name=\"TEXT\">C:/mixly.jpg</field></shadow><block type=\"variables_get\" id=\"O]x2rmR*$`2rL^cybcO;\"><field name=\"VAR\">image</field></block></value><value name=\"ATTR\"><block type=\"dicts_create_with_noreturn\" id=\")%CjNHCCFm~+2Y#vg!zt\"><mutation items=\"4\"></mutation><field name=\"KEY0\">\"language_type\"</field><field name=\"KEY1\">\"detect_language\"</field><field name=\"KEY2\">\"probability\"</field><field name=\"KEY3\">\"detect_direction\"</field><value name=\"ADD0\"><block type=\"text\" id=\"~x07,@yt~y8BgJy=sm.L\"><field name=\"TEXT\">CHN_ENG</field></block></value><value name=\"ADD1\"><block type=\"text\" id=\"J0%GfD=tY8sO!f0~q!D?\"><field name=\"TEXT\">true</field></block></value><value name=\"ADD2\"><block type=\"text\" id=\"2m2Wfj9b^XJOx7DT`evZ\"><field name=\"TEXT\">true</field></block></value><value name=\"ADD3\"><block type=\"text\" id=\"K.dR6w(`9oF%eFJZ^hZ,\"><field name=\"TEXT\">true</field></block></value></block></value></block></value><next><block type=\"inout_print_inline\" id=\"Y2_m|J^1h(Mf6v8LgM[o\"><value name=\"VAR\"><shadow type=\"text\" id=\"9+GPbMY*;t9O)z-2YZ!@\"><field name=\"TEXT\">Hello</field></shadow><block type=\"dicts_get\" id=\"Q0nrqjR(b9B/-ZPR(pwt\"><value name=\"DICT\"><shadow type=\"variables_get\" id=\"?^ijX?b7U!~L9F}2WEfe\"><field name=\"VAR\">mydict</field></shadow><block type=\"variables_get\" id=\"beq@c)4[_y=%ZmC?(WU,\"><field name=\"VAR\">result</field></block></value><value name=\"KEY\"><shadow type=\"text\" id=\"GU[[JZwyi!8^v#yY|Gc8\"><field name=\"TEXT\">words_result</field></shadow></value></block></value></block></next></block></next></block></next></block></xml>