Fork of the espurna firmware for `mhsw` switches
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

18 lines
435 B

#!/bin/python
import binascii
import string
source = 'espurna/data/index.html.gz'
destination = 'espurna/config/data.h'
with open(source, 'rb') as f:
content = f.read()
array = map(lambda x: '0x%02x' % ord(x), content)
with open(destination, 'w') as f:
f.write("#define index_html_gz_len %d\n" % len(array))
f.write("const uint8_t index_html_gz[] PROGMEM = {")
f.write(string.join(array, ','))
f.write("};\n")