-
-
Notifications
You must be signed in to change notification settings - Fork 226
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added preprocessor defines to HTML (from platform.ini) to reduce the HTML in size if modules aren't enabled * auto build minimal English versions of ESP8266 and ESP32
- Loading branch information
Showing
8 changed files
with
237 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import re | ||
import os | ||
import queue | ||
|
||
def error(msg): | ||
print("ERROR: " + msg) | ||
exit() | ||
|
||
def check(inp, lst, pattern): | ||
q = queue.LifoQueue() | ||
out = [] | ||
keep = True | ||
for line in inp: | ||
x = re.findall(pattern, line) | ||
if len(x) > 0: | ||
if line.find("ENDIF_") != -1: | ||
if q.empty(): | ||
error("missing open statement!") | ||
if q.get() != x[0]: | ||
error("wrong close statement!") | ||
keep = True | ||
elif line.find("IF_") != -1: | ||
q.put(x[0]) | ||
if keep is True: | ||
keep = x[0] in lst | ||
elif line.find("E") != -1: | ||
if q.empty(): | ||
error("missing open statement!") | ||
keep = not keep | ||
else: | ||
if keep is True: | ||
out.append(line) | ||
|
||
return out | ||
|
||
def conv(inp, lst): | ||
print(lst) | ||
out = check(inp, lst, r'\/\*(?:IF_|ELS|ENDIF_)([A-Z0-9\-_]+)?\*\/') | ||
return check(out, lst, r'\<\!\-\-(?:IF_|ELS|ENDIF_)([A-Z0-9\-_]+)?\-\-\>') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.