mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-01 04:40:38 +08:00
Javascript 和 Python 增加内置函数 QLAPI.notify
This commit is contained in:
@@ -3,6 +3,18 @@ import re
|
||||
import env
|
||||
import subprocess
|
||||
import json
|
||||
import builtins
|
||||
from notify import send
|
||||
|
||||
|
||||
class BaseApi:
|
||||
def notify(self, *args, **kwargs):
|
||||
return send(*args, **kwargs)
|
||||
|
||||
|
||||
def init_global():
|
||||
QLAPI = BaseApi()
|
||||
builtins.QLAPI = QLAPI
|
||||
|
||||
|
||||
def try_parse_int(value):
|
||||
@@ -66,4 +78,5 @@ def run():
|
||||
os.environ[env_param] = env_str
|
||||
|
||||
|
||||
init_global()
|
||||
run()
|
||||
|
||||
Reference in New Issue
Block a user