diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..89c45c2 --- /dev/null +++ b/build.sh @@ -0,0 +1,6 @@ +cp -f full_site/index.html public_html/index.html +sass full_site/assets/sass/main.scss public_html/assets/css/main.css +cp -Rf full_site/images public_html +cp -Rf full_site/assets/js public_html/assets +python3 commentremover.py > public_html/index.html +open . diff --git a/commentremover.py b/commentremover.py new file mode 100644 index 0000000..2f6ef98 --- /dev/null +++ b/commentremover.py @@ -0,0 +1,25 @@ +data = open("full_site/index.html").read() + +def findall(data, s): + ar = [] + for i in range(len(data) - len(s) + 1): + if data[i:i+len(s)] == s: + ar.append(i) + return ar + +start = findall(data, "")] + +print("", end="") + +to_write = 1 +for i in range(len(data)): + flag = 1 + if i in start or i in end: + to_write = 1 - to_write + flag = 0 + + if to_write and flag: + print(data[i], end="") + +