代码库初始化
This commit is contained in:
1 parent
07786ab323
commit
4334694551
851 files changed
+42626
No files matched your search
@@ -0,0 +1,31 @@
|
||||
import openpyxl, os
|
||||
|
||||
base = r"e:\MCStudioDownload\work\3027246179@qq.com\Cpp\AddOn\309c2d420bc84ee986db9cdd070ff02a"
|
||||
p = os.path.join(base, "幸存者军火库食物表.xlsx")
|
||||
|
||||
fixes = {
|
||||
"taco": "玉米卷",
|
||||
"taco_rotten": "腐烂的玉米卷",
|
||||
"coxinha": "巴西炸鸡肉饺",
|
||||
"rotten_coxinha": "腐烂的炸鸡肉饺",
|
||||
"coxinha_dough": "炸鸡肉饺生面团",
|
||||
"raw_coxinha": "生炸鸡肉饺",
|
||||
"pastel_dough": "炸饺面团",
|
||||
"raw_cheese_pastel": "生芝士炸饺",
|
||||
"raw_meat_pastel": "生肉馅炸饺",
|
||||
"raw_wind_pastel": "生空心炸饺",
|
||||
"meat_pastel": "肉馅炸饺",
|
||||
"wind_pastel": "空心炸饺",
|
||||
"pacoquita": "巴西花生糖",
|
||||
}
|
||||
|
||||
wb = openpyxl.load_workbook(p)
|
||||
ws = wb["全食物数据表"]
|
||||
changed = 0
|
||||
for r in range(3, ws.max_row + 1):
|
||||
item = ws.cell(row=r, column=2).value
|
||||
if item in fixes:
|
||||
ws.cell(row=r, column=3).value = fixes[item]
|
||||
changed += 1
|
||||
wb.save(p)
|
||||
print("changed", changed)
|
||||
Reference in new issue
Block a user