forked from melkogroup/GroupWebsite
-
Notifications
You must be signed in to change notification settings - Fork 2
/
replace.py
14 lines (12 loc) · 1 KB
/
replace.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import os
import fileinput
for root, dirs, files in os.walk('.'):
#for line in fileinput.FileInput("Lauren.html",inplace=1):
#for line in fileinput.input( (os.path.join(root,name) for name in files), inplace=True, backup='_bak'):
for line in fileinput.input( (os.path.join(root,name) for name in files), inplace=True):
#line = line.replace("Code We've Built","Code We've Built")
#line = line.replace("Awkward Group Photos","Awkward Group Photos")
#line = line.replace("Computational quantum many-body research","Computational quantum many-body research")
#line = line.replace('<li><a href="https://www.dropbox.com/sh/kex0ui4f78ypzxd/PN641UnjIv">Online Material</a></li>','<li><a href="https://www.dropbox.com/sh/kex0ui4f78ypzxd/PN641UnjIv">Online Material</a></li>')
line = line.replace('<!-- <li><a href="Gallery/Gallery.html">Awkward Group Photos</a></li> -->','<!-- <!-- <li><a href="Gallery/Gallery.html">Awkward Group Photos</a></li> --> -->')
print line,