From b02d0bf48756ed3d37af11a0c396c1426a98bf46 Mon Sep 17 00:00:00 2001 From: Leon <62660101+Oreomeow@users.noreply.github.com> Date: Fri, 13 Aug 2021 00:12:32 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8C=B1mimotion.js=20for=20V2P?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Scripts/js/mimotion.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Scripts/js/mimotion.js diff --git a/Scripts/js/mimotion.js b/Scripts/js/mimotion.js new file mode 100644 index 0000000..9f93fbe --- /dev/null +++ b/Scripts/js/mimotion.js @@ -0,0 +1,23 @@ +// @grant nodejs +console.log("⏳ 初始化安装依赖中......") +$exec('pip3 install pytz', { + cwd: './script/Shell', + timeout: 0, + cb(data, error) { + error ? console.error(error) : console.log(data) + } +}) +console.log("⏳ 开始执行 mimotion.py") +$exec('python3 https://raw.githubusercontent.com/Oreomeow/VIP/main/Scripts/py/mimotion.py', { + cwd: './script/Shell', + timeout: 0, + env: { + MI_USER: $store.get('MI_USER', 'string'), + MI_PWD: $store.get('MI_PWD', 'string'), + PMODE: $store.get('PMODE', 'string'), + PKEY: $store.get('PKEY', 'string') + }, + cb(data, error) { + error ? console.error(error) : console.log(data) + } +})