mirror of
http://shenjack.top:5100/shenjack/icalingua-python-bot.git
synced 2024-11-23 12:41:05 +08:00
aaa
This commit is contained in:
parent
2f1cffc1e6
commit
987f201ed1
|
@ -135,7 +135,10 @@ if (run_env.from_code) {
|
||||||
global.finish_trigger = finish_trigger;
|
global.finish_trigger = finish_trigger;
|
||||||
|
|
||||||
// 读取 input.txt
|
// 读取 input.txt
|
||||||
const input_path = path.join(__dirname, "input.txt");
|
// const input_path = path.join(__dirname, "input.txt");
|
||||||
|
// 从 cli 参数里读取
|
||||||
|
const input_path = run_env.cli_args[2];
|
||||||
|
logger.debug("input_path", input_path);
|
||||||
const input_data = fs.readFileSync(input_path, "utf-8");
|
const input_data = fs.readFileSync(input_path, "utf-8");
|
||||||
global.name_input = input_data;
|
global.name_input = input_data;
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,9 @@ def on_ica_message(msg: IcaNewMessage, client: IcaClient) -> None:
|
||||||
with open(root_path / "md5" / "input.txt", "w") as f:
|
with open(root_path / "md5" / "input.txt", "w") as f:
|
||||||
f.write(names)
|
f.write(names)
|
||||||
# 执行 node md5.js
|
# 执行 node md5.js
|
||||||
result = subprocess.run(["node", (root_path / "md5" / "md5.js").absolute()], stdout=subprocess.PIPE)
|
runner_path = root_path / "md5" / "md5.js"
|
||||||
|
input_path = root_path / "md5" / "input.txt"
|
||||||
|
result = subprocess.run(["node", runner_path.absolute(), input_path.absolute()], stdout=subprocess.PIPE)
|
||||||
# 获取结果
|
# 获取结果
|
||||||
result = result.stdout.decode("utf-8")
|
result = result.stdout.decode("utf-8")
|
||||||
# 发送结果
|
# 发送结果
|
||||||
|
|
Loading…
Reference in New Issue
Block a user