-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathfilepathfix2.py
More file actions
24 lines (21 loc) · 929 Bytes
/
filepathfix2.py
File metadata and controls
24 lines (21 loc) · 929 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
badGuy1 = ":
for file in files:
if file.endswith(".md"):
myfile = os.path.join(subdir, file)
with open(myfile, "r") as f:
lines = f.readlines()
with open(myfile, "w") as f:
for line in lines:
if (badGuy1 in line):
f.write(line.replace(badGuy1, ")
elif (badGuy2 in line):
f.write(line.replace(badGuy2, ""))
else:
f.write(line)
continue
else:
continue