feat: ダンジョン「腐敗遺跡 古アムダプール市街」完全攻略ページの追加と一覧リンク更新

This commit is contained in:
armonica committed 2026-10-29 15:58:37 +09:00
1 parent 60a810bbad
commit c266b5d803
3 files changed
+264 -1

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
# -*- coding: utf-8 -*-
import sys
from normalize_util import normalize_file
with open('dungeons/index.html', 'r', encoding='utf-8') as f:
lines = f.readlines()
found = False
for i in range(len(lines)):
if '古アムダプール市街' in lines[i] and 'Hard' not in lines[i]:
for k in range(i, min(len(lines), i+6)):
if '準備中' in lines[k]:
lines[k] = lines[k].replace('準備中', '<a href="lost_city_of_amdapor.html">攻略を見る ➜</a>')
found = True
break
if found:
break
if found:
with open('dungeons/index.html', 'w', encoding='utf-8') as f:
f.writelines(lines)
normalize_file('dungeons/lost_city_of_amdapor.html')
normalize_file('dungeons/index.html')
print("更新成功")
else:
print("古アムダプール市街が見つかりません")
sys.exit(1)