chore: リンク更新用スクリプトツールのコミット

This commit is contained in:
armonica committed 2026-10-29 16:13:19 +09:00
1 parent cf35adc48d
commit a653dcb5a6
122 files changed
+5826

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
with open('dungeons/index.html', 'rb') as f:
text = f.read().decode('utf-8')
# ハラタリ修練所 (Hard) を準備中に戻す
text = text.replace(
'<td><strong>ハラタリ修練所 (Hard)</strong></td>\r\n <td>Lv50 (IL55〜)</td>\r\n <td>非対応</td>\r\n <td>剣闘士コロシアム、百裂拳、マンティコア。</td>\r\n <td><a href="halatali.html">攻略を見る ➜</a></td>',
'<td><strong>ハラタリ修練所 (Hard)</strong></td>\r\n <td>Lv50 (IL55〜)</td>\r\n <td>非対応</td>\r\n <td>剣闘士コロシアム、百裂拳、マンティコア。</td>\r\n <td>準備中</td>'
)
# LF環境のフォールバック
text = text.replace(
'<td><strong>ハラタリ修練所 (Hard)</strong></td>\n <td>Lv50 (IL55〜)</td>\n <td>非対応</td>\n <td>剣闘士コロシアム、百裂拳、マンティコア。</td>\n <td><a href="halatali.html">攻略を見る ➜</a></td>',
'<td><strong>ハラタリ修練所 (Hard)</strong></td>\n <td>Lv50 (IL55〜)</td>\n <td>非対応</td>\n <td>剣闘士コロシアム、百裂拳、マンティコア。</td>\n <td>準備中</td>'
)
# BOM付きUTF-8 + CRLFで保存
text = text.replace('\r\n', '\n').replace('\r', '\n')
lines = [l.rstrip() for l in text.split('\n')]
res = '\r\n'.join(lines) + '\r\n'
res = res.lstrip('\ufeff')
with open('dungeons/index.html', 'wb') as f:
f.write(b'\xef\xbb\xbf' + res.encode('utf-8'))
print("Fixed Hard link")