-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathauto.py
More file actions
33 lines (26 loc) · 729 Bytes
/
auto.py
File metadata and controls
33 lines (26 loc) · 729 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
25
26
27
28
29
30
31
32
33
# opening the file in read mode
file = open("modern-dark.user.css", "r")
replacement = ""
# using the for loop
for line in file:
line = line.strip()
changes = line.replace('Alpha(DEV BRANCH)', '')
replacement = replacement + changes + '\n'
file.close()
# opening the file in write mode
fout = open("modern-dark.user.css", "w")
fout.write(replacement)
fout.close()
# opening the file in read mode
file = open("modern-dark.user.css", "r")
branch = ""
for line in file:
line = line.strip()
change_branch = line.replace(
'dev', 'main')
branch = branch + change_branch + '\n'
file.close()
# opening the file in write mode
fout = open("modern-dark.user.css", "w")
fout.write(branch)
fout.close()