move app object

This commit is contained in:
gorojack 2024-07-19 11:32:15 +08:00
parent 48588d6dc1
commit 76534820e9
2 changed files with 36 additions and 35 deletions

66
dist/0.0.1_beta.json vendored

@ -2,39 +2,6 @@
"key": -1,
"name": "Test Subscription",
"version": "0.0.1_beta",
"apps": {
"hhjapp": {
"hhjapp": {
"packageName": "tech.cqxqg.hhjapp",
"name": "小新记账",
"version": "1.0.0",
"rules": [
{
"key": 0,
"selector": "[text='记账']",
"action": "click"
},
{
"key": 1,
"selector": "[desc='备注'] + Button + EditText",
"action": "click",
"actionDelay": 50,
"activityId": "tech.cqxqg.hhjapp.MainActivity",
"classId": ""
},
{
"key": 2,
"selecotr": "[desc='备注'] + Button + EditText]",
"preAction": 1,
"action": "setText",
"args": "自动填充内容",
"activityId": "tech.cqxqg.hhjapp.MainActivity",
"classId": ""
}
]
}
}
},
"global": {
"name": "全局测试",
"rules": [
@ -51,5 +18,36 @@
"enable": true
}
]
}
},
"apps": [
{
"packageName": "tech.cqxqg.hhjapp",
"name": "小新记账",
"version": "1.0.0",
"rules": [
{
"key": 0,
"selector": "[text='记账']",
"action": "click"
},
{
"key": 1,
"selector": "[desc='备注'] + Button + EditText",
"action": "click",
"actionDelay": 50,
"activityId": "tech.cqxqg.hhjapp.MainActivity",
"classId": ""
},
{
"key": 2,
"selecotr": "[desc='备注'] + Button + EditText]",
"preAction": 1,
"action": "setText",
"args": "自动填充内容",
"activityId": "tech.cqxqg.hhjapp.MainActivity",
"classId": ""
}
]
}
]
}

@ -10,12 +10,15 @@ version = "0.0.1_beta"
def get_subscription():
apps_folder = "apps"
apps = get_global_vars_from_apps(apps_folder)
apps_arr = []
for app_name in apps:
apps_arr.append(apps[app_name][app_name])
return {
"key": key,
"name": name,
"version": version,
"apps": apps,
"global": global_rules,
"apps": apps_arr,
}