25 lines
1.6 KiB
Python
25 lines
1.6 KiB
Python
# -*- 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")
|