forked from xyy261/quizXue
-
Notifications
You must be signed in to change notification settings - Fork 5
/
config-default.ini
242 lines (228 loc) · 14.5 KB
/
config-default.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
[common]
; 设备名称 指明连接的安卓设备, 需要同名[section]
device = mumu
; 数据库URI
; 目前仅使用database_uri, 另两个是担心以后每日答题和挑战答题出现同一题造成bug,只要将三个配置成一样即可
database_uri = sqlite:///./xuexi/data-dev.sqlite
database_article = sqlite:///./xuexi/data-article.sqlite
database_daily = sqlite:///./xuexi/data-dev.sqlite
database_challenge = sqlite:///./xuexi/data-dev.sqlite
; 多项填空临时存放路径
daily_json = ./xuexi/src/json/daily.json
challenge_json = ./xuexi/src/json/challenge.json
comments_json = ./xuexi/src/json/comments.json
; 是否用户,标记是否保存新题副本
is_user = true
; 每日答题永不停
daily_forver = false
; 每日答题每组时间间隔 之前有发生过10秒内开始下一组不得分的情况,后来又没了,所以把这个时间间隔写活
daily_delay = 10
; 挑战答题题数, 积分设为10+, 积点点通设为30+
challenge_count = 35
# 挑战答题时延, 设0-5, 0表示随机
challenge_delay = 0
; 视听学习栏目 默认 推荐
video_column_name = 推荐
; 视听学习视频数量, 积分设为6+,积点点通设为20+ 相应地,确保video_count*video_delay>1080(18分钟)
video_count = 30
; 视听学习每个视频观看秒数
video_delay = 50
; 是否启用文章清单
enable_article_list = true
; 阅读栏目,默认 订阅
; 建议: 设置为订阅,关注公众号、取关公众平台(因为公众平台喜欢发视频,但咱们只想刷文章)
article_column_name = 订阅
; 阅读文章数量,, 积分设为6+,积点点通设为20+ 相应地,确保article_count*article_delay>720(12分钟)
article_count = 25
; 阅读文章秒数 10+
article_delay = 30
; 收藏、分享、留言的文章篇数 积分设为2+, 该操作不积点点通
star_share_comment = 2
; ==============================================================================================================
; 针对留言发布按钮由于输入法栏导致的偏移量
[resolution]
864 = 17
1024 = 23
1280 = 26
2240 = 35
; mumu模拟器
[mumu]
; 设备类型是否为模拟器 true | false
is_virtual_machine = true
xml_uri = ./xuexi/src/xml/uimumu.xml
; host:port 指明连接的模拟器, 当is_virtual_machine = true 时有效
; 主机 host 默认127.0.0.1
; 端口 port 由模拟器决定
; MuMu模拟器 7555(windows) 5555(Mac)
; 夜神安卓模拟器 62001
; 逍遥安卓模拟器 21503
; 雷电安卓模拟器 5555
; 天天安卓模拟器 5037
; 安卓模拟器大师 54001
; Genymotion 5555
; BlueStacks 5555
host = 127.0.0.1
port = 7555
; rule前缀为xpath规则,pos前缀为坐标的复数形式
; ======================================兄弟节点、父节点示例======================================================
; 获取第三个node标签的下一个node标签:"//node[@id='3']/following-sibling::node[1]"
; 获取第三个node标签后面的第N个标签:"//node[@id='3']/following-sibling::*[N]"
; 获取第三个node标签的上一个node标签:"//node[@id='3']/preceding-sibling::node[1]"
; 获取第三个node标签的前面的第N个标签:"//node[@id='3']/preceding-sibling::*[N]"
; 获取第三个node标签的父标签:"//node[@id=='3']/.."
; ==============================================================================================================
; 首页Bottom栏xpath规则
; 强国通 | 百灵 | 学习 | 视听 | 我的
rule_bottom_message = //node[@resource-id="cn.xuexi.android:id/home_bottom_tab_button_message"]/@bounds
rule_bottom_ding = //node[@resource-id="cn.xuexi.android:id/home_bottom_tab_button_ding"]/@bounds
rule_bottom_work = //node[@resource-id="cn.xuexi.android:id/home_bottom_tab_button_work"]/@bounds
rule_bottom_contact = //node[@resource-id="cn.xuexi.android:id/home_bottom_tab_button_contact"]/@bounds
rule_bottom_mine = //node[@resource-id="cn.xuexi.android:id/home_bottom_tab_button_mine"]/@bounds
; 我要答题xpath规则
; 我要答题入口,[我要答题]按钮
rule_quiz_entry = //node[@content-desc="我要答题"]/@bounds
; 我要答题出口:[<]左上角后退按钮 我要答题父节点的第一个子节点,答题记录的前一个兄弟节点
rule_quiz_exit = //node[@content-desc="答题记录"]/preceding-sibling::node[1]/@bounds
; 每日答题入口 [每日答题]按钮
rule_daily_entry = //node[@content-desc="每日答题"]/@bounds
; 挑战答题入口 [挑战答题]按钮
rule_challenge_entry = //node[@content-desc="挑战答题"]/@bounds
; ---------------------------------------------------------------------------------------------------------------
; 每日答题xpath规则
; 题型:填空题、单选题、多选题
rule_type = //node[@content-desc="1 /5" or @content-desc="2 /5" or @content-desc="3 /5" or @content-desc="4 /5" or @content-desc="5 /5"]/preceding-sibling::node[1]/@content-desc
; 题干
rule_content = //node[@class="android.widget.ListView"]/../node[@index="2"]/@content-desc
rule_blank_content = //node[@content-desc="1 /5" or @content-desc="2 /5" or @content-desc="3 /5" or @content-desc="4 /5" or @content-desc="5 /5"]/following-sibling::node[1]/node[@class="android.view.View"]/@content-desc
; 选项坐标
rule_options = //node[@class="android.widget.ListView"]/node/@bounds
; 填空题输入框坐标
rule_edits = //node[@class="android.widget.EditText"]/following-sibling::node[1]/@bounds
; 分数
rule_score = //node[@content-desc="积分: "]/following-sibling::node[1]/@content-desc
rule_score_reached = //node[@content-desc="领取奖励已达今日上限"]/@content-desc
; 正确答案, node[答案解析]的下一个标签
rule_desc = //node[@content-desc="答案解析"]/following-sibling::node[1]/@content-desc
rule_note = //node[@content-desc="答案解析"]/following-sibling::node[2]/@content-desc
; 按钮坐标 [<]左上角返回按钮、[确定、下一题、完成]右上角提交按钮、答题报告中返回按钮、答题报告中再来一组按钮
rule_back = //node[@class="android.widget.Button"]/../preceding-sibling::node[1]/@bounds
rule_submit = //node[@class="android.widget.Button"]/@bounds
rule_return = //node[@content-desc="返回"]/@bounds
rule_next = //node[@content-desc="再来一组"]/@bounds
; ==============================================================================================================
; 挑战答题xpath规则
; 题型:挑战题
; 题干
rule_challenge_content = //node[@class="android.widget.ListView"]/preceding-sibling::node[1]/@content-desc
; 选项内容
rule_challenge_options_content = //node[@class="android.widget.ListView"]/node//node[@index="1" and @class="android.view.View"]/@content-desc
; 选项坐标
rule_challenge_options_bounds = //node[@class="android.widget.ListView"]/node/@bounds
; 复活按钮和再来一局按钮坐标
rule_judge_bounds = //node[@content-desc="分享就能复活" or @content-desc="再来一局"]/@bounds
rule_revive_bounds = //node[@content-desc="分享就能复活"]/@bounds
rule_again_bounds = //node[@content-desc="再来一局"]/@bounds
; rule_close_bounds = //node[@content-desc="结束本局"]/bounds
; ==============================================================================================================
; 视听学习xpath规则
; 百灵第一个视频
rule_first_video = //node[@class="android.widget.ListView"]/node[1]/@bounds
; 阅读文章xpath规则
rule_columns_content = //node[@class="android.view.ViewGroup"]/node[@class="android.widget.LinearLayout"]/node[@class="android.widget.TextView"]/@text
rule_columns_bounds = //node[@class="android.view.ViewGroup"]/node[@class="android.widget.LinearLayout"]/@bounds
rule_fixed_top_bounds = ////node[@class="android.widget.ListView"]/node[1]/@bounds
rule_fixed_bottom_bounds = ////node[@class="android.widget.ListView"]/node[last()]/@bounds
rule_news_bounds = //node[@class="android.widget.ListView"]//node[@resource-id="cn.xuexi.android:id/general_card_title_id"]/@bounds
rule_news_content = //node[@class="android.widget.ListView"]//node[@resource-id="cn.xuexi.android:id/general_card_title_id"]/@text
rule_news3pic_bounds = ////node[@class="android.widget.ListView"]/node/node[@class="android.widget.LinearLayout" and @index="0"]/node[@class="android.widget.TextView"]/@bounds
rule_news3pic_content = ////node[@class="android.widget.ListView"]/node/node[@class="android.widget.LinearLayout" and @index="0"]/node[@class="android.widget.TextView"]/@text
rule_star_bounds = //node[@text="欢迎发表你的观点"]/../node[3]/@bounds
rule_share_bounds = //node[@text="欢迎发表你的观点"]/../node[4]/@bounds
rule_comment_bounds = //node[@text="欢迎发表你的观点"]/@bounds
rule_share2xuexi_bounds = //node[@text="分享到学习强国"]/@bounds
rule_publish_bounds = //node[@text="发布"]/@bounds
; 夜神模拟器
[nox]
; 设备类型是否为模拟器 true | false
is_virtual_machine = true
xml_uri = ./xuexi/src/xml/uinox.xml
host = 127.0.0.1
port = 62001
; rule前缀为xpath规则,pos前缀为坐标的复数形式
; ======================================兄弟节点、父节点示例======================================================
; 获取第三个node标签的下一个node标签:"//node[@id='3']/following-sibling::node[1]"
; 获取第三个node标签后面的第N个标签:"//node[@id='3']/following-sibling::*[N]"
; 获取第三个node标签的上一个node标签:"//node[@id='3']/preceding-sibling::node[1]"
; 获取第三个node标签的前面的第N个标签:"//node[@id='3']/preceding-sibling::*[N]"
; 获取第三个node标签的父标签:"//node[@id=='3']/.."
; ==============================================================================================================
; 首页Bottom栏xpath规则
; 强国通 | 百灵 | 学习 | 视听 | 我的
rule_bottom_message = //node[@resource-id="cn.xuexi.android:id/home_bottom_tab_button_message"]/@bounds
rule_bottom_ding = //node[@resource-id="cn.xuexi.android:id/home_bottom_tab_button_ding"]/@bounds
rule_bottom_work = //node[@resource-id="cn.xuexi.android:id/home_bottom_tab_button_work"]/@bounds
rule_bottom_contact = //node[@resource-id="cn.xuexi.android:id/home_bottom_tab_button_contact"]/@bounds
rule_bottom_mine = //node[@resource-id="cn.xuexi.android:id/home_bottom_tab_button_mine"]/@bounds
; 我要答题xpath规则
; 我要答题入口,[我要答题]按钮
rule_quiz_entry = //node[@text="我要答题"]/@bounds
; 我要答题出口:[<]左上角后退按钮 我要答题父节点的第一个子节点,答题记录的前一个兄弟节点
rule_quiz_exit = //node[@text="答题记录"]/preceding-sibling::node[1]/@bounds
; 每日答题入口 [每日答题]按钮
rule_daily_entry = //node[@text="每日答题"]/@bounds
; 挑战答题入口 [挑战答题]按钮
rule_challenge_entry = //node[@text="挑战答题"]/@bounds
; ---------------------------------------------------------------------------------------------------------------
; 每日答题xpath规则
; 题型:填空题、单选题、多选题
rule_type = //node[@text="1 /5" or @text="2 /5" or @text="3 /5" or @text="4 /5" or @text="5 /5"]/preceding-sibling::node[1]/@text
; 题干
rule_content = //node[@class="android.widget.ListView"]/preceding-sibling::node[1]/@text
rule_blank_content = //node[@text="1 /5" or @text="2 /5" or @text="3 /5" or @text="4 /5" or @text="5 /5"]/../following-sibling::node[1]/node[@class="android.view.View"]/@text
; 选项坐标
rule_options = //node[@class="android.widget.ListView"]/node/@bounds
; 填空题输入框坐标
rule_edits = //node[@class="android.widget.EditText"]/following-sibling::node[1]/@bounds
; 分数
rule_score = //node[@text="积分: "]/following-sibling::node[1]/@text
rule_score_reached = //node[@text="领取奖励已达今日上限"]/@text
; 正确答案, node[答案解析]的下一个标签
rule_desc = //node[@text="答案解析"]/../../following-sibling::node[1]/@text
rule_note = //node[@text="答案解析"]/../../following-sibling::node[2]/@text
; 按钮坐标 [<]左上角返回按钮、[确定、下一题、完成]右上角提交按钮、答题报告中返回按钮、答题报告中再来一组按钮
rule_back = //node[@class="android.widget.Button"]/../preceding-sibling::node[1]/@bounds
rule_submit = //node[@class="android.widget.Button"]/@bounds
rule_return = //node[@text="返回"]/@bounds
rule_next = //node[@text="再来一组"]/@bounds
; ==============================================================================================================
; 挑战答题xpath规则
; 题型:挑战题
; 题干
rule_challenge_content = //node[@class="android.widget.ListView"]/preceding-sibling::node[1]/@text
; 选项内容
rule_challenge_options_content = //node[@class="android.widget.ListView"]/node//node[@index="1" and @class="android.view.View"]/@text
; 选项坐标
rule_challenge_options_bounds = //node[@class="android.widget.ListView"]/node/@bounds
; 复活按钮和再来一局按钮坐标
rule_judge_bounds = //node[@text="分享就能复活" or @text="再来一局"]/@bounds
rule_revive_bounds = //node[@text="分享就能复活"]/@bounds
rule_again_bounds = //node[@text="再来一局"]/@bounds
; rule_close_bounds = //node[@text="结束本局"]/bounds
; ==============================================================================================================
; 视听学习xpath规则
; 百灵第一个视频
rule_first_video = //node[@class="android.widget.ListView"]/node[1]/@bounds
; 阅读文章xpath规则
rule_columns_content = //node[@class="android.view.View"]/node[@class="android.widget.LinearLayout"]/node[@class="android.widget.TextView"]/@text
rule_columns_bounds = //node[@class="android.view.View"]/node[@class="android.widget.LinearLayout"]/@bounds
rule_fixed_top_bounds = ////node[@class="android.widget.ListView"]/node[1]/@bounds
rule_fixed_bottom_bounds = ////node[@class="android.widget.ListView"]/node[last()]/@bounds
rule_news_bounds = //node[@class="android.widget.ListView"]//node[@resource-id="cn.xuexi.android:id/general_card_title_id"]/@bounds
rule_news_content = //node[@class="android.widget.ListView"]//node[@resource-id="cn.xuexi.android:id/general_card_title_id"]/@text
rule_news3pic_bounds = ////node[@class="android.widget.ListView"]/node/node[@class="android.widget.LinearLayout" and @index="0"]/node[@class="android.widget.TextView"]/@bounds
rule_news3pic_content = ////node[@class="android.widget.ListView"]/node/node[@class="android.widget.LinearLayout" and @index="0"]/node[@class="android.widget.TextView"]/@text
rule_star_bounds = //node[@text="欢迎发表你的观点"]/../node[3]/@bounds
rule_share_bounds = //node[@text="欢迎发表你的观点"]/../node[4]/@bounds
rule_comment_bounds = //node[@text="欢迎发表你的观点"]/@bounds
rule_share2xuexi_bounds = //node[@text="分享到学习强国"]/@bounds
rule_publish_bounds = //node[@text="发布"]/@bounds