feat: ダンジョン「沈没寺院 スカラ」完全攻略ページの追加と一覧リンク更新
This commit is contained in:
1 parent
c04fcf862d
commit
8c1f9e70b3
3 files changed
+261
-1
No files matched your search
@@ -0,0 +1,43 @@
|
||||
import sys
|
||||
|
||||
def main():
|
||||
with open('dungeons/index.html', 'r', encoding='utf-8-sig') as f:
|
||||
content = f.read()
|
||||
|
||||
target = """ <tr>
|
||||
<td><strong>沈没寺院 スカラ</strong></td>
|
||||
<td>Lv70 (IL300〜)</td>
|
||||
<td><strong>対応</strong></td>
|
||||
<td>湖底の沈没都市。スライム爆破、スカラ装備(大人気ミラプリ)。</td>
|
||||
<td>準備中</td>
|
||||
</tr>"""
|
||||
|
||||
replacement = """ <tr>
|
||||
<td><strong>沈没寺院 スカラ</strong></td>
|
||||
<td>Lv70 (IL300〜)</td>
|
||||
<td><strong>対応</strong></td>
|
||||
<td>湖底の沈没都市。スライム爆破、スカラ装備(大人気ミラプリ)。</td>
|
||||
<td><a href="drowned_city_of_skalla.html">攻略を見る ➜</a></td>
|
||||
</tr>"""
|
||||
|
||||
if target not in content:
|
||||
print("エラー: ターゲット文字列が見つかりません")
|
||||
sys.exit(1)
|
||||
|
||||
content = content.replace(target, replacement)
|
||||
lines = [line.rstrip() for line in content.splitlines()]
|
||||
content_clean = '\r\n'.join(lines) + '\r\n'
|
||||
with open('dungeons/index.html', 'wb') as f:
|
||||
f.write(b'\xef\xbb\xbf' + content_clean.encode('utf-8'))
|
||||
|
||||
with open('dungeons/drowned_city_of_skalla.html', 'r', encoding='utf-8-sig') as f:
|
||||
ska = f.read()
|
||||
ska_lines = [line.rstrip() for line in ska.splitlines()]
|
||||
ska_clean = '\r\n'.join(ska_lines) + '\r\n'
|
||||
with open('dungeons/drowned_city_of_skalla.html', 'wb') as f:
|
||||
f.write(b'\xef\xbb\xbf' + ska_clean.encode('utf-8'))
|
||||
|
||||
print("沈没寺院 スカラのリンク更新および正規化が完了しました。")
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
Reference in new issue
Block a user