-
Notifications
You must be signed in to change notification settings - Fork 7
/
shift-multi.py
144 lines (140 loc) · 7.44 KB
/
shift-multi.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
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
import sys
import xml.etree.ElementTree as ET
data = ET.parse(sys.argv[1]).getroot()
overrides = {
"silhouette.ML": { "width": "400", "lsb": "0" },
"silhouette.MR": { "width": "400", "lsb": "-400" },
"silhouette.WL": { "width": "400", "lsb": "0" },
"silhouette.WR": { "width": "400", "lsb": "-400" },
"silhouette.u1F468.u1F48B.L": { "width": "400", "lsb": "0" },
"silhouette.u1F468.u1F48B.R": { "width": "400", "lsb": "-400" },
"silhouette.u1F468.u2764.L": { "width": "400", "lsb": "0" },
"silhouette.u1F468.u2764.R": { "width": "400", "lsb": "-400" },
"silhouette.u1F469.u1F48B.L": { "width": "400", "lsb": "0" },
"silhouette.u1F469.u1F48B.R": { "width": "400", "lsb": "-400" },
"silhouette.u1F469.u2764.L": { "width": "400", "lsb": "0" },
"silhouette.u1F469.u2764.R": { "width": "400", "lsb": "-400" },
"silhouette.u1F9D1.u1F48B.L": { "width": "400", "lsb": "0" },
"silhouette.u1F9D1.u1F48B.R": { "width": "400", "lsb": "-400" },
"silhouette.u1F9D1.u2764.L": { "width": "400", "lsb": "0" },
"silhouette.u1F9D1.u2764.R": { "width": "400", "lsb": "-400" },
"u1F468.0.u1F48B.L": { "width": "400", "lsb": "0" },
"u1F468.0.u1F48B.R": { "width": "400", "lsb": "-400" },
"u1F468.0.u2764.L": { "width": "400", "lsb": "0" },
"u1F468.0.u2764.R": { "width": "400", "lsb": "-400" },
"u1F468.1.L": { "width": "400", "lsb": "0" },
"u1F468.1.R": { "width": "400", "lsb": "-400" },
"u1F468.1.RA": { "width": "400", "lsb": "-400" },
"u1F468.1.u1F48B.L": { "width": "400", "lsb": "0" },
"u1F468.1.u1F48B.R": { "width": "400", "lsb": "-400" },
"u1F468.1.u2764.L": { "width": "400", "lsb": "0" },
"u1F468.1.u2764.R": { "width": "400", "lsb": "-400" },
"u1F468.2.L": { "width": "400", "lsb": "0" },
"u1F468.2.R": { "width": "400", "lsb": "-400" },
"u1F468.2.RA": { "width": "400", "lsb": "-400" },
"u1F468.2.u1F48B.L": { "width": "400", "lsb": "0" },
"u1F468.2.u1F48B.R": { "width": "400", "lsb": "-400" },
"u1F468.2.u2764.L": { "width": "400", "lsb": "0" },
"u1F468.2.u2764.R": { "width": "400", "lsb": "-400" },
"u1F468.3.L": { "width": "400", "lsb": "0" },
"u1F468.3.R": { "width": "400", "lsb": "-400" },
"u1F468.3.RA": { "width": "400", "lsb": "-400" },
"u1F468.3.u1F48B.L": { "width": "400", "lsb": "0" },
"u1F468.3.u1F48B.R": { "width": "400", "lsb": "-400" },
"u1F468.3.u2764.L": { "width": "400", "lsb": "0" },
"u1F468.3.u2764.R": { "width": "400", "lsb": "-400" },
"u1F468.4.L": { "width": "400", "lsb": "0" },
"u1F468.4.R": { "width": "400", "lsb": "-400" },
"u1F468.4.RA": { "width": "400", "lsb": "-400" },
"u1F468.4.u1F48B.L": { "width": "400", "lsb": "0" },
"u1F468.4.u1F48B.R": { "width": "400", "lsb": "-400" },
"u1F468.4.u2764.L": { "width": "400", "lsb": "0" },
"u1F468.4.u2764.R": { "width": "400", "lsb": "-400" },
"u1F468.5.L": { "width": "400", "lsb": "0" },
"u1F468.5.R": { "width": "400", "lsb": "-400" },
"u1F468.5.RA": { "width": "400", "lsb": "-400" },
"u1F468.5.u1F48B.L": { "width": "400", "lsb": "0" },
"u1F468.5.u1F48B.R": { "width": "400", "lsb": "-400" },
"u1F468.5.u2764.L": { "width": "400", "lsb": "0" },
"u1F468.5.u2764.R": { "width": "400", "lsb": "-400" },
"u1F469.0.u1F48B.L": { "width": "400", "lsb": "0" },
"u1F469.0.u1F48B.R": { "width": "400", "lsb": "-400" },
"u1F469.0.u2764.L": { "width": "400", "lsb": "0" },
"u1F469.0.u2764.R": { "width": "400", "lsb": "-400" },
"u1F469.1.L": { "width": "400", "lsb": "0" },
"u1F469.1.R": { "width": "400", "lsb": "-400" },
"u1F469.1.u1F48B.L": { "width": "400", "lsb": "0" },
"u1F469.1.u1F48B.R": { "width": "400", "lsb": "-400" },
"u1F469.1.u2764.L": { "width": "400", "lsb": "0" },
"u1F469.1.u2764.R": { "width": "400", "lsb": "-400" },
"u1F469.2.L": { "width": "400", "lsb": "0" },
"u1F469.2.R": { "width": "400", "lsb": "-400" },
"u1F469.2.u1F48B.L": { "width": "400", "lsb": "0" },
"u1F469.2.u1F48B.R": { "width": "400", "lsb": "-400" },
"u1F469.2.u2764.L": { "width": "400", "lsb": "0" },
"u1F469.2.u2764.R": { "width": "400", "lsb": "-400" },
"u1F469.3.L": { "width": "400", "lsb": "0" },
"u1F469.3.R": { "width": "400", "lsb": "-400" },
"u1F469.3.u1F48B.L": { "width": "400", "lsb": "0" },
"u1F469.3.u1F48B.R": { "width": "400", "lsb": "-400" },
"u1F469.3.u2764.L": { "width": "400", "lsb": "0" },
"u1F469.3.u2764.R": { "width": "400", "lsb": "-400" },
"u1F469.4.L": { "width": "400", "lsb": "0" },
"u1F469.4.R": { "width": "400", "lsb": "-400" },
"u1F469.4.u1F48B.L": { "width": "400", "lsb": "0" },
"u1F469.4.u1F48B.R": { "width": "400", "lsb": "-400" },
"u1F469.4.u2764.L": { "width": "400", "lsb": "0" },
"u1F469.4.u2764.R": { "width": "400", "lsb": "-400" },
"u1F469.5.L": { "width": "400", "lsb": "0" },
"u1F469.5.R": { "width": "400", "lsb": "-400" },
"u1F469.5.u1F48B.L": { "width": "400", "lsb": "0" },
"u1F469.5.u1F48B.R": { "width": "400", "lsb": "-400" },
"u1F469.5.u2764.L": { "width": "400", "lsb": "0" },
"u1F469.5.u2764.R": { "width": "400", "lsb": "-400" },
"u1F9D1.0.u1F48B.L": { "width": "400", "lsb": "0" },
"u1F9D1.0.u1F48B.R": { "width": "400", "lsb": "-400" },
"u1F9D1.0.u2764.L": { "width": "400", "lsb": "0" },
"u1F9D1.0.u2764.R": { "width": "400", "lsb": "-400" },
"u1F9D1.1.u1F48B.L": { "width": "400", "lsb": "0" },
"u1F9D1.1.u1F48B.R": { "width": "400", "lsb": "-400" },
"u1F9D1.1.u2764.L": { "width": "400", "lsb": "0" },
"u1F9D1.1.u2764.R": { "width": "400", "lsb": "-400" },
"u1F9D1.2.u1F48B.L": { "width": "400", "lsb": "0" },
"u1F9D1.2.u1F48B.R": { "width": "400", "lsb": "-400" },
"u1F9D1.2.u2764.L": { "width": "400", "lsb": "0" },
"u1F9D1.2.u2764.R": { "width": "400", "lsb": "-400" },
"u1F9D1.3.u1F48B.L": { "width": "400", "lsb": "0" },
"u1F9D1.3.u1F48B.R": { "width": "400", "lsb": "-400" },
"u1F9D1.3.u2764.L": { "width": "400", "lsb": "0" },
"u1F9D1.3.u2764.R": { "width": "400", "lsb": "-400" },
"u1F9D1.4.u1F48B.L": { "width": "400", "lsb": "0" },
"u1F9D1.4.u1F48B.R": { "width": "400", "lsb": "-400" },
"u1F9D1.4.u2764.L": { "width": "400", "lsb": "0" },
"u1F9D1.4.u2764.R": { "width": "400", "lsb": "-400" },
"u1F9D1.5.u1F48B.L": { "width": "400", "lsb": "0" },
"u1F9D1.5.u1F48B.R": { "width": "400", "lsb": "-400" },
"u1F9D1.5.u2764.L": { "width": "400", "lsb": "0" },
"u1F9D1.5.u2764.R": { "width": "400", "lsb": "-400" },
"silhouette.u1FAF1.L": { "width": "400", "lsb": "0" },
"silhouette.u1FAF2.R": { "width": "400", "lsb": "-400" },
"u1FAF1.0.L": { "width": "400", "lsb": "0" },
"u1FAF1.1.L": { "width": "400", "lsb": "0" },
"u1FAF1.2.L": { "width": "400", "lsb": "0" },
"u1FAF1.3.L": { "width": "400", "lsb": "0" },
"u1FAF1.4.L": { "width": "400", "lsb": "0" },
"u1FAF1.5.L": { "width": "400", "lsb": "0" },
"u1FAF2.0.R": { "width": "400", "lsb": "-400" },
"u1FAF2.1.R": { "width": "400", "lsb": "-400" },
"u1FAF2.2.R": { "width": "400", "lsb": "-400" },
"u1FAF2.3.R": { "width": "400", "lsb": "-400" },
"u1FAF2.4.R": { "width": "400", "lsb": "-400" },
"u1FAF2.5.R": { "width": "400", "lsb": "-400" }
}
for mtx in data.iter('mtx'):
name = mtx.attrib['name']
if name in overrides:
override = overrides[name]
mtx.set('width', override['width'])
mtx.set('lsb', override['lsb'])
output = ET.ElementTree(data)
output.write(sys.argv[1], encoding='utf-8')