forked from deetch/goggles-experiment
-
Notifications
You must be signed in to change notification settings - Fork 0
/
parse_dict.py
93 lines (88 loc) · 2.16 KB
/
parse_dict.py
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
Coords = {
1: {"label": "x", "isValue": True},
2: {"label": "width", "isValue": True},
3: {"label": "y", "isValue": True},
4: {"label": "height", "isValue": True}
}
Info = {
15690847: {
"label": "UIStuff",
"isValue": False,
"contents": {
1: {
"label": "Coords",
"isValue": False,
"contents": Coords
},
2: {
"label": "some int",
"isValue": True
},
3: {
"label": "image for result type",
"isValue": False,
"contents": {
1: {"label": "image to show", "isValue": True},
2: {"label": "url (list?)", "isValue": True, "contents": {}},
3: {"label": "site where the image originates", "isValue": True}
}
},
6: {
"label": "language",
"isValue": True
}
}
},
15693652: {
"label": "Search query for request",
"isValue": False,
"contents": {
2: {"label": "url", "isValue": True}
}
},
16045192: {
"label": "direct result",
"isValue": False,
"contents": {
1: {"label": "result string", "isValue": True},
3: {"label": "result description", "isValue": True}
}
}
}
ReplyItem = {
1: {
"label": "Info",
"isValue": False,
"contents": Info
}
}
AlternativeInfo = {
1: {
"label": "Alternative Info",
"isValue": False,
"contents": Info
},
2: {
"label": "some 64bit value",
"isValue": True,
}
}
parse_dict = {
1: {
"label": "Reply",
"isValue": False,
"contents": {
1: {
"label": "ReplyItem",
"isValue": False,
#"contents": ReplyItem
"contents": Info
},
15705729: {
"label": "unknown",
"isValue": False,
"contents": AlternativeInfo
}
}
}
}