-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathauto_dev.py
More file actions
33 lines (26 loc) · 772 Bytes
/
auto_dev.py
File metadata and controls
33 lines (26 loc) · 772 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('YouTube - Modern Dark', 'YouTube - Modern Dark 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(
'main', 'dev')
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()