We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 67a3518 commit 656632cCopy full SHA for 656632c
build.py
@@ -1,6 +1,14 @@
1
import os
2
import shutil
3
4
+from html.parser import HTMLParser
5
+
6
7
+class _HTMLParser(HTMLParser):
8
+ def handle_starttag(self, tag, attrs):
9
+ print("HTML Tag:", tag, attrs, sep="\n ")
10
11
12
for dir, subdirs, files in os.walk("./www"):
13
if (not subdirs and not files) or (
14
all([file.startswith(".") for file in files])
@@ -13,3 +21,12 @@
21
if file.startswith(".") or file.endswith(".ts"):
22
os.remove(os.path.join(dir, file))
15
23
continue
24
25
+ if file.endswith(".html"):
26
+ try:
27
+ p = _HTMLParser()
28
+ p.feed(open(os.path.join(dir, file), "rb").read().decode())
29
+ p.close()
30
+ print(os.path.join(dir, file), "SUCCESS")
31
+ except Exception as e:
32
+ print(os.path.join(dir, file), e)
0 commit comments