We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4cc863f commit fe00c08Copy full SHA for fe00c08
2 files changed
tools/file2json.py
@@ -22,5 +22,9 @@
22
if len(sdata) > 0:
23
lined += ['\n']
24
json = '[' + ''.join(lined) + ']'
25
-print json
+
26
+if len(sys.argv) < 3:
27
+ print json
28
+else:
29
+ print 'var ' + sys.argv[2] + '=' + json + ';'
30
tools/make_file.py
@@ -7,8 +7,9 @@
7
import os, sys, re
8
9
data = open(sys.argv[1], 'r').read()
10
-m = re.search('\[[\d, ]*\]', data)
+m = re.search('\[[\d, -]*\]', data)
11
data = eval(m.group(0))
12
+data = [x&0xff for x in data]
13
string = ''.join([chr(item) for item in data])
14
out = open(sys.argv[1]+'.raw', 'wb')
15
print data[0:80]
0 commit comments