Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c99cdb0661 | ||
|
|
6759048fd1 | ||
|
|
d5fc9fc4f7 | ||
|
|
32b4e83ba1 | ||
|
|
63e4595641 | ||
|
|
ca1d2ea1da | ||
|
|
d9ba1462ef | ||
|
|
1de6c2c6a3 | ||
|
|
d0226d053f | ||
|
|
03e84a8b23 | ||
|
|
5335e1dcc4 | ||
|
|
5a0a029207 | ||
|
|
1b356661b6 | ||
|
|
5c59b69da3 | ||
|
|
f28e0ab19d | ||
|
|
be3710765d | ||
|
|
cdee1df3af | ||
|
|
0edc720de5 | ||
|
|
f8182631ab | ||
|
|
536e15d81c | ||
|
|
68afc28196 | ||
|
|
45b556a3e0 | ||
|
|
ccbe65500e | ||
|
|
2c1fce0f55 | ||
|
|
391b8f8067 | ||
|
|
9798699921 | ||
|
|
5a4bc28820 | ||
|
|
638d9647cf | ||
|
|
b0a56abad9 | ||
|
|
5341830b8a | ||
|
|
1d66e6197d | ||
|
|
a99267cab6 | ||
|
|
73e7810d75 | ||
|
|
3d6b0424ff | ||
|
|
ec642ac9dd | ||
|
|
79c0c02609 | ||
|
|
85f119a053 | ||
|
|
fad68028b1 | ||
|
|
9cc3d93cf5 | ||
|
|
936875a007 | ||
|
|
1101406850 | ||
|
|
25e5dfe73b | ||
|
|
2d6cd8772c | ||
|
|
a532ff53cf | ||
|
|
709394f9fc | ||
|
|
541f350c80 | ||
|
|
2adbf25da3 | ||
|
|
048abac75e | ||
|
|
ae237fa1d7 | ||
|
|
65316ebd99 | ||
|
|
e3c80c1fb9 | ||
|
|
f3502d5f85 | ||
|
|
4b20f58984 | ||
|
|
af6e83f447 | ||
|
|
461fa347f6 | ||
|
|
833c37696b | ||
|
|
2dec6c8e3c | ||
|
|
bc5a5c6013 | ||
|
|
1871777a11 | ||
|
|
dbfe0f5bfa | ||
|
|
7057c5855d | ||
|
|
66d8d37e5b | ||
|
|
f4723b47c0 | ||
|
|
112ed56432 | ||
|
|
b7ffa7ba17 | ||
|
|
3b8dd0aa4f | ||
|
|
0d7826b665 | ||
|
|
ccc3d91a0d | ||
|
|
7d30ee00d7 | ||
|
|
43c3b360f6 | ||
|
|
d7aee70269 | ||
|
|
b880fd399b | ||
|
|
7878d12582 | ||
|
|
95f67e6858 | ||
|
|
ce9f236f17 | ||
|
|
a9577558c9 | ||
|
|
ed31b396b3 | ||
|
|
ed86c87573 | ||
|
|
ea76ff48d1 | ||
|
|
715ff37ae7 | ||
|
|
384a47c50b | ||
|
|
5e60731b51 | ||
|
|
3d1c2dbb2f | ||
|
|
e8d7b68abc | ||
|
|
e5f6e88fa4 | ||
|
|
c61d1dd59b | ||
|
|
93fa365f0b | ||
|
|
b37f832562 | ||
|
|
ccbe54d67d | ||
|
|
626947bc66 | ||
|
|
fbbe7f2c06 | ||
|
|
1d068b0628 | ||
|
|
c7f13c8a73 | ||
|
|
35393dcf53 | ||
|
|
edd9aeb063 | ||
|
|
fdb2e49933 | ||
|
|
975791994e | ||
|
|
8e1a330158 | ||
|
|
93edc790a7 | ||
|
|
f362bf1e21 | ||
|
|
6db1a71c27 | ||
|
|
4027dd855c | ||
|
|
e57d2c4555 | ||
|
|
256dac16cb | ||
|
|
3fd6159f52 | ||
|
|
e7b6e70b6f | ||
|
|
eb32faef47 | ||
|
|
11adb1be2b | ||
|
|
e196c6d8e0 | ||
|
|
b20025670b |
No files matched your search
@@ -1 +0,0 @@
|
||||
Prettier Fixer.py
|
||||
@@ -0,0 +1,83 @@
|
||||
# 导入os模块,用于操作文件和目录
|
||||
import os
|
||||
from time import sleep
|
||||
# 定义一个函数,接受一个文件名作为参数,返回修改后的内容
|
||||
|
||||
def modify_file(filename):
|
||||
# 打开文件,以只读模式
|
||||
with open(filename, 'r', encoding='UTF-8') as f:
|
||||
# 读取文件的所有行,存入一个列表
|
||||
lines = f.readlines()
|
||||
# 创建一个空列表,用于存储修改后的行
|
||||
new_lines = []
|
||||
num = 0
|
||||
# 遍历每一行
|
||||
for line in lines:
|
||||
if '"step 0";' in line:
|
||||
line = line.replace('"step 0";', '"step 0"')
|
||||
num+=1
|
||||
if '("step 1");' in line:
|
||||
line = line.replace('("step 1");', '"step 1"')
|
||||
num+=1
|
||||
if '("step 2");' in line:
|
||||
line = line.replace('("step 2");', '"step 2"')
|
||||
num+=1
|
||||
if '("step 3");' in line:
|
||||
line = line.replace('("step 3");', '"step 3"')
|
||||
num+=1
|
||||
if '("step 4");' in line:
|
||||
line = line.replace('("step 4");', '"step 4"')
|
||||
num+=1
|
||||
if '("step 5");' in line:
|
||||
line = line.replace('("step 5");', '"step 5"')
|
||||
num+=1
|
||||
if '("step 6");' in line:
|
||||
line = line.replace('("step 6");', '"step 6"')
|
||||
num+=1
|
||||
if '("step 7");' in line:
|
||||
line = line.replace('("step 7");', '"step 7"')
|
||||
num+=1
|
||||
if '("step 8");' in line:
|
||||
line = line.replace('("step 8");', '"step 8"')
|
||||
num+=1
|
||||
if '("step 9");' in line:
|
||||
line = line.replace('("step 9");', '"step 9"')
|
||||
num+=1
|
||||
if '("step 10");' in line:
|
||||
line = line.replace('("step 10");', '"step 10"')
|
||||
num+=1
|
||||
print(line)
|
||||
# 将修改后的行添加到新列表中
|
||||
new_lines.append(line)
|
||||
# 返回新列表中的所有行,用换行符连接
|
||||
print("Successfully fixed " + str(num) +" code errors")
|
||||
return ''.join(new_lines)
|
||||
|
||||
# 获取当前目录下的所有文件和子目录
|
||||
flag = False
|
||||
files = os.listdir('.')
|
||||
# 遍历每一个文件或子目录
|
||||
for file in files:
|
||||
# 如果是文件,并且文件名是extension.js
|
||||
if os.path.isfile(file) and file == 'extension.js':
|
||||
# 调用函数,传入文件名,得到修改后的内容
|
||||
content = modify_file(file)
|
||||
# 打开文件,以写入模式,覆盖原内容
|
||||
with open(file, 'w', encoding='UTF-8') as f:
|
||||
# 写入修改后的内容
|
||||
f.write(content)
|
||||
flag = True
|
||||
if os.path.isfile(file) and file == 'game.js':
|
||||
# 调用函数,传入文件名,得到修改后的内容
|
||||
content = modify_file(file)
|
||||
# 打开文件,以写入模式,覆盖原内容
|
||||
with open(file, 'w', encoding='UTF-8') as f:
|
||||
# 写入修改后的内容
|
||||
f.write(content)
|
||||
flag = True
|
||||
|
||||
if flag:
|
||||
pass
|
||||
else:
|
||||
print('ERROR')
|
||||
sleep(3)
|
||||
|
Before Width: | Height: | Size: 352 KiB |
|
Before Width: | Height: | Size: 272 KiB |
|
Before Width: | Height: | Size: 297 KiB |
|
Before Width: | Height: | Size: 124 KiB |
|
Before Width: | Height: | Size: 756 KiB |
|
Before Width: | Height: | Size: 57 KiB |
|
After Width: | Height: | Size: 2.4 MiB |
|
After Width: | Height: | Size: 8.9 MiB |
|
After Width: | Height: | Size: 532 KiB |
|
After Width: | Height: | Size: 3.2 MiB |
|
After Width: | Height: | Size: 1.1 MiB |
|
After Width: | Height: | Size: 297 KiB |
|
After Width: | Height: | Size: 74 KiB |
|
After Width: | Height: | Size: 449 KiB |
|
After Width: | Height: | Size: 359 KiB |
|
After Width: | Height: | Size: 331 KiB |
|
After Width: | Height: | Size: 451 KiB |
|
After Width: | Height: | Size: 245 KiB |
|
After Width: | Height: | Size: 584 KiB |
|
After Width: | Height: | Size: 50 KiB |
|
After Width: | Height: | Size: 334 KiB |
|
After Width: | Height: | Size: 1.5 MiB |
|
After Width: | Height: | Size: 314 KiB |
|
After Width: | Height: | Size: 338 KiB |
|
After Width: | Height: | Size: 13 MiB |
|
After Width: | Height: | Size: 562 KiB |
|
After Width: | Height: | Size: 569 KiB |
|
After Width: | Height: | Size: 89 KiB |
|
After Width: | Height: | Size: 9.1 MiB |
|
After Width: | Height: | Size: 8.6 MiB |
|
After Width: | Height: | Size: 2.5 MiB |
|
After Width: | Height: | Size: 367 KiB |
|
After Width: | Height: | Size: 6.6 MiB |
|
After Width: | Height: | Size: 1.1 MiB |
|
After Width: | Height: | Size: 456 KiB |
|
After Width: | Height: | Size: 359 KiB |
|
After Width: | Height: | Size: 328 KiB |
|
After Width: | Height: | Size: 843 KiB |
|
After Width: | Height: | Size: 108 KiB |
|
After Width: | Height: | Size: 307 KiB |
|
After Width: | Height: | Size: 332 KiB |
|
After Width: | Height: | Size: 320 KiB |
|
After Width: | Height: | Size: 371 KiB |
|
After Width: | Height: | Size: 316 KiB |
|
After Width: | Height: | Size: 355 KiB |
|
After Width: | Height: | Size: 67 KiB |
|
After Width: | Height: | Size: 1.3 MiB |
|
After Width: | Height: | Size: 815 KiB |
|
After Width: | Height: | Size: 920 KiB |
|
After Width: | Height: | Size: 1.3 MiB |
|
After Width: | Height: | Size: 544 KiB |
|
After Width: | Height: | Size: 337 KiB |
|
After Width: | Height: | Size: 658 KiB |
|
After Width: | Height: | Size: 313 KiB |
|
After Width: | Height: | Size: 928 KiB |
|
After Width: | Height: | Size: 104 KiB |
|
After Width: | Height: | Size: 84 KiB |
|
After Width: | Height: | Size: 263 KiB |
|
After Width: | Height: | Size: 5.6 MiB |
|
After Width: | Height: | Size: 1.8 MiB |
|
After Width: | Height: | Size: 342 KiB |
|
After Width: | Height: | Size: 298 KiB |
|
After Width: | Height: | Size: 157 KiB |
|
After Width: | Height: | Size: 125 KiB |
|
After Width: | Height: | Size: 235 KiB |
|
After Width: | Height: | Size: 279 KiB |
|
After Width: | Height: | Size: 480 KiB |
|
After Width: | Height: | Size: 2.8 MiB |