-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from CSecIITB/team
scss build scripts
- Loading branch information
Showing
2 changed files
with
31 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 . |
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,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, "<!--") | ||
end = [x + 2 for x in findall(data, "-->")] | ||
|
||
print("<!-- https://homepages.iitb.ac.in/~22b0967/ -->", 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="") | ||
|
||
|