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.
 
 
 
 
 
 

31 lines
704 B

#!/usr/bin/python
content = ''
content2 = ''
with open('html/website.html', 'r') as r:
data = r.read().replace('\n', '\\\n')
data = data.replace('\"', '\\"')
content += data
with open('src/websiteMgmt.h', 'w') as w:
w.write("static const char mgtWebsite[] PROGMEM = \"")
w.write(content)
w.write("\";")
with open('html/websiteBasic.html', 'r') as r2:
data = r2.read().replace('\n', '\\\n')
data = data.replace('\"', '\\"')
content2 += data
with open('src/websiteBasic.h', 'w') as w2:
w2.write("static const char basicWebsite[] PROGMEM = \"")
w2.write(content2)
w2.write("\";")
r.close()
w.close()
r2.close()
w2.close()