From a653dcb5a656f1bc0fe953cfd7b1f4d350d8b3ea Mon Sep 17 00:00:00 2001 From: uduki Date: Thu, 29 Oct 2026 16:13:19 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20=E3=83=AA=E3=83=B3=E3=82=AF=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E7=94=A8=E3=82=B9=E3=82=AF=E3=83=AA=E3=83=97=E3=83=88?= =?UTF-8?q?=E3=83=84=E3=83=BC=E3=83=AB=E3=81=AE=E3=82=B3=E3=83=9F=E3=83=83?= =?UTF-8?q?=E3=83=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/fix_hard.py | 24 ++++++++ tools/update_abyssos.py | 51 +++++++++++++++ tools/update_aetherfont.py | 43 +++++++++++++ tools/update_aglaia.py | 51 +++++++++++++++ tools/update_aitiascope.py | 51 +++++++++++++++ tools/update_akadaemia_anyder.py | 43 +++++++++++++ tools/update_ala_mhigo.py | 43 +++++++++++++ tools/update_alex_creator.py | 50 +++++++++++++++ tools/update_alex_gordias.py | 51 +++++++++++++++ tools/update_alex_midas.py | 50 +++++++++++++++ tools/update_alzadaals_legacy.py | 43 +++++++++++++ tools/update_amaurot.py | 51 +++++++++++++++ tools/update_anabaseios.py | 51 +++++++++++++++ tools/update_anamesis_anyder.py | 43 +++++++++++++ tools/update_asphodelos.py | 51 +++++++++++++++ tools/update_asura.py | 50 +++++++++++++++ tools/update_bahamut_binding.py | 50 +++++++++++++++ tools/update_bahamut_final.py | 50 +++++++++++++++ tools/update_bahamut_second.py | 50 +++++++++++++++ tools/update_barbariccia.py | 50 +++++++++++++++ tools/update_bardams_mettle.py | 43 +++++++++++++ tools/update_bismarck.py | 50 +++++++++++++++ tools/update_byakko.py | 50 +++++++++++++++ tools/update_castrum_abania.py | 43 +++++++++++++ tools/update_diamond_weapon.py | 50 +++++++++++++++ tools/update_dohn_mheg.py | 51 +++++++++++++++ tools/update_doma_castle.py | 43 +++++++++++++ tools/update_dying_gasp.py | 51 +++++++++++++++ tools/update_eden_gate.py | 51 +++++++++++++++ tools/update_eden_promise.py | 51 +++++++++++++++ tools/update_eden_verse.py | 51 +++++++++++++++ tools/update_emerald_weapon.py | 50 +++++++++++++++ tools/update_endsinger.py | 51 +++++++++++++++ tools/update_euphrosyne.py | 51 +++++++++++++++ tools/update_extreme_barbariccia.py | 50 +++++++++++++++ tools/update_extreme_diamond.py | 50 +++++++++++++++ tools/update_extreme_emerald.py | 50 +++++++++++++++ tools/update_extreme_endsinger.py | 51 +++++++++++++++ tools/update_extreme_golbez.py | 50 +++++++++++++++ tools/update_extreme_hades.py | 51 +++++++++++++++ tools/update_extreme_hydaelyn.py | 51 +++++++++++++++ tools/update_extreme_innocence.py | 50 +++++++++++++++ tools/update_extreme_lakshmi.py | 50 +++++++++++++++ tools/update_extreme_rubicante.py | 50 +++++++++++++++ tools/update_extreme_ruby_weapon.py | 50 +++++++++++++++ tools/update_extreme_shinryu.py | 50 +++++++++++++++ tools/update_extreme_susano.py | 50 +++++++++++++++ tools/update_extreme_titania.py | 50 +++++++++++++++ tools/update_extreme_tsukuyomi.py | 50 +++++++++++++++ tools/update_extreme_wol.py | 50 +++++++++++++++ tools/update_extreme_zeromus.py | 50 +++++++++++++++ tools/update_extreme_zodiark.py | 51 +++++++++++++++ tools/update_faux_byakko.py | 43 +++++++++++++ tools/update_gilgamesh.py | 43 +++++++++++++ tools/update_golbez.py | 50 +++++++++++++++ tools/update_good_king_moggle_mog.py | 43 +++++++++++++ tools/update_grand_cosmos.py | 43 +++++++++++++ tools/update_heroes_gauntlet.py | 43 +++++++++++++ tools/update_holminster.py | 51 +++++++++++++++ tools/update_innocence.py | 50 +++++++++++++++ tools/update_ktisis.py | 51 +++++++++++++++ tools/update_kugane_castle.py | 43 +++++++++++++ tools/update_lakshmi.py | 50 +++++++++++++++ tools/update_lapis_manalis.py | 43 +++++++++++++ tools/update_leviathan.py | 43 +++++++++++++ tools/update_lh1.py | 50 +++++++++++++++ tools/update_lh2.py | 51 +++++++++++++++ tools/update_lh3.py | 51 +++++++++++++++ tools/update_lh4.py | 51 +++++++++++++++ tools/update_lunar_subterrane.py | 43 +++++++++++++ tools/update_malikahs_well.py | 43 +++++++++++++ tools/update_matoyas_relict.py | 43 +++++++++++++ tools/update_mt_gulg.py | 43 +++++++++++++ tools/update_nabriales.py | 43 +++++++++++++ tools/update_nidhogg.py | 43 +++++++++++++ tools/update_odin.py | 43 +++++++++++++ tools/update_omega_alpha.py | 51 +++++++++++++++ tools/update_omega_delta.py | 51 +++++++++++++++ tools/update_omega_sigma.py | 51 +++++++++++++++ tools/update_paglthan.py | 43 +++++++++++++ tools/update_puppets_bunker.py | 51 +++++++++++++++ tools/update_qitana_ravel.py | 43 +++++++++++++ tools/update_rabanastre.py | 51 +++++++++++++++ tools/update_ramuh.py | 43 +++++++++++++ tools/update_rathalos.py | 50 +++++++++++++++ tools/update_ravana.py | 50 +++++++++++++++ tools/update_ridorana.py | 92 ++++++++++++++++++++++++++++ tools/update_rubicante.py | 50 +++++++++++++++ tools/update_ruby_weapon.py | 50 +++++++++++++++ tools/update_seiryu.py | 50 +++++++++++++++ tools/update_sephirot.py | 43 +++++++++++++ tools/update_shinryu.py | 50 +++++++++++++++ tools/update_shisui.py | 43 +++++++++++++ tools/update_shiva.py | 43 +++++++++++++ tools/update_sirensong_sea.py | 43 +++++++++++++ tools/update_smileton.py | 43 +++++++++++++ tools/update_sophia.py | 43 +++++++++++++ tools/update_steps_of_faith.py | 43 +++++++++++++ tools/update_stigma_four.py | 43 +++++++++++++ tools/update_susano.py | 50 +++++++++++++++ tools/update_suzaku.py | 50 +++++++++++++++ tools/update_temple_of_the_fist.py | 43 +++++++++++++ tools/update_thaleia.py | 51 +++++++++++++++ tools/update_thordan.py | 43 +++++++++++++ tools/update_titania.py | 50 +++++++++++++++ tools/update_tower_breach.py | 51 +++++++++++++++ tools/update_troia.py | 43 +++++++++++++ tools/update_tsukuyomi.py | 50 +++++++++++++++ tools/update_twinning.py | 43 +++++++++++++ tools/update_ultima_weapon.py | 43 +++++++++++++ tools/update_ultimate_alexander.py | 43 +++++++++++++ tools/update_ultimate_bahamut.py | 43 +++++++++++++ tools/update_ultimate_dragonsong.py | 43 +++++++++++++ tools/update_ultimate_eden.py | 43 +++++++++++++ tools/update_ultimate_omega.py | 43 +++++++++++++ tools/update_ultimate_ultima.py | 43 +++++++++++++ tools/update_vanaspati.py | 51 +++++++++++++++ tools/update_void_ark.py | 51 +++++++++++++++ tools/update_wol.py | 50 +++++++++++++++ tools/update_yojimbo.py | 50 +++++++++++++++ tools/update_zeromus.py | 50 +++++++++++++++ tools/update_zurvan.py | 43 +++++++++++++ 122 files changed, 5826 insertions(+) create mode 100644 tools/fix_hard.py create mode 100644 tools/update_abyssos.py create mode 100644 tools/update_aetherfont.py create mode 100644 tools/update_aglaia.py create mode 100644 tools/update_aitiascope.py create mode 100644 tools/update_akadaemia_anyder.py create mode 100644 tools/update_ala_mhigo.py create mode 100644 tools/update_alex_creator.py create mode 100644 tools/update_alex_gordias.py create mode 100644 tools/update_alex_midas.py create mode 100644 tools/update_alzadaals_legacy.py create mode 100644 tools/update_amaurot.py create mode 100644 tools/update_anabaseios.py create mode 100644 tools/update_anamesis_anyder.py create mode 100644 tools/update_asphodelos.py create mode 100644 tools/update_asura.py create mode 100644 tools/update_bahamut_binding.py create mode 100644 tools/update_bahamut_final.py create mode 100644 tools/update_bahamut_second.py create mode 100644 tools/update_barbariccia.py create mode 100644 tools/update_bardams_mettle.py create mode 100644 tools/update_bismarck.py create mode 100644 tools/update_byakko.py create mode 100644 tools/update_castrum_abania.py create mode 100644 tools/update_diamond_weapon.py create mode 100644 tools/update_dohn_mheg.py create mode 100644 tools/update_doma_castle.py create mode 100644 tools/update_dying_gasp.py create mode 100644 tools/update_eden_gate.py create mode 100644 tools/update_eden_promise.py create mode 100644 tools/update_eden_verse.py create mode 100644 tools/update_emerald_weapon.py create mode 100644 tools/update_endsinger.py create mode 100644 tools/update_euphrosyne.py create mode 100644 tools/update_extreme_barbariccia.py create mode 100644 tools/update_extreme_diamond.py create mode 100644 tools/update_extreme_emerald.py create mode 100644 tools/update_extreme_endsinger.py create mode 100644 tools/update_extreme_golbez.py create mode 100644 tools/update_extreme_hades.py create mode 100644 tools/update_extreme_hydaelyn.py create mode 100644 tools/update_extreme_innocence.py create mode 100644 tools/update_extreme_lakshmi.py create mode 100644 tools/update_extreme_rubicante.py create mode 100644 tools/update_extreme_ruby_weapon.py create mode 100644 tools/update_extreme_shinryu.py create mode 100644 tools/update_extreme_susano.py create mode 100644 tools/update_extreme_titania.py create mode 100644 tools/update_extreme_tsukuyomi.py create mode 100644 tools/update_extreme_wol.py create mode 100644 tools/update_extreme_zeromus.py create mode 100644 tools/update_extreme_zodiark.py create mode 100644 tools/update_faux_byakko.py create mode 100644 tools/update_gilgamesh.py create mode 100644 tools/update_golbez.py create mode 100644 tools/update_good_king_moggle_mog.py create mode 100644 tools/update_grand_cosmos.py create mode 100644 tools/update_heroes_gauntlet.py create mode 100644 tools/update_holminster.py create mode 100644 tools/update_innocence.py create mode 100644 tools/update_ktisis.py create mode 100644 tools/update_kugane_castle.py create mode 100644 tools/update_lakshmi.py create mode 100644 tools/update_lapis_manalis.py create mode 100644 tools/update_leviathan.py create mode 100644 tools/update_lh1.py create mode 100644 tools/update_lh2.py create mode 100644 tools/update_lh3.py create mode 100644 tools/update_lh4.py create mode 100644 tools/update_lunar_subterrane.py create mode 100644 tools/update_malikahs_well.py create mode 100644 tools/update_matoyas_relict.py create mode 100644 tools/update_mt_gulg.py create mode 100644 tools/update_nabriales.py create mode 100644 tools/update_nidhogg.py create mode 100644 tools/update_odin.py create mode 100644 tools/update_omega_alpha.py create mode 100644 tools/update_omega_delta.py create mode 100644 tools/update_omega_sigma.py create mode 100644 tools/update_paglthan.py create mode 100644 tools/update_puppets_bunker.py create mode 100644 tools/update_qitana_ravel.py create mode 100644 tools/update_rabanastre.py create mode 100644 tools/update_ramuh.py create mode 100644 tools/update_rathalos.py create mode 100644 tools/update_ravana.py create mode 100644 tools/update_ridorana.py create mode 100644 tools/update_rubicante.py create mode 100644 tools/update_ruby_weapon.py create mode 100644 tools/update_seiryu.py create mode 100644 tools/update_sephirot.py create mode 100644 tools/update_shinryu.py create mode 100644 tools/update_shisui.py create mode 100644 tools/update_shiva.py create mode 100644 tools/update_sirensong_sea.py create mode 100644 tools/update_smileton.py create mode 100644 tools/update_sophia.py create mode 100644 tools/update_steps_of_faith.py create mode 100644 tools/update_stigma_four.py create mode 100644 tools/update_susano.py create mode 100644 tools/update_suzaku.py create mode 100644 tools/update_temple_of_the_fist.py create mode 100644 tools/update_thaleia.py create mode 100644 tools/update_thordan.py create mode 100644 tools/update_titania.py create mode 100644 tools/update_tower_breach.py create mode 100644 tools/update_troia.py create mode 100644 tools/update_tsukuyomi.py create mode 100644 tools/update_twinning.py create mode 100644 tools/update_ultima_weapon.py create mode 100644 tools/update_ultimate_alexander.py create mode 100644 tools/update_ultimate_bahamut.py create mode 100644 tools/update_ultimate_dragonsong.py create mode 100644 tools/update_ultimate_eden.py create mode 100644 tools/update_ultimate_omega.py create mode 100644 tools/update_ultimate_ultima.py create mode 100644 tools/update_vanaspati.py create mode 100644 tools/update_void_ark.py create mode 100644 tools/update_wol.py create mode 100644 tools/update_yojimbo.py create mode 100644 tools/update_zeromus.py create mode 100644 tools/update_zurvan.py diff --git a/tools/fix_hard.py b/tools/fix_hard.py new file mode 100644 index 0000000..3620944 --- /dev/null +++ b/tools/fix_hard.py @@ -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( + 'ハラタリ修練所 (Hard)\r\n Lv50 (IL55〜)\r\n 非対応\r\n 剣闘士コロシアム、百裂拳、マンティコア。\r\n 攻略を見る ➜', + 'ハラタリ修練所 (Hard)\r\n Lv50 (IL55〜)\r\n 非対応\r\n 剣闘士コロシアム、百裂拳、マンティコア。\r\n 準備中' +) + +# LF環境のフォールバック +text = text.replace( + 'ハラタリ修練所 (Hard)\n Lv50 (IL55〜)\n 非対応\n 剣闘士コロシアム、百裂拳、マンティコア。\n 攻略を見る ➜', + 'ハラタリ修練所 (Hard)\n Lv50 (IL55〜)\n 非対応\n 剣闘士コロシアム、百裂拳、マンティコア。\n 準備中' +) + +# 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") diff --git a/tools/update_abyssos.py b/tools/update_abyssos.py new file mode 100644 index 0000000..ed67970 --- /dev/null +++ b/tools/update_abyssos.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +import sys + +def normalize_file(filepath): + with open(filepath, 'r', encoding='utf-8') as f: + content = f.read() + content = content.lstrip('\ufeff') + lines = [line.rstrip() for line in content.splitlines()] + norm_lines = [] + prev_blank = False + for line in lines: + if line == '': + if not prev_blank: + norm_lines.append(line) + prev_blank = True + else: + norm_lines.append(line) + prev_blank = False + result = '\r\n'.join(norm_lines) + '\r\n' + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + result.encode('utf-8')) + +normalize_file('raids/pandemonium_abyssos.html') + +with open('raids/index.html', 'r', encoding='utf-8') as f: + text = f.read() + +target = """ + 煉獄編 1〜4層 + Lv90 (IL605〜) + ノーマル / 零式 + プロトカーバンクル(毒・突進)、ヘーゲモネ、アグディスティス、ヘファイストス(変異創身・概念支配)。 + 準備中 + """ + +replacement = """ + 煉獄編 1〜4層 + Lv90 (IL605〜) + ノーマル / 零式 + プロトカーバンクル(毒・突進)、ヘーゲモネ、アグディスティス、ヘファイストス(変異創身・概念支配)。 + 攻略を見る ➜ + """ + +if target in text: + text = text.replace(target, replacement) + with open('raids/index.html', 'w', encoding='utf-8') as f: + f.write(text) + normalize_file('raids/index.html') + print("SUCCESS: Updated raids/index.html with Pandemonium Abyssos link.") +else: + print("ERROR: Target string not found in raids/index.html") diff --git a/tools/update_aetherfont.py b/tools/update_aetherfont.py new file mode 100644 index 0000000..0e4042e --- /dev/null +++ b/tools/update_aetherfont.py @@ -0,0 +1,43 @@ +import sys + +def main(): + with open('dungeons/index.html', 'r', encoding='utf-8-sig') as f: + content = f.read() + + target = """ + 星霊間欠 ハム島 + Lv90 (IL620〜) + 対応 + パッチ6.4メインID。シャーレアン近海。巨大甲殻類、星霊体の連鎖爆発。 + 準備中 + """ + + replacement = """ + 星霊間欠 ハム島 + Lv90 (IL620〜) + 対応 + パッチ6.4メインID。シャーレアン近海。巨大甲殻類、星霊体の連鎖爆発。 + 攻略を見る ➜ + """ + + 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/aetherfont.html', 'r', encoding='utf-8-sig') as f: + aet = f.read() + aet_lines = [line.rstrip() for line in aet.splitlines()] + aet_clean = '\r\n'.join(aet_lines) + '\r\n' + with open('dungeons/aetherfont.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + aet_clean.encode('utf-8')) + + print("星霊間欠 ハム島のリンク更新および正規化が完了しました。") + +if __name__ == '__main__': + main() diff --git a/tools/update_aglaia.py b/tools/update_aglaia.py new file mode 100644 index 0000000..d039d22 --- /dev/null +++ b/tools/update_aglaia.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +import sys + +def normalize_file(filepath): + with open(filepath, 'r', encoding='utf-8') as f: + content = f.read() + content = content.lstrip('\ufeff') + lines = [line.rstrip() for line in content.splitlines()] + norm_lines = [] + prev_blank = False + for line in lines: + if line == '': + if not prev_blank: + norm_lines.append(line) + prev_blank = True + else: + norm_lines.append(line) + prev_blank = False + result = '\r\n'.join(norm_lines) + '\r\n' + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + result.encode('utf-8')) + +normalize_file('raids/aglaia.html') + +with open('raids/index.html', 'r', encoding='utf-8') as f: + text = f.read() + +target = """ + 輝ける神域 アグライア + Lv90 (暁月6.x) + 24人 (A/B/C) + 十二神第1弾。ビエルゴ(ハンマー移動)、ラールガー(彗星パンチ)、アーゼマ、ナルザル(魂の天秤)。 + 準備中 + """ + +replacement = """ + 輝ける神域 アグライア + Lv90 (暁月6.x) + 24人 (A/B/C) + 十二神第1弾。ビエルゴ(ハンマー移動)、ラールガー(彗星パンチ)、アーゼマ、ナルザル(魂の天秤)。 + 攻略を見る ➜ + """ + +if target in text: + text = text.replace(target, replacement) + with open('raids/index.html', 'w', encoding='utf-8') as f: + f.write(text) + normalize_file('raids/index.html') + print("SUCCESS: Updated raids/index.html with Aglaia link.") +else: + print("ERROR: Target string not found in raids/index.html") diff --git a/tools/update_aitiascope.py b/tools/update_aitiascope.py new file mode 100644 index 0000000..5455be8 --- /dev/null +++ b/tools/update_aitiascope.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +import sys + +def normalize_file(filepath): + with open(filepath, 'r', encoding='utf-8') as f: + content = f.read() + content = content.lstrip('\ufeff') + lines = [line.rstrip() for line in content.splitlines()] + norm_lines = [] + prev_blank = False + for line in lines: + if line == '': + if not prev_blank: + norm_lines.append(line) + prev_blank = True + else: + norm_lines.append(line) + prev_blank = False + result = '\r\n'.join(norm_lines) + '\r\n' + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + result.encode('utf-8')) + +normalize_file('dungeons/aitiascope.html') + +with open('dungeons/index.html', 'r', encoding='utf-8') as f: + text = f.read() + +target = """ + 星海潜航 アイティオン星晶鏡 + Lv89 (IL520〜) + 対応 + 星海深部。リウィア、ルキア、アモンとの因縁決戦。過去の英霊たちの支援。 + 準備中 + """ + +replacement = """ + 星海潜航 アイティオン星晶鏡 + Lv89 (IL520〜) + 対応 + 星海深部。リウィア、ルキア、アモンとの因縁決戦。過去の英霊たちの支援。 + 攻略を見る ➜ + """ + +if target in text: + text = text.replace(target, replacement) + with open('dungeons/index.html', 'w', encoding='utf-8') as f: + f.write(text) + normalize_file('dungeons/index.html') + print("SUCCESS: Updated dungeons/index.html with Aitiascope link.") +else: + print("ERROR: Target string not found in dungeons/index.html") diff --git a/tools/update_akadaemia_anyder.py b/tools/update_akadaemia_anyder.py new file mode 100644 index 0000000..41338f9 --- /dev/null +++ b/tools/update_akadaemia_anyder.py @@ -0,0 +1,43 @@ +import sys + +def main(): + with open('dungeons/index.html', 'r', encoding='utf-8-sig') as f: + content = f.read() + + target = """ + 創造機関 アナイダアカデミア + Lv80 (IL410〜) + 非対応 + 古代の生物研究所。クラバントゥス、ケツァクウァトル、植物触手。 + 準備中 + """ + + replacement = """ + 創造機関 アナイダアカデミア + Lv80 (IL410〜) + 非対応 + 古代の生物研究所。クラバントゥス、ケツァクウァトル、植物触手。 + 攻略を見る ➜ + """ + + 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/akadaemia_anyder.html', 'r', encoding='utf-8-sig') as f: + aka = f.read() + aka_lines = [line.rstrip() for line in aka.splitlines()] + aka_clean = '\r\n'.join(aka_lines) + '\r\n' + with open('dungeons/akadaemia_anyder.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + aka_clean.encode('utf-8')) + + print("創造機関 アナイダアカデミアのリンク更新および正規化が完了しました。") + +if __name__ == '__main__': + main() diff --git a/tools/update_ala_mhigo.py b/tools/update_ala_mhigo.py new file mode 100644 index 0000000..136db26 --- /dev/null +++ b/tools/update_ala_mhigo.py @@ -0,0 +1,43 @@ +import sys + +def main(): + with open('dungeons/index.html', 'r', encoding='utf-8-sig') as f: + content = f.read() + + target = """ + 紅蓮決戦 アラミゴ + Lv70 (IL280〜) + 対応 + 紅蓮メイン最終ID。帝国軍精鋭、ゼノス・イェー・ガルヴァス決戦。 + 準備中 + """ + + replacement = """ + 紅蓮決戦 アラミゴ + Lv70 (IL280〜) + 対応 + 紅蓮メイン最終ID。帝国軍精鋭、ゼノス・イェー・ガルヴァス決戦。 + 攻略を見る ➜ + """ + + 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/ala_mhigo.html', 'r', encoding='utf-8-sig') as f: + ala = f.read() + ala_lines = [line.rstrip() for line in ala.splitlines()] + ala_clean = '\r\n'.join(ala_lines) + '\r\n' + with open('dungeons/ala_mhigo.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + ala_clean.encode('utf-8')) + + print("紅蓮決戦 アラミゴのリンク更新および正規化が完了しました。") + +if __name__ == '__main__': + main() diff --git a/tools/update_alex_creator.py b/tools/update_alex_creator.py new file mode 100644 index 0000000..e073329 --- /dev/null +++ b/tools/update_alex_creator.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +import os +import sys + +def normalize_file(filepath): + with open(filepath, 'rb') as f: + raw = f.read() + content = raw.decode('utf-8', errors='replace').lstrip('\ufeff') + content = content.replace('\r\n', '\n').replace('\r', '\n') + lines = [line.rstrip(' \t') for line in content.split('\n')] + cleaned_lines = [] + prev_empty = False + for line in lines: + if line == '': + if not prev_empty: + cleaned_lines.append(line) + prev_empty = True + else: + cleaned_lines.append(line) + prev_empty = False + new_content = '\r\n'.join(cleaned_lines) + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + new_content.encode('utf-8')) + print(f"Normalized: {filepath}") + +index_path = 'raids/index.html' +with open(index_path, 'r', encoding='utf-8') as f: + lines = f.readlines() + +updated = False +for i, line in enumerate(lines): + if '天動編 1〜4層' in line: + for k in range(i, i+6): + if '準備中' in lines[k]: + lines[k] = lines[k].replace('準備中', '攻略を見る ➜') + updated = True + print(f"Replaced line {k+1}") + break + if updated: + break + +if updated: + with open(index_path, 'w', encoding='utf-8') as f: + f.writelines(lines) + print("Successfully updated raids/index.html for alexander_creator") +else: + print("Failed to find target row in raids/index.html") + +normalize_file('raids/index.html') +normalize_file('raids/alexander_creator.html') diff --git a/tools/update_alex_gordias.py b/tools/update_alex_gordias.py new file mode 100644 index 0000000..3affe90 --- /dev/null +++ b/tools/update_alex_gordias.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +import sys + +def normalize_file(filepath): + with open(filepath, 'r', encoding='utf-8') as f: + content = f.read() + content = content.lstrip('\ufeff') + lines = [line.rstrip() for line in content.splitlines()] + norm_lines = [] + prev_blank = False + for line in lines: + if line == '': + if not prev_blank: + norm_lines.append(line) + prev_blank = True + else: + norm_lines.append(line) + prev_blank = False + result = '\r\n'.join(norm_lines) + '\r\n' + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + result.encode('utf-8')) + +normalize_file('raids/alexander_gordias.html') + +with open('raids/index.html', 'r', encoding='utf-8') as f: + text = f.read() + +target = """ + 起動編 1〜4層 + Lv60 (IL190〜) + ノーマル / 零式 + オプレッサー(粘性誘導)、ゴブリン小隊、リビングリキッド(窒息・ヤクト)、マニピュレーター(隔離・足破壊)。 + 準備中 + """ + +replacement = """ + 起動編 1〜4層 + Lv60 (IL190〜) + ノーマル / 零式 + オプレッサー(粘性誘導)、ゴブリン小隊、リビングリキッド(窒息・ヤクト)、マニピュレーター(隔離・足破壊)。 + 攻略を見る ➜ + """ + +if target in text: + text = text.replace(target, replacement) + with open('raids/index.html', 'w', encoding='utf-8') as f: + f.write(text) + normalize_file('raids/index.html') + print("SUCCESS: Updated raids/index.html with Alexander Gordias link.") +else: + print("ERROR: Target string not found in raids/index.html") diff --git a/tools/update_alex_midas.py b/tools/update_alex_midas.py new file mode 100644 index 0000000..1ff520c --- /dev/null +++ b/tools/update_alex_midas.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +import os +import sys + +def normalize_file(filepath): + with open(filepath, 'rb') as f: + raw = f.read() + content = raw.decode('utf-8', errors='replace').lstrip('\ufeff') + content = content.replace('\r\n', '\n').replace('\r', '\n') + lines = [line.rstrip(' \t') for line in content.split('\n')] + cleaned_lines = [] + prev_empty = False + for line in lines: + if line == '': + if not prev_empty: + cleaned_lines.append(line) + prev_empty = True + else: + cleaned_lines.append(line) + prev_empty = False + new_content = '\r\n'.join(cleaned_lines) + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + new_content.encode('utf-8')) + print(f"Normalized: {filepath}") + +index_path = 'raids/index.html' +with open(index_path, 'r', encoding='utf-8') as f: + lines = f.readlines() + +updated = False +for i, line in enumerate(lines): + if '律動編 1〜4層' in line: + for k in range(i, i+6): + if '準備中' in lines[k]: + lines[k] = lines[k].replace('準備中', '攻略を見る ➜') + updated = True + print(f"Replaced line {k+1}") + break + if updated: + break + +if updated: + with open(index_path, 'w', encoding='utf-8') as f: + f.writelines(lines) + print("Successfully updated raids/index.html for alexander_midas") +else: + print("Failed to find target row in raids/index.html") + +normalize_file('raids/index.html') +normalize_file('raids/alexander_midas.html') diff --git a/tools/update_alzadaals_legacy.py b/tools/update_alzadaals_legacy.py new file mode 100644 index 0000000..08b2960 --- /dev/null +++ b/tools/update_alzadaals_legacy.py @@ -0,0 +1,43 @@ +import sys + +def main(): + with open('dungeons/index.html', 'r', encoding='utf-8-sig') as f: + content = f.read() + + target = """ + 近東秘宝 アルザダール海底遺跡群 + Lv90 (IL565〜) + 対応 + パッチ6.1メインID。海底神殿の秘宝、からくり兵士の射線回避。 + 準備中 + """ + + replacement = """ + 近東秘宝 アルザダール海底遺跡群 + Lv90 (IL565〜) + 対応 + パッチ6.1メインID。海底神殿の秘宝、からくり兵士の射線回避。 + 攻略を見る ➜ + """ + + 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/alzadaals_legacy.html', 'r', encoding='utf-8-sig') as f: + alz = f.read() + alz_lines = [line.rstrip() for line in alz.splitlines()] + alz_clean = '\r\n'.join(alz_lines) + '\r\n' + with open('dungeons/alzadaals_legacy.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + alz_clean.encode('utf-8')) + + print("近東秘宝 アルザダール海底遺跡群のリンク更新および正規化が完了しました。") + +if __name__ == '__main__': + main() diff --git a/tools/update_amaurot.py b/tools/update_amaurot.py new file mode 100644 index 0000000..640de62 --- /dev/null +++ b/tools/update_amaurot.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +import sys + +def normalize_file(filepath): + with open(filepath, 'r', encoding='utf-8') as f: + content = f.read() + content = content.lstrip('\ufeff') + lines = [line.rstrip() for line in content.splitlines()] + norm_lines = [] + prev_blank = False + for line in lines: + if line == '': + if not prev_blank: + norm_lines.append(line) + prev_blank = True + else: + norm_lines.append(line) + prev_blank = False + result = '\r\n'.join(norm_lines) + '\r\n' + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + result.encode('utf-8')) + +normalize_file('dungeons/amaurot.html') + +with open('dungeons/index.html', 'r', encoding='utf-8') as f: + text = f.read() + +target = """ + 終末幻想 アーモロート + Lv80 (IL410〜) + 対応 + 古代都市の滅亡。流星群落下、ビル崩壊、メガセリオンの終末の流星。 + 準備中 + """ + +replacement = """ + 終末幻想 アーモロート + Lv80 (IL410〜) + 対応 + 古代都市の滅亡。流星群落下、ビル崩壊、メガセリオンの終末の流星。 + 攻略を見る ➜ + """ + +if target in text: + text = text.replace(target, replacement) + with open('dungeons/index.html', 'w', encoding='utf-8') as f: + f.write(text) + normalize_file('dungeons/index.html') + print("SUCCESS: Updated dungeons/index.html with Amaurot link.") +else: + print("ERROR: Target string not found in dungeons/index.html") diff --git a/tools/update_anabaseios.py b/tools/update_anabaseios.py new file mode 100644 index 0000000..7b5ba68 --- /dev/null +++ b/tools/update_anabaseios.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +import sys + +def normalize_file(filepath): + with open(filepath, 'r', encoding='utf-8') as f: + content = f.read() + content = content.lstrip('\ufeff') + lines = [line.rstrip() for line in content.splitlines()] + norm_lines = [] + prev_blank = False + for line in lines: + if line == '': + if not prev_blank: + norm_lines.append(line) + prev_blank = True + else: + norm_lines.append(line) + prev_blank = False + result = '\r\n'.join(norm_lines) + '\r\n' + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + result.encode('utf-8')) + +normalize_file('raids/pandemonium_anabaseios.html') + +with open('raids/index.html', 'r', encoding='utf-8') as f: + text = f.read() + +target = """ + 天獄編 1〜4層 + Lv90 (IL635〜) + ノーマル / 零式 + コキュートス(武霊憑依)、パンデモニウム、テミス(調停・光闇)、アテナ(パラスの戒律・カロリック)。 + 準備中 + """ + +replacement = """ + 天獄編 1〜4層 + Lv90 (IL635〜) + ノーマル / 零式 + コキュートス(武霊憑依)、パンデモニウム、テミス(調停・光闇)、アテナ(パラスの戒律・カロリック)。 + 攻略を見る ➜ + """ + +if target in text: + text = text.replace(target, replacement) + with open('raids/index.html', 'w', encoding='utf-8') as f: + f.write(text) + normalize_file('raids/index.html') + print("SUCCESS: Updated raids/index.html with Pandemonium Anabaseios link.") +else: + print("ERROR: Target string not found in raids/index.html") diff --git a/tools/update_anamesis_anyder.py b/tools/update_anamesis_anyder.py new file mode 100644 index 0000000..6f596c3 --- /dev/null +++ b/tools/update_anamesis_anyder.py @@ -0,0 +1,43 @@ +import sys + +def main(): + with open('dungeons/index.html', 'r', encoding='utf-8-sig') as f: + content = f.read() + + target = """ + 黒風海底 アニドラス・アナムネーシス + Lv80 (IL440〜) + 対応 + パッチ5.2メインID。テンペスト深海施設。ルキア、キマイラ、床の排水溝塞ぎ。 + 準備中 + """ + + replacement = """ + 黒風海底 アニドラス・アナムネーシス + Lv80 (IL440〜) + 対応 + パッチ5.2メインID。テンペスト深海施設。ルキア、キマイラ、床の排水溝塞ぎ。 + 攻略を見る ➜ + """ + + 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/anamesis_anyder.html', 'r', encoding='utf-8-sig') as f: + ana = f.read() + ana_lines = [line.rstrip() for line in ana.splitlines()] + ana_clean = '\r\n'.join(ana_lines) + '\r\n' + with open('dungeons/anamesis_anyder.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + ana_clean.encode('utf-8')) + + print("黒風海底 アニドラス・アナムネーシスのリンク更新および正規化が完了しました。") + +if __name__ == '__main__': + main() diff --git a/tools/update_asphodelos.py b/tools/update_asphodelos.py new file mode 100644 index 0000000..0504a49 --- /dev/null +++ b/tools/update_asphodelos.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +import sys + +def normalize_file(filepath): + with open(filepath, 'r', encoding='utf-8') as f: + content = f.read() + content = content.lstrip('\ufeff') + lines = [line.rstrip() for line in content.splitlines()] + norm_lines = [] + prev_blank = False + for line in lines: + if line == '': + if not prev_blank: + norm_lines.append(line) + prev_blank = True + else: + norm_lines.append(line) + prev_blank = False + result = '\r\n'.join(norm_lines) + '\r\n' + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + result.encode('utf-8')) + +normalize_file('raids/pandemonium_asphodelos.html') + +with open('raids/index.html', 'r', encoding='utf-8') as f: + text = f.read() + +target = """ + 辺獄編 1〜4層 + Lv90 (IL565〜) + ノーマル / 零式 + エリクトニオス(鎖)、ヒッポカムポス、フェイツ、ヘスペロス(劇場展開)。 + 準備中 + """ + +replacement = """ + 辺獄編 1〜4層 + Lv90 (IL565〜) + ノーマル / 零式 + エリクトニオス(鎖)、ヒッポカムポス、フェイツ、ヘスペロス(劇場展開)。 + 攻略を見る ➜ + """ + +if target in text: + text = text.replace(target, replacement) + with open('raids/index.html', 'w', encoding='utf-8') as f: + f.write(text) + normalize_file('raids/index.html') + print("SUCCESS: Updated raids/index.html with Pandemonium Asphodelos link.") +else: + print("ERROR: Target string not found in raids/index.html") diff --git a/tools/update_asura.py b/tools/update_asura.py new file mode 100644 index 0000000..ed35b19 --- /dev/null +++ b/tools/update_asura.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +import os +import sys + +def normalize_file(filepath): + with open(filepath, 'rb') as f: + raw = f.read() + content = raw.decode('utf-8', errors='replace').lstrip('\ufeff') + content = content.replace('\r\n', '\n').replace('\r', '\n') + lines = [line.rstrip(' \t') for line in content.split('\n')] + cleaned_lines = [] + prev_empty = False + for line in lines: + if line == '': + if not prev_empty: + cleaned_lines.append(line) + prev_empty = True + else: + cleaned_lines.append(line) + prev_empty = False + new_content = '\r\n'.join(cleaned_lines) + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + new_content.encode('utf-8')) + print(f"Normalized: {filepath}") + +index_path = 'trials/index.html' +with open(index_path, 'r', encoding='utf-8') as f: + lines = f.readlines() + +updated = False +for i, line in enumerate(lines): + if 'アスラ討滅戦' in line: + for k in range(i, i+6): + if '準備中' in lines[k]: + lines[k] = lines[k].replace('準備中', '攻略を見る ➜') + updated = True + print(f"Replaced line {k+1}") + break + if updated: + break + +if updated: + with open(index_path, 'w', encoding='utf-8') as f: + f.writelines(lines) + print("Successfully updated trials/index.html for asura") +else: + print("Failed to find target row in trials/index.html") + +normalize_file('trials/index.html') +normalize_file('trials/asura.html') diff --git a/tools/update_bahamut_binding.py b/tools/update_bahamut_binding.py new file mode 100644 index 0000000..ac7339a --- /dev/null +++ b/tools/update_bahamut_binding.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +import os +import sys + +def normalize_file(filepath): + with open(filepath, 'rb') as f: + raw = f.read() + content = raw.decode('utf-8', errors='replace').lstrip('\ufeff') + content = content.replace('\r\n', '\n').replace('\r', '\n') + lines = [line.rstrip(' \t') for line in content.split('\n')] + cleaned_lines = [] + prev_empty = False + for line in lines: + if line == '': + if not prev_empty: + cleaned_lines.append(line) + prev_empty = True + else: + cleaned_lines.append(line) + prev_empty = False + new_content = '\r\n'.join(cleaned_lines) + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + new_content.encode('utf-8')) + print(f"Normalized: {filepath}") + +index_path = 'raids/index.html' +with open(index_path, 'r', encoding='utf-8') as f: + lines = f.readlines() + +updated = False +for i, line in enumerate(lines): + if '邂逅編 1〜5層' in line: + for k in range(i, i+6): + if '準備中' in lines[k]: + lines[k] = lines[k].replace('準備中', '攻略を見る ➜') + updated = True + print(f"Replaced line {k+1}") + break + if updated: + break + +if updated: + with open(index_path, 'w', encoding='utf-8') as f: + f.writelines(lines) + print("Successfully updated raids/index.html for bahamut_binding_coil") +else: + print("Failed to find target row in raids/index.html") + +normalize_file('raids/index.html') +normalize_file('raids/bahamut_binding_coil.html') diff --git a/tools/update_bahamut_final.py b/tools/update_bahamut_final.py new file mode 100644 index 0000000..375157a --- /dev/null +++ b/tools/update_bahamut_final.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +import os +import sys + +def normalize_file(filepath): + with open(filepath, 'rb') as f: + raw = f.read() + content = raw.decode('utf-8', errors='replace').lstrip('\ufeff') + content = content.replace('\r\n', '\n').replace('\r', '\n') + lines = [line.rstrip(' \t') for line in content.split('\n')] + cleaned_lines = [] + prev_empty = False + for line in lines: + if line == '': + if not prev_empty: + cleaned_lines.append(line) + prev_empty = True + else: + cleaned_lines.append(line) + prev_empty = False + new_content = '\r\n'.join(cleaned_lines) + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + new_content.encode('utf-8')) + print(f"Normalized: {filepath}") + +index_path = 'raids/index.html' +with open(index_path, 'r', encoding='utf-8') as f: + lines = f.readlines() + +updated = False +for i, line in enumerate(lines): + if '真成編 1〜4層' in line: + for k in range(i, i+6): + if '準備中' in lines[k]: + lines[k] = lines[k].replace('準備中', '攻略を見る ➜') + updated = True + print(f"Replaced line {k+1}") + break + if updated: + break + +if updated: + with open(index_path, 'w', encoding='utf-8') as f: + f.writelines(lines) + print("Successfully updated raids/index.html for bahamut_final_coil") +else: + print("Failed to find target row in raids/index.html") + +normalize_file('raids/index.html') +normalize_file('raids/bahamut_final_coil.html') diff --git a/tools/update_bahamut_second.py b/tools/update_bahamut_second.py new file mode 100644 index 0000000..418e7cc --- /dev/null +++ b/tools/update_bahamut_second.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +import os +import sys + +def normalize_file(filepath): + with open(filepath, 'rb') as f: + raw = f.read() + content = raw.decode('utf-8', errors='replace').lstrip('\ufeff') + content = content.replace('\r\n', '\n').replace('\r', '\n') + lines = [line.rstrip(' \t') for line in content.split('\n')] + cleaned_lines = [] + prev_empty = False + for line in lines: + if line == '': + if not prev_empty: + cleaned_lines.append(line) + prev_empty = True + else: + cleaned_lines.append(line) + prev_empty = False + new_content = '\r\n'.join(cleaned_lines) + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + new_content.encode('utf-8')) + print(f"Normalized: {filepath}") + +index_path = 'raids/index.html' +with open(index_path, 'r', encoding='utf-8') as f: + lines = f.readlines() + +updated = False +for i, line in enumerate(lines): + if '侵攻編 1〜4層' in line: + for k in range(i, i+6): + if '準備中' in lines[k]: + lines[k] = lines[k].replace('準備中', '攻略を見る ➜') + updated = True + print(f"Replaced line {k+1}") + break + if updated: + break + +if updated: + with open(index_path, 'w', encoding='utf-8') as f: + f.writelines(lines) + print("Successfully updated raids/index.html for bahamut_second_coil") +else: + print("Failed to find target row in raids/index.html") + +normalize_file('raids/index.html') +normalize_file('raids/bahamut_second_coil.html') diff --git a/tools/update_barbariccia.py b/tools/update_barbariccia.py new file mode 100644 index 0000000..d37e241 --- /dev/null +++ b/tools/update_barbariccia.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +import os +import sys + +def normalize_file(filepath): + with open(filepath, 'rb') as f: + raw = f.read() + content = raw.decode('utf-8', errors='replace').lstrip('\ufeff') + content = content.replace('\r\n', '\n').replace('\r', '\n') + lines = [line.rstrip(' \t') for line in content.split('\n')] + cleaned_lines = [] + prev_empty = False + for line in lines: + if line == '': + if not prev_empty: + cleaned_lines.append(line) + prev_empty = True + else: + cleaned_lines.append(line) + prev_empty = False + new_content = '\r\n'.join(cleaned_lines) + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + new_content.encode('utf-8')) + print(f"Normalized: {filepath}") + +index_path = 'trials/index.html' +with open(index_path, 'r', encoding='utf-8') as f: + lines = f.readlines() + +updated = False +for i, line in enumerate(lines): + if 'バルバリシア討滅戦' in line: + for k in range(i, i+6): + if '準備中' in lines[k]: + lines[k] = lines[k].replace('準備中', '攻略を見る ➜') + updated = True + print(f"Replaced line {k+1}") + break + if updated: + break + +if updated: + with open(index_path, 'w', encoding='utf-8') as f: + f.writelines(lines) + print("Successfully updated trials/index.html for barbariccia") +else: + print("Failed to find target row in trials/index.html") + +normalize_file('trials/index.html') +normalize_file('trials/barbariccia.html') diff --git a/tools/update_bardams_mettle.py b/tools/update_bardams_mettle.py new file mode 100644 index 0000000..d1e3ce5 --- /dev/null +++ b/tools/update_bardams_mettle.py @@ -0,0 +1,43 @@ +import sys + +def main(): + with open('dungeons/index.html', 'r', encoding='utf-8-sig') as f: + content = f.read() + + target = """ + 伝統試練 バルダム覇道 + Lv65 (IL250〜) + 対応 + アジムステップの試練。ボス2は「攻撃禁止・ギミック回避専念テスト」。 + 準備中 + """ + + replacement = """ + 伝統試練 バルダム覇道 + Lv65 (IL250〜) + 対応 + アジムステップの試練。ボス2は「攻撃禁止・ギミック回避専念テスト」。 + 攻略を見る ➜ + """ + + 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/bardams_mettle.html', 'r', encoding='utf-8-sig') as f: + bar = f.read() + bar_lines = [line.rstrip() for line in bar.splitlines()] + bar_clean = '\r\n'.join(bar_lines) + '\r\n' + with open('dungeons/bardams_mettle.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + bar_clean.encode('utf-8')) + + print("伝統試練 バルダム覇道のリンク更新および正規化が完了しました。") + +if __name__ == '__main__': + main() diff --git a/tools/update_bismarck.py b/tools/update_bismarck.py new file mode 100644 index 0000000..f05668b --- /dev/null +++ b/tools/update_bismarck.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +import os +import sys + +def normalize_file(filepath): + with open(filepath, 'rb') as f: + raw = f.read() + content = raw.decode('utf-8', errors='replace').lstrip('\ufeff') + content = content.replace('\r\n', '\n').replace('\r', '\n') + lines = [line.rstrip(' \t') for line in content.split('\n')] + cleaned_lines = [] + prev_empty = False + for line in lines: + if line == '': + if not prev_empty: + cleaned_lines.append(line) + prev_empty = True + else: + cleaned_lines.append(line) + prev_empty = False + new_content = '\r\n'.join(cleaned_lines) + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + new_content.encode('utf-8')) + print(f"Normalized: {filepath}") + +index_path = 'trials/index.html' +with open(index_path, 'r', encoding='utf-8') as f: + lines = f.readlines() + +updated = False +for i, line in enumerate(lines): + if 'ビスマルク討滅戦 / 極ビスマルク' in line: + for k in range(i, i+6): + if '準備中' in lines[k]: + lines[k] = lines[k].replace('準備中', '攻略を見る ➜') + updated = True + print(f"Replaced line {k+1}") + break + if updated: + break + +if updated: + with open(index_path, 'w', encoding='utf-8') as f: + f.writelines(lines) + print("Successfully updated trials/index.html for bismarck") +else: + print("Failed to find target row in trials/index.html") + +normalize_file('trials/index.html') +normalize_file('trials/bismarck.html') diff --git a/tools/update_byakko.py b/tools/update_byakko.py new file mode 100644 index 0000000..bc4db47 --- /dev/null +++ b/tools/update_byakko.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +import os +import sys + +def normalize_file(filepath): + with open(filepath, 'rb') as f: + raw = f.read() + content = raw.decode('utf-8', errors='replace').lstrip('\ufeff') + content = content.replace('\r\n', '\n').replace('\r', '\n') + lines = [line.rstrip(' \t') for line in content.split('\n')] + cleaned_lines = [] + prev_empty = False + for line in lines: + if line == '': + if not prev_empty: + cleaned_lines.append(line) + prev_empty = True + else: + cleaned_lines.append(line) + prev_empty = False + new_content = '\r\n'.join(cleaned_lines) + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + new_content.encode('utf-8')) + print(f"Normalized: {filepath}") + +index_path = 'trials/index.html' +with open(index_path, 'r', encoding='utf-8') as f: + lines = f.readlines() + +updated = False +for i, line in enumerate(lines): + if '白虎征魂戦 / 極白虎' in line: + for k in range(i, i+6): + if '準備中' in lines[k]: + lines[k] = lines[k].replace('準備中', '攻略を見る ➜') + updated = True + print(f"Replaced line {k+1}") + break + if updated: + break + +if updated: + with open(index_path, 'w', encoding='utf-8') as f: + f.writelines(lines) + print("Successfully updated trials/index.html for byakko") +else: + print("Failed to find target row in trials/index.html") + +normalize_file('trials/index.html') +normalize_file('trials/byakko.html') diff --git a/tools/update_castrum_abania.py b/tools/update_castrum_abania.py new file mode 100644 index 0000000..aec76b7 --- /dev/null +++ b/tools/update_castrum_abania.py @@ -0,0 +1,43 @@ +import sys + +def main(): + with open('dungeons/index.html', 'r', encoding='utf-8-sig') as f: + content = f.read() + + target = """ + 巨砲要塞 カストルム・アバニア + Lv69 (IL260〜) + 対応 + ギラバニア山岳地帯の帝国要塞。三属性カプセル、フォルドラ。 + 準備中 + """ + + replacement = """ + 巨砲要塞 カストルム・アバニア + Lv69 (IL260〜) + 対応 + ギラバニア山岳地帯の帝国要塞。三属性カプセル、フォルドラ。 + 攻略を見る ➜ + """ + + 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/castrum_abania.html', 'r', encoding='utf-8-sig') as f: + cas = f.read() + cas_lines = [line.rstrip() for line in cas.splitlines()] + cas_clean = '\r\n'.join(cas_lines) + '\r\n' + with open('dungeons/castrum_abania.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + cas_clean.encode('utf-8')) + + print("巨砲要塞 カストルム・アバニアのリンク更新および正規化が完了しました。") + +if __name__ == '__main__': + main() diff --git a/tools/update_diamond_weapon.py b/tools/update_diamond_weapon.py new file mode 100644 index 0000000..638d070 --- /dev/null +++ b/tools/update_diamond_weapon.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +import os +import sys + +def normalize_file(filepath): + with open(filepath, 'rb') as f: + raw = f.read() + content = raw.decode('utf-8', errors='replace').lstrip('\ufeff') + content = content.replace('\r\n', '\n').replace('\r', '\n') + lines = [line.rstrip(' \t') for line in content.split('\n')] + cleaned_lines = [] + prev_empty = False + for line in lines: + if line == '': + if not prev_empty: + cleaned_lines.append(line) + prev_empty = True + else: + cleaned_lines.append(line) + prev_empty = False + new_content = '\r\n'.join(cleaned_lines) + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + new_content.encode('utf-8')) + print(f"Normalized: {filepath}") + +index_path = 'trials/index.html' +with open(index_path, 'r', encoding='utf-8') as f: + lines = f.readlines() + +updated = False +for i, line in enumerate(lines): + if 'ダイヤウェポン破壊作戦' in line: + for k in range(i, i+6): + if '準備中' in lines[k]: + lines[k] = lines[k].replace('準備中', '攻略を見る ➜') + updated = True + print(f"Replaced line {k+1}") + break + if updated: + break + +if updated: + with open(index_path, 'w', encoding='utf-8') as f: + f.writelines(lines) + print("Successfully updated trials/index.html for diamond_weapon") +else: + print("Failed to find target row in trials/index.html") + +normalize_file('trials/index.html') +normalize_file('trials/diamond_weapon.html') diff --git a/tools/update_dohn_mheg.py b/tools/update_dohn_mheg.py new file mode 100644 index 0000000..cfc1072 --- /dev/null +++ b/tools/update_dohn_mheg.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +import sys + +def normalize_file(filepath): + with open(filepath, 'r', encoding='utf-8') as f: + content = f.read() + content = content.lstrip('\ufeff') + lines = [line.rstrip() for line in content.splitlines()] + norm_lines = [] + prev_blank = False + for line in lines: + if line == '': + if not prev_blank: + norm_lines.append(line) + prev_blank = True + else: + norm_lines.append(line) + prev_blank = False + result = '\r\n'.join(norm_lines) + '\r\n' + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + result.encode('utf-8')) + +normalize_file('dungeons/dohn_mheg.html') + +with open('dungeons/index.html', 'r', encoding='utf-8') as f: + text = f.read() + +target = """ + 水妖幻園 ドォー・メグ + Lv73 (IL380〜) + 対応 + 妖精郷の幻影水脈。水脈綱渡り、カエル変身、幻惑のインク・グァポ。 + 準備中 + """ + +replacement = """ + 水妖幻園 ドォー・メグ + Lv73 (IL380〜) + 対応 + 妖精郷の幻影水脈。水脈綱渡り、カエル変身、幻惑のインク・グァポ。 + 攻略を見る ➜ + """ + +if target in text: + text = text.replace(target, replacement) + with open('dungeons/index.html', 'w', encoding='utf-8') as f: + f.write(text) + normalize_file('dungeons/index.html') + print("SUCCESS: Updated dungeons/index.html with Dohn Mheg link.") +else: + print("ERROR: Target string not found in dungeons/index.html") diff --git a/tools/update_doma_castle.py b/tools/update_doma_castle.py new file mode 100644 index 0000000..c48f451 --- /dev/null +++ b/tools/update_doma_castle.py @@ -0,0 +1,43 @@ +import sys + +def main(): + with open('dungeons/index.html', 'r', encoding='utf-8-sig') as f: + content = f.read() + + target = """ + 解放決戦 ドマ城 + Lv67 (IL255〜) + 対応 + ドマ解放戦。帝国軍迎撃、ガンシップ爆撃、強化グリーンワート。 + 準備中 + """ + + replacement = """ + 解放決戦 ドマ城 + Lv67 (IL255〜) + 対応 + ドマ解放戦。帝国軍迎撃、ガンシップ爆撃、強化グリーンワート。 + 攻略を見る ➜ + """ + + 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/doma_castle.html', 'r', encoding='utf-8-sig') as f: + dom = f.read() + dom_lines = [line.rstrip() for line in dom.splitlines()] + dom_clean = '\r\n'.join(dom_lines) + '\r\n' + with open('dungeons/doma_castle.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + dom_clean.encode('utf-8')) + + print("解放決戦 ドマ城のリンク更新および正規化が完了しました。") + +if __name__ == '__main__': + main() diff --git a/tools/update_dying_gasp.py b/tools/update_dying_gasp.py new file mode 100644 index 0000000..7cf75cc --- /dev/null +++ b/tools/update_dying_gasp.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +import sys + +def normalize_file(filepath): + with open(filepath, 'r', encoding='utf-8') as f: + content = f.read() + content = content.lstrip('\ufeff') + lines = [line.rstrip() for line in content.splitlines()] + norm_lines = [] + prev_blank = False + for line in lines: + if line == '': + if not prev_blank: + norm_lines.append(line) + prev_blank = True + else: + norm_lines.append(line) + prev_blank = False + result = '\r\n'.join(norm_lines) + '\r\n' + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + result.encode('utf-8')) + +normalize_file('trials/the_dying_gasp.html') + +with open('trials/index.html', 'r', encoding='utf-8') as f: + text = f.read() + +target = """ + ハーデス討滅戦 + Lv80 (IL410〜) + ノーマル (8人) + 【漆黒ラスボス】 エメトセルク。古代人の幻影、深淵の記憶。 + 準備中 + """ + +replacement = """ + ハーデス討滅戦 + Lv80 (IL410〜) + ノーマル (8人) + 【漆黒ラスボス】 エメトセルク。古代人の幻影、深淵の記憶。 + 攻略を見る ➜ + """ + +if target in text: + text = text.replace(target, replacement) + with open('trials/index.html', 'w', encoding='utf-8') as f: + f.write(text) + normalize_file('trials/index.html') + print("SUCCESS: Updated trials/index.html with The Dying Gasp link.") +else: + print("ERROR: Target string not found in trials/index.html") diff --git a/tools/update_eden_gate.py b/tools/update_eden_gate.py new file mode 100644 index 0000000..50d0497 --- /dev/null +++ b/tools/update_eden_gate.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +import sys + +def normalize_file(filepath): + with open(filepath, 'r', encoding='utf-8') as f: + content = f.read() + content = content.lstrip('\ufeff') + lines = [line.rstrip() for line in content.splitlines()] + norm_lines = [] + prev_blank = False + for line in lines: + if line == '': + if not prev_blank: + norm_lines.append(line) + prev_blank = True + else: + norm_lines.append(line) + prev_blank = False + result = '\r\n'.join(norm_lines) + '\r\n' + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + result.encode('utf-8')) + +normalize_file('raids/eden_gate.html') + +with open('raids/index.html', 'r', encoding='utf-8') as f: + text = f.read() + +target = """ + 覚醒編 1〜4層 + Lv80 (IL440〜) + ノーマル / 零式 + エデン・プライム、ヴォイドウォーカー(遅延ギミック)、リヴァイアサン、タイタン(車形態・ボム)。 + 準備中 + """ + +replacement = """ + 覚醒編 1〜4層 + Lv80 (IL440〜) + ノーマル / 零式 + エデン・プライム、ヴォイドウォーカー(遅延ギミック)、リヴァイアサン、タイタン(車形態・ボム)。 + 攻略を見る ➜ + """ + +if target in text: + text = text.replace(target, replacement) + with open('raids/index.html', 'w', encoding='utf-8') as f: + f.write(text) + normalize_file('raids/index.html') + print("SUCCESS: Updated raids/index.html with Eden Gate link.") +else: + print("ERROR: Target string not found in raids/index.html") diff --git a/tools/update_eden_promise.py b/tools/update_eden_promise.py new file mode 100644 index 0000000..f8f6154 --- /dev/null +++ b/tools/update_eden_promise.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +import sys + +def normalize_file(filepath): + with open(filepath, 'r', encoding='utf-8') as f: + content = f.read() + content = content.lstrip('\ufeff') + lines = [line.rstrip() for line in content.splitlines()] + norm_lines = [] + prev_blank = False + for line in lines: + if line == '': + if not prev_blank: + norm_lines.append(line) + prev_blank = True + else: + norm_lines.append(line) + prev_blank = False + result = '\r\n'.join(norm_lines) + '\r\n' + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + result.encode('utf-8')) + +normalize_file('raids/eden_promise.html') + +with open('raids/index.html', 'r', encoding='utf-8') as f: + text = f.read() + +target = """ + 再生編 1〜4層 + Lv80 (IL500〜) + ノーマル / 零式 + アンブラルアイ、シャドウキーパー、フェイトブレイカー、プロミス・オブ・エデン(闇の巫女・時間圧縮)。 + 準備中 + """ + +replacement = """ + 再生編 1〜4層 + Lv80 (IL500〜) + ノーマル / 零式 + アンブラルアイ、シャドウキーパー、フェイトブレイカー、プロミス・オブ・エデン(闇の巫女・時間圧縮)。 + 攻略を見る ➜ + """ + +if target in text: + text = text.replace(target, replacement) + with open('raids/index.html', 'w', encoding='utf-8') as f: + f.write(text) + normalize_file('raids/index.html') + print("SUCCESS: Updated raids/index.html with Eden Promise link.") +else: + print("ERROR: Target string not found in raids/index.html") diff --git a/tools/update_eden_verse.py b/tools/update_eden_verse.py new file mode 100644 index 0000000..64fd975 --- /dev/null +++ b/tools/update_eden_verse.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +import sys + +def normalize_file(filepath): + with open(filepath, 'r', encoding='utf-8') as f: + content = f.read() + content = content.lstrip('\ufeff') + lines = [line.rstrip() for line in content.splitlines()] + norm_lines = [] + prev_blank = False + for line in lines: + if line == '': + if not prev_blank: + norm_lines.append(line) + prev_blank = True + else: + norm_lines.append(line) + prev_blank = False + result = '\r\n'.join(norm_lines) + '\r\n' + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + result.encode('utf-8')) + +normalize_file('raids/eden_verse.html') + +with open('raids/index.html', 'r', encoding='utf-8') as f: + text = f.read() + +target = """ + 共鳴編 1〜4層 + Lv80 (IL470〜) + ノーマル / 零式 + ラムウ(チャージ)、イフリート&ガルーダ(合体)、ダークアイドル、シヴァ(光の暴走)。 + 準備中 + """ + +replacement = """ + 共鳴編 1〜4層 + Lv80 (IL470〜) + ノーマル / 零式 + ラムウ(チャージ)、イフリート&ガルーダ(合体)、ダークアイドル、シヴァ(光の暴走)。 + 攻略を見る ➜ + """ + +if target in text: + text = text.replace(target, replacement) + with open('raids/index.html', 'w', encoding='utf-8') as f: + f.write(text) + normalize_file('raids/index.html') + print("SUCCESS: Updated raids/index.html with Eden Verse link.") +else: + print("ERROR: Target string not found in raids/index.html") diff --git a/tools/update_emerald_weapon.py b/tools/update_emerald_weapon.py new file mode 100644 index 0000000..1980426 --- /dev/null +++ b/tools/update_emerald_weapon.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +import os +import sys + +def normalize_file(filepath): + with open(filepath, 'rb') as f: + raw = f.read() + content = raw.decode('utf-8', errors='replace').lstrip('\ufeff') + content = content.replace('\r\n', '\n').replace('\r', '\n') + lines = [line.rstrip(' \t') for line in content.split('\n')] + cleaned_lines = [] + prev_empty = False + for line in lines: + if line == '': + if not prev_empty: + cleaned_lines.append(line) + prev_empty = True + else: + cleaned_lines.append(line) + prev_empty = False + new_content = '\r\n'.join(cleaned_lines) + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + new_content.encode('utf-8')) + print(f"Normalized: {filepath}") + +index_path = 'trials/index.html' +with open(index_path, 'r', encoding='utf-8') as f: + lines = f.readlines() + +updated = False +for i, line in enumerate(lines): + if 'エメラルドウェポン破壊作戦' in line: + for k in range(i, i+6): + if '準備中' in lines[k]: + lines[k] = lines[k].replace('準備中', '攻略を見る ➜') + updated = True + print(f"Replaced line {k+1}") + break + if updated: + break + +if updated: + with open(index_path, 'w', encoding='utf-8') as f: + f.writelines(lines) + print("Successfully updated trials/index.html for emerald_weapon") +else: + print("Failed to find target row in trials/index.html") + +normalize_file('trials/index.html') +normalize_file('trials/emerald_weapon.html') diff --git a/tools/update_endsinger.py b/tools/update_endsinger.py new file mode 100644 index 0000000..7aad6ff --- /dev/null +++ b/tools/update_endsinger.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +import sys + +def normalize_file(filepath): + with open(filepath, 'r', encoding='utf-8') as f: + content = f.read() + content = content.lstrip('\ufeff') + lines = [line.rstrip() for line in content.splitlines()] + norm_lines = [] + prev_blank = False + for line in lines: + if line == '': + if not prev_blank: + norm_lines.append(line) + prev_blank = True + else: + norm_lines.append(line) + prev_blank = False + result = '\r\n'.join(norm_lines) + '\r\n' + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + result.encode('utf-8')) + +normalize_file('trials/the_endsinger.html') + +with open('trials/index.html', 'r', encoding='utf-8') as f: + text = f.read() + +target = """ + 終焉の戦い + Lv90 (IL540〜) + ノーマル (8人) + 【暁月ラスボス】 終焉を謳うもの。絶望の惑星激突、祈りのLB。 + 準備中 + """ + +replacement = """ + 終焉の戦い + Lv90 (IL540〜) + ノーマル (8人) + 【暁月ラスボス】 終焉を謳うもの。絶望の惑星激突、祈りのLB。 + 攻略を見る ➜ + """ + +if target in text: + text = text.replace(target, replacement) + with open('trials/index.html', 'w', encoding='utf-8') as f: + f.write(text) + normalize_file('trials/index.html') + print("SUCCESS: Updated trials/index.html with The Endsinger link.") +else: + print("ERROR: Target string not found in trials/index.html") diff --git a/tools/update_euphrosyne.py b/tools/update_euphrosyne.py new file mode 100644 index 0000000..32f9070 --- /dev/null +++ b/tools/update_euphrosyne.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +import sys + +def normalize_file(filepath): + with open(filepath, 'r', encoding='utf-8') as f: + content = f.read() + content = content.lstrip('\ufeff') + lines = [line.rstrip() for line in content.splitlines()] + norm_lines = [] + prev_blank = False + for line in lines: + if line == '': + if not prev_blank: + norm_lines.append(line) + prev_blank = True + else: + norm_lines.append(line) + prev_blank = False + result = '\r\n'.join(norm_lines) + '\r\n' + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + result.encode('utf-8')) + +normalize_file('raids/euphrosyne.html') + +with open('raids/index.html', 'r', encoding='utf-8') as f: + text = f.read() + +target = """ + 喜びの神域 エウプロシュネ + Lv90 (暁月6.x) + 24人 (A/B/C) + ノフィカ(豊穣床)、アルジク&ニメーヤ(カードスロウ)、ハルオーネ(氷槍)、メフィナ(月満ち欠け)。 + 準備中 + """ + +replacement = """ + 喜びの神域 エウプロシュネ + Lv90 (暁月6.x) + 24人 (A/B/C) + ノフィカ(豊穣床)、アルジク&ニメーヤ(カードスロウ)、ハルオーネ(氷槍)、メフィナ(月満ち欠け)。 + 攻略を見る ➜ + """ + +if target in text: + text = text.replace(target, replacement) + with open('raids/index.html', 'w', encoding='utf-8') as f: + f.write(text) + normalize_file('raids/index.html') + print("SUCCESS: Updated raids/index.html with Euphrosyne link.") +else: + print("ERROR: Target string not found in raids/index.html") diff --git a/tools/update_extreme_barbariccia.py b/tools/update_extreme_barbariccia.py new file mode 100644 index 0000000..2bae674 --- /dev/null +++ b/tools/update_extreme_barbariccia.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +import os +import sys + +def normalize_file(filepath): + with open(filepath, 'rb') as f: + raw = f.read() + content = raw.decode('utf-8', errors='replace').lstrip('\ufeff') + content = content.replace('\r\n', '\n').replace('\r', '\n') + lines = [line.rstrip(' \t') for line in content.split('\n')] + cleaned_lines = [] + prev_empty = False + for line in lines: + if line == '': + if not prev_empty: + cleaned_lines.append(line) + prev_empty = True + else: + cleaned_lines.append(line) + prev_empty = False + new_content = '\r\n'.join(cleaned_lines) + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + new_content.encode('utf-8')) + print(f"Normalized: {filepath}") + +index_path = 'trials/index.html' +with open(index_path, 'r', encoding='utf-8') as f: + lines = f.readlines() + +updated = False +for i, line in enumerate(lines): + if '極バルバリシア討滅戦' in line: + for k in range(i, i+6): + if '準備中' in lines[k]: + lines[k] = lines[k].replace('準備中', '攻略を見る ➜') + updated = True + print(f"Replaced line {k+1}") + break + if updated: + break + +if updated: + with open(index_path, 'w', encoding='utf-8') as f: + f.writelines(lines) + print("Successfully updated trials/index.html for extreme_barbariccia") +else: + print("Failed to find target row in trials/index.html") + +normalize_file('trials/index.html') +normalize_file('trials/extreme_barbariccia.html') diff --git a/tools/update_extreme_diamond.py b/tools/update_extreme_diamond.py new file mode 100644 index 0000000..c52de8f --- /dev/null +++ b/tools/update_extreme_diamond.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +import os +import sys + +def normalize_file(filepath): + with open(filepath, 'rb') as f: + raw = f.read() + content = raw.decode('utf-8', errors='replace').lstrip('\ufeff') + content = content.replace('\r\n', '\n').replace('\r', '\n') + lines = [line.rstrip(' \t') for line in content.split('\n')] + cleaned_lines = [] + prev_empty = False + for line in lines: + if line == '': + if not prev_empty: + cleaned_lines.append(line) + prev_empty = True + else: + cleaned_lines.append(line) + prev_empty = False + new_content = '\r\n'.join(cleaned_lines) + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + new_content.encode('utf-8')) + print(f"Normalized: {filepath}") + +index_path = 'trials/index.html' +with open(index_path, 'r', encoding='utf-8') as f: + lines = f.readlines() + +updated = False +for i, line in enumerate(lines): + if '極ダイヤウェポン破壊作戦' in line: + for k in range(i, i+6): + if '準備中' in lines[k]: + lines[k] = lines[k].replace('準備中', '攻略を見る ➜') + updated = True + print(f"Replaced line {k+1}") + break + if updated: + break + +if updated: + with open(index_path, 'w', encoding='utf-8') as f: + f.writelines(lines) + print("Successfully updated trials/index.html for extreme_diamond_weapon") +else: + print("Failed to find target row in trials/index.html") + +normalize_file('trials/index.html') +normalize_file('trials/extreme_diamond_weapon.html') diff --git a/tools/update_extreme_emerald.py b/tools/update_extreme_emerald.py new file mode 100644 index 0000000..ef23ab8 --- /dev/null +++ b/tools/update_extreme_emerald.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +import os +import sys + +def normalize_file(filepath): + with open(filepath, 'rb') as f: + raw = f.read() + content = raw.decode('utf-8', errors='replace').lstrip('\ufeff') + content = content.replace('\r\n', '\n').replace('\r', '\n') + lines = [line.rstrip(' \t') for line in content.split('\n')] + cleaned_lines = [] + prev_empty = False + for line in lines: + if line == '': + if not prev_empty: + cleaned_lines.append(line) + prev_empty = True + else: + cleaned_lines.append(line) + prev_empty = False + new_content = '\r\n'.join(cleaned_lines) + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + new_content.encode('utf-8')) + print(f"Normalized: {filepath}") + +index_path = 'trials/index.html' +with open(index_path, 'r', encoding='utf-8') as f: + lines = f.readlines() + +updated = False +for i, line in enumerate(lines): + if '極エメラルドウェポン破壊作戦' in line: + for k in range(i, i+6): + if '準備中' in lines[k]: + lines[k] = lines[k].replace('準備中', '攻略を見る ➜') + updated = True + print(f"Replaced line {k+1}") + break + if updated: + break + +if updated: + with open(index_path, 'w', encoding='utf-8') as f: + f.writelines(lines) + print("Successfully updated trials/index.html for extreme_emerald_weapon") +else: + print("Failed to find target row in trials/index.html") + +normalize_file('trials/index.html') +normalize_file('trials/extreme_emerald_weapon.html') diff --git a/tools/update_extreme_endsinger.py b/tools/update_extreme_endsinger.py new file mode 100644 index 0000000..6ea5a63 --- /dev/null +++ b/tools/update_extreme_endsinger.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +import sys + +def normalize_file(filepath): + with open(filepath, 'r', encoding='utf-8') as f: + content = f.read() + content = content.lstrip('\ufeff') + lines = [line.rstrip() for line in content.splitlines()] + norm_lines = [] + prev_blank = False + for line in lines: + if line == '': + if not prev_blank: + norm_lines.append(line) + prev_blank = True + else: + norm_lines.append(line) + prev_blank = False + result = '\r\n'.join(norm_lines) + '\r\n' + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + result.encode('utf-8')) + +normalize_file('trials/extreme_endsinger.html') + +with open('trials/index.html', 'r', encoding='utf-8') as f: + text = f.read() + +target = """ + 極終焉の戦い + Lv90 (IL580〜) + 極 (High-End) + 5連惑星衝突の精密安置見極め、テロス、絶望の合唱。 + 準備中 + """ + +replacement = """ + 極終焉の戦い + Lv90 (IL580〜) + 極 (High-End) + 5連惑星衝突の精密安置見極め、テロス、絶望の合唱。 + 攻略を見る ➜ + """ + +if target in text: + text = text.replace(target, replacement) + with open('trials/index.html', 'w', encoding='utf-8') as f: + f.write(text) + normalize_file('trials/index.html') + print("SUCCESS: Updated trials/index.html with Extreme Endsinger link.") +else: + print("ERROR: Target string not found in trials/index.html") diff --git a/tools/update_extreme_golbez.py b/tools/update_extreme_golbez.py new file mode 100644 index 0000000..b9846c4 --- /dev/null +++ b/tools/update_extreme_golbez.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +import os +import sys + +def normalize_file(filepath): + with open(filepath, 'rb') as f: + raw = f.read() + content = raw.decode('utf-8', errors='replace').lstrip('\ufeff') + content = content.replace('\r\n', '\n').replace('\r', '\n') + lines = [line.rstrip(' \t') for line in content.split('\n')] + cleaned_lines = [] + prev_empty = False + for line in lines: + if line == '': + if not prev_empty: + cleaned_lines.append(line) + prev_empty = True + else: + cleaned_lines.append(line) + prev_empty = False + new_content = '\r\n'.join(cleaned_lines) + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + new_content.encode('utf-8')) + print(f"Normalized: {filepath}") + +index_path = 'trials/index.html' +with open(index_path, 'r', encoding='utf-8') as f: + lines = f.readlines() + +updated = False +for i, line in enumerate(lines): + if '極ゴルベーザ討滅戦' in line: + for k in range(i, i+6): + if '準備中' in lines[k]: + lines[k] = lines[k].replace('準備中', '攻略を見る ➜') + updated = True + print(f"Replaced line {k+1}") + break + if updated: + break + +if updated: + with open(index_path, 'w', encoding='utf-8') as f: + f.writelines(lines) + print("Successfully updated trials/index.html for extreme_golbez") +else: + print("Failed to find target row in trials/index.html") + +normalize_file('trials/index.html') +normalize_file('trials/extreme_golbez.html') diff --git a/tools/update_extreme_hades.py b/tools/update_extreme_hades.py new file mode 100644 index 0000000..5221649 --- /dev/null +++ b/tools/update_extreme_hades.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +import sys + +def normalize_file(filepath): + with open(filepath, 'r', encoding='utf-8') as f: + content = f.read() + content = content.lstrip('\ufeff') + lines = [line.rstrip() for line in content.splitlines()] + norm_lines = [] + prev_blank = False + for line in lines: + if line == '': + if not prev_blank: + norm_lines.append(line) + prev_blank = True + else: + norm_lines.append(line) + prev_blank = False + result = '\r\n'.join(norm_lines) + '\r\n' + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + result.encode('utf-8')) + +normalize_file('trials/extreme_hades.html') + +with open('trials/index.html', 'r', encoding='utf-8') as f: + text = f.read() + +target = """ + 極ハーデス討滅戦 + Lv80 (IL450〜) + 極 (High-End) + アシエン三連星ギミック、法則改変、破滅の予兆。 + 準備中 + """ + +replacement = """ + 極ハーデス討滅戦 + Lv80 (IL450〜) + 極 (High-End) + アシエン三連星ギミック、法則改変、破滅の予兆。 + 攻略を見る ➜ + """ + +if target in text: + text = text.replace(target, replacement) + with open('trials/index.html', 'w', encoding='utf-8') as f: + f.write(text) + normalize_file('trials/index.html') + print("SUCCESS: Updated trials/index.html with Extreme Hades link.") +else: + print("ERROR: Target string not found in trials/index.html") diff --git a/tools/update_extreme_hydaelyn.py b/tools/update_extreme_hydaelyn.py new file mode 100644 index 0000000..fbacfa5 --- /dev/null +++ b/tools/update_extreme_hydaelyn.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +import sys + +def normalize_file(filepath): + with open(filepath, 'r', encoding='utf-8') as f: + content = f.read() + content = content.lstrip('\ufeff') + lines = [line.rstrip() for line in content.splitlines()] + norm_lines = [] + prev_blank = False + for line in lines: + if line == '': + if not prev_blank: + norm_lines.append(line) + prev_blank = True + else: + norm_lines.append(line) + prev_blank = False + result = '\r\n'.join(norm_lines) + '\r\n' + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + result.encode('utf-8')) + +normalize_file('trials/extreme_hydaelyn.html') + +with open('trials/index.html', 'r', encoding='utf-8') as f: + text = f.read() + +target = """ + 極ハイデリン討滅戦 + Lv90 (IL560〜) + 極 (High-End) + 武器切り替え時の高速安置判断、クリスタル破壊、光の波動。 + 準備中 + """ + +replacement = """ + 極ハイデリン討滅戦 + Lv90 (IL560〜) + 極 (High-End) + 武器切り替え時の高速安置判断、クリスタル破壊、光の波動。 + 攻略を見る ➜ + """ + +if target in text: + text = text.replace(target, replacement) + with open('trials/index.html', 'w', encoding='utf-8') as f: + f.write(text) + normalize_file('trials/index.html') + print("SUCCESS: Updated trials/index.html with Extreme Hydaelyn link.") +else: + print("ERROR: Target string not found in trials/index.html") diff --git a/tools/update_extreme_innocence.py b/tools/update_extreme_innocence.py new file mode 100644 index 0000000..2f6401a --- /dev/null +++ b/tools/update_extreme_innocence.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +import os +import sys + +def normalize_file(filepath): + with open(filepath, 'rb') as f: + raw = f.read() + content = raw.decode('utf-8', errors='replace').lstrip('\ufeff') + content = content.replace('\r\n', '\n').replace('\r', '\n') + lines = [line.rstrip(' \t') for line in content.split('\n')] + cleaned_lines = [] + prev_empty = False + for line in lines: + if line == '': + if not prev_empty: + cleaned_lines.append(line) + prev_empty = True + else: + cleaned_lines.append(line) + prev_empty = False + new_content = '\r\n'.join(cleaned_lines) + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + new_content.encode('utf-8')) + print(f"Normalized: {filepath}") + +index_path = 'trials/index.html' +with open(index_path, 'r', encoding='utf-8') as f: + lines = f.readlines() + +updated = False +for i, line in enumerate(lines): + if '極イノセンス討滅戦' in line: + for k in range(i, i+6): + if '準備中' in lines[k]: + lines[k] = lines[k].replace('準備中', '攻略を見る ➜') + updated = True + print(f"Replaced line {k+1}") + break + if updated: + break + +if updated: + with open(index_path, 'w', encoding='utf-8') as f: + f.writelines(lines) + print("Successfully updated trials/index.html for extreme_innocence") +else: + print("Failed to find target row in trials/index.html") + +normalize_file('trials/index.html') +normalize_file('trials/extreme_innocence.html') diff --git a/tools/update_extreme_lakshmi.py b/tools/update_extreme_lakshmi.py new file mode 100644 index 0000000..3ec3a5f --- /dev/null +++ b/tools/update_extreme_lakshmi.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +import os +import sys + +def normalize_file(filepath): + with open(filepath, 'rb') as f: + raw = f.read() + content = raw.decode('utf-8', errors='replace').lstrip('\ufeff') + content = content.replace('\r\n', '\n').replace('\r', '\n') + lines = [line.rstrip(' \t') for line in content.split('\n')] + cleaned_lines = [] + prev_empty = False + for line in lines: + if line == '': + if not prev_empty: + cleaned_lines.append(line) + prev_empty = True + else: + cleaned_lines.append(line) + prev_empty = False + new_content = '\r\n'.join(cleaned_lines) + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + new_content.encode('utf-8')) + print(f"Normalized: {filepath}") + +index_path = 'trials/index.html' +with open(index_path, 'r', encoding='utf-8') as f: + lines = f.readlines() + +updated = False +for i, line in enumerate(lines): + if '極ラクシュミ討滅戦' in line: + for k in range(i, i+6): + if '準備中' in lines[k]: + lines[k] = lines[k].replace('準備中', '攻略を見る ➜') + updated = True + print(f"Replaced line {k+1}") + break + if updated: + break + +if updated: + with open(index_path, 'w', encoding='utf-8') as f: + f.writelines(lines) + print("Successfully updated trials/index.html for extreme_lakshmi") +else: + print("Failed to find target row in trials/index.html") + +normalize_file('trials/index.html') +normalize_file('trials/extreme_lakshmi.html') diff --git a/tools/update_extreme_rubicante.py b/tools/update_extreme_rubicante.py new file mode 100644 index 0000000..b31ca7d --- /dev/null +++ b/tools/update_extreme_rubicante.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +import os +import sys + +def normalize_file(filepath): + with open(filepath, 'rb') as f: + raw = f.read() + content = raw.decode('utf-8', errors='replace').lstrip('\ufeff') + content = content.replace('\r\n', '\n').replace('\r', '\n') + lines = [line.rstrip(' \t') for line in content.split('\n')] + cleaned_lines = [] + prev_empty = False + for line in lines: + if line == '': + if not prev_empty: + cleaned_lines.append(line) + prev_empty = True + else: + cleaned_lines.append(line) + prev_empty = False + new_content = '\r\n'.join(cleaned_lines) + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + new_content.encode('utf-8')) + print(f"Normalized: {filepath}") + +index_path = 'trials/index.html' +with open(index_path, 'r', encoding='utf-8') as f: + lines = f.readlines() + +updated = False +for i, line in enumerate(lines): + if '極ルビカンテ討滅戦' in line: + for k in range(i, i+6): + if '準備中' in lines[k]: + lines[k] = lines[k].replace('準備中', '攻略を見る ➜') + updated = True + print(f"Replaced line {k+1}") + break + if updated: + break + +if updated: + with open(index_path, 'w', encoding='utf-8') as f: + f.writelines(lines) + print("Successfully updated trials/index.html for extreme_rubicante") +else: + print("Failed to find target row in trials/index.html") + +normalize_file('trials/index.html') +normalize_file('trials/extreme_rubicante.html') diff --git a/tools/update_extreme_ruby_weapon.py b/tools/update_extreme_ruby_weapon.py new file mode 100644 index 0000000..573a301 --- /dev/null +++ b/tools/update_extreme_ruby_weapon.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +import os +import sys + +def normalize_file(filepath): + with open(filepath, 'rb') as f: + raw = f.read() + content = raw.decode('utf-8', errors='replace').lstrip('\ufeff') + content = content.replace('\r\n', '\n').replace('\r', '\n') + lines = [line.rstrip(' \t') for line in content.split('\n')] + cleaned_lines = [] + prev_empty = False + for line in lines: + if line == '': + if not prev_empty: + cleaned_lines.append(line) + prev_empty = True + else: + cleaned_lines.append(line) + prev_empty = False + new_content = '\r\n'.join(cleaned_lines) + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + new_content.encode('utf-8')) + print(f"Normalized: {filepath}") + +index_path = 'trials/index.html' +with open(index_path, 'r', encoding='utf-8') as f: + lines = f.readlines() + +updated = False +for i, line in enumerate(lines): + if '極ルビーウェポン破壊作戦' in line: + for k in range(i, i+6): + if '準備中' in lines[k]: + lines[k] = lines[k].replace('準備中', '攻略を見る ➜') + updated = True + print(f"Replaced line {k+1}") + break + if updated: + break + +if updated: + with open(index_path, 'w', encoding='utf-8') as f: + f.writelines(lines) + print("Successfully updated trials/index.html for extreme_ruby_weapon") +else: + print("Failed to find target row in trials/index.html") + +normalize_file('trials/index.html') +normalize_file('trials/extreme_ruby_weapon.html') diff --git a/tools/update_extreme_shinryu.py b/tools/update_extreme_shinryu.py new file mode 100644 index 0000000..3962686 --- /dev/null +++ b/tools/update_extreme_shinryu.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +import os +import sys + +def normalize_file(filepath): + with open(filepath, 'rb') as f: + raw = f.read() + content = raw.decode('utf-8', errors='replace').lstrip('\ufeff') + content = content.replace('\r\n', '\n').replace('\r', '\n') + lines = [line.rstrip(' \t') for line in content.split('\n')] + cleaned_lines = [] + prev_empty = False + for line in lines: + if line == '': + if not prev_empty: + cleaned_lines.append(line) + prev_empty = True + else: + cleaned_lines.append(line) + prev_empty = False + new_content = '\r\n'.join(cleaned_lines) + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + new_content.encode('utf-8')) + print(f"Normalized: {filepath}") + +index_path = 'trials/index.html' +with open(index_path, 'r', encoding='utf-8') as f: + lines = f.readlines() + +updated = False +for i, line in enumerate(lines): + if '極神龍討滅戦' in line: + for k in range(i, i+6): + if '準備中' in lines[k]: + lines[k] = lines[k].replace('準備中', '攻略を見る ➜') + updated = True + print(f"Replaced line {k+1}") + break + if updated: + break + +if updated: + with open(index_path, 'w', encoding='utf-8') as f: + f.writelines(lines) + print("Successfully updated trials/index.html for extreme_shinryu") +else: + print("Failed to find target row in trials/index.html") + +normalize_file('trials/index.html') +normalize_file('trials/extreme_shinryu.html') diff --git a/tools/update_extreme_susano.py b/tools/update_extreme_susano.py new file mode 100644 index 0000000..45629d2 --- /dev/null +++ b/tools/update_extreme_susano.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +import os +import sys + +def normalize_file(filepath): + with open(filepath, 'rb') as f: + raw = f.read() + content = raw.decode('utf-8', errors='replace').lstrip('\ufeff') + content = content.replace('\r\n', '\n').replace('\r', '\n') + lines = [line.rstrip(' \t') for line in content.split('\n')] + cleaned_lines = [] + prev_empty = False + for line in lines: + if line == '': + if not prev_empty: + cleaned_lines.append(line) + prev_empty = True + else: + cleaned_lines.append(line) + prev_empty = False + new_content = '\r\n'.join(cleaned_lines) + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + new_content.encode('utf-8')) + print(f"Normalized: {filepath}") + +index_path = 'trials/index.html' +with open(index_path, 'r', encoding='utf-8') as f: + lines = f.readlines() + +updated = False +for i, line in enumerate(lines): + if '極スサノオ討滅戦' in line: + for k in range(i, i+6): + if '準備中' in lines[k]: + lines[k] = lines[k].replace('準備中', '攻略を見る ➜') + updated = True + print(f"Replaced line {k+1}") + break + if updated: + break + +if updated: + with open(index_path, 'w', encoding='utf-8') as f: + f.writelines(lines) + print("Successfully updated trials/index.html for extreme_susano") +else: + print("Failed to find target row in trials/index.html") + +normalize_file('trials/index.html') +normalize_file('trials/extreme_susano.html') diff --git a/tools/update_extreme_titania.py b/tools/update_extreme_titania.py new file mode 100644 index 0000000..7f0323a --- /dev/null +++ b/tools/update_extreme_titania.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +import os +import sys + +def normalize_file(filepath): + with open(filepath, 'rb') as f: + raw = f.read() + content = raw.decode('utf-8', errors='replace').lstrip('\ufeff') + content = content.replace('\r\n', '\n').replace('\r', '\n') + lines = [line.rstrip(' \t') for line in content.split('\n')] + cleaned_lines = [] + prev_empty = False + for line in lines: + if line == '': + if not prev_empty: + cleaned_lines.append(line) + prev_empty = True + else: + cleaned_lines.append(line) + prev_empty = False + new_content = '\r\n'.join(cleaned_lines) + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + new_content.encode('utf-8')) + print(f"Normalized: {filepath}") + +index_path = 'trials/index.html' +with open(index_path, 'r', encoding='utf-8') as f: + lines = f.readlines() + +updated = False +for i, line in enumerate(lines): + if '極ティターニア討滅戦' in line: + for k in range(i, i+6): + if '準備中' in lines[k]: + lines[k] = lines[k].replace('準備中', '攻略を見る ➜') + updated = True + print(f"Replaced line {k+1}") + break + if updated: + break + +if updated: + with open(index_path, 'w', encoding='utf-8') as f: + f.writelines(lines) + print("Successfully updated trials/index.html for extreme_titania") +else: + print("Failed to find target row in trials/index.html") + +normalize_file('trials/index.html') +normalize_file('trials/extreme_titania.html') diff --git a/tools/update_extreme_tsukuyomi.py b/tools/update_extreme_tsukuyomi.py new file mode 100644 index 0000000..ee24f39 --- /dev/null +++ b/tools/update_extreme_tsukuyomi.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +import os +import sys + +def normalize_file(filepath): + with open(filepath, 'rb') as f: + raw = f.read() + content = raw.decode('utf-8', errors='replace').lstrip('\ufeff') + content = content.replace('\r\n', '\n').replace('\r', '\n') + lines = [line.rstrip(' \t') for line in content.split('\n')] + cleaned_lines = [] + prev_empty = False + for line in lines: + if line == '': + if not prev_empty: + cleaned_lines.append(line) + prev_empty = True + else: + cleaned_lines.append(line) + prev_empty = False + new_content = '\r\n'.join(cleaned_lines) + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + new_content.encode('utf-8')) + print(f"Normalized: {filepath}") + +index_path = 'trials/index.html' +with open(index_path, 'r', encoding='utf-8') as f: + lines = f.readlines() + +updated = False +for i, line in enumerate(lines): + if '極ツクヨミ討滅戦' in line: + for k in range(i, i+6): + if '準備中' in lines[k]: + lines[k] = lines[k].replace('準備中', '攻略を見る ➜') + updated = True + print(f"Replaced line {k+1}") + break + if updated: + break + +if updated: + with open(index_path, 'w', encoding='utf-8') as f: + f.writelines(lines) + print("Successfully updated trials/index.html for extreme_tsukuyomi") +else: + print("Failed to find target row in trials/index.html") + +normalize_file('trials/index.html') +normalize_file('trials/extreme_tsukuyomi.html') diff --git a/tools/update_extreme_wol.py b/tools/update_extreme_wol.py new file mode 100644 index 0000000..965ca39 --- /dev/null +++ b/tools/update_extreme_wol.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +import os +import sys + +def normalize_file(filepath): + with open(filepath, 'rb') as f: + raw = f.read() + content = raw.decode('utf-8', errors='replace').lstrip('\ufeff') + content = content.replace('\r\n', '\n').replace('\r', '\n') + lines = [line.rstrip(' \t') for line in content.split('\n')] + cleaned_lines = [] + prev_empty = False + for line in lines: + if line == '': + if not prev_empty: + cleaned_lines.append(line) + prev_empty = True + else: + cleaned_lines.append(line) + prev_empty = False + new_content = '\r\n'.join(cleaned_lines) + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + new_content.encode('utf-8')) + print(f"Normalized: {filepath}") + +index_path = 'trials/index.html' +with open(index_path, 'r', encoding='utf-8') as f: + lines = f.readlines() + +updated = False +for i, line in enumerate(lines): + if '極ウォーリア・オブ・ライト討滅戦' in line: + for k in range(i, i+6): + if '準備中' in lines[k]: + lines[k] = lines[k].replace('準備中', '攻略を見る ➜') + updated = True + print(f"Replaced line {k+1}") + break + if updated: + break + +if updated: + with open(index_path, 'w', encoding='utf-8') as f: + f.writelines(lines) + print("Successfully updated trials/index.html for extreme_warrior_of_light") +else: + print("Failed to find target row in trials/index.html") + +normalize_file('trials/index.html') +normalize_file('trials/extreme_warrior_of_light.html') diff --git a/tools/update_extreme_zeromus.py b/tools/update_extreme_zeromus.py new file mode 100644 index 0000000..4d2bb52 --- /dev/null +++ b/tools/update_extreme_zeromus.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +import os +import sys + +def normalize_file(filepath): + with open(filepath, 'rb') as f: + raw = f.read() + content = raw.decode('utf-8', errors='replace').lstrip('\ufeff') + content = content.replace('\r\n', '\n').replace('\r', '\n') + lines = [line.rstrip(' \t') for line in content.split('\n')] + cleaned_lines = [] + prev_empty = False + for line in lines: + if line == '': + if not prev_empty: + cleaned_lines.append(line) + prev_empty = True + else: + cleaned_lines.append(line) + prev_empty = False + new_content = '\r\n'.join(cleaned_lines) + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + new_content.encode('utf-8')) + print(f"Normalized: {filepath}") + +index_path = 'trials/index.html' +with open(index_path, 'r', encoding='utf-8') as f: + lines = f.readlines() + +updated = False +for i, line in enumerate(lines): + if '極ゼロムス討滅戦' in line: + for k in range(i, i+6): + if '準備中' in lines[k]: + lines[k] = lines[k].replace('準備中', '攻略を見る ➜') + updated = True + print(f"Replaced line {k+1}") + break + if updated: + break + +if updated: + with open(index_path, 'w', encoding='utf-8') as f: + f.writelines(lines) + print("Successfully updated trials/index.html for extreme_zeromus") +else: + print("Failed to find target row in trials/index.html") + +normalize_file('trials/index.html') +normalize_file('trials/extreme_zeromus.html') diff --git a/tools/update_extreme_zodiark.py b/tools/update_extreme_zodiark.py new file mode 100644 index 0000000..4abec26 --- /dev/null +++ b/tools/update_extreme_zodiark.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +import sys + +def normalize_file(filepath): + with open(filepath, 'r', encoding='utf-8') as f: + content = f.read() + content = content.lstrip('\ufeff') + lines = [line.rstrip() for line in content.splitlines()] + norm_lines = [] + prev_blank = False + for line in lines: + if line == '': + if not prev_blank: + norm_lines.append(line) + prev_blank = True + else: + norm_lines.append(line) + prev_blank = False + result = '\r\n'.join(norm_lines) + '\r\n' + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + result.encode('utf-8')) + +normalize_file('trials/extreme_zodiark.html') + +with open('trials/index.html', 'r', encoding='utf-8') as f: + text = f.read() + +target = """ + 極ゾディアーク討滅戦 + Lv90 (IL560〜) + 極 (High-End) + ステージ回転ギミック完全見極め、リンクス・オブ・ダークネス。 + 準備中 + """ + +replacement = """ + 極ゾディアーク討滅戦 + Lv90 (IL560〜) + 極 (High-End) + ステージ回転ギミック完全見極め、リンクス・オブ・ダークネス。 + 攻略を見る ➜ + """ + +if target in text: + text = text.replace(target, replacement) + with open('trials/index.html', 'w', encoding='utf-8') as f: + f.write(text) + normalize_file('trials/index.html') + print("SUCCESS: Updated trials/index.html with Extreme Zodiark link.") +else: + print("ERROR: Target string not found in trials/index.html") diff --git a/tools/update_faux_byakko.py b/tools/update_faux_byakko.py new file mode 100644 index 0000000..217a922 --- /dev/null +++ b/tools/update_faux_byakko.py @@ -0,0 +1,43 @@ +import sys + +def main(): + with open('trials/index.html', 'r', encoding='utf-8-sig') as f: + content = f.read() + + target = """ + 幻白虎討滅戦(現行パッチ開催) + Lv100 (ILシンク) + 幻討滅戦 + 極白虎を最新Lv100で再現。ソーチョーの幻想盤、高額マウント・ミニオン。 + 準備中 + """ + + replacement = """ + 幻白虎討滅戦(現行パッチ開催) + Lv100 (ILシンク) + 幻討滅戦 + 極白虎を最新Lv100で再現。ソーチョーの幻想盤、高額マウント・ミニオン。 + 攻略を見る ➜ + """ + + 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('trials/index.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + content_clean.encode('utf-8')) + + with open('trials/faux_byakko.html', 'r', encoding='utf-8-sig') as f: + faux = f.read() + faux_lines = [line.rstrip() for line in faux.splitlines()] + faux_clean = '\r\n'.join(faux_lines) + '\r\n' + with open('trials/faux_byakko.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + faux_clean.encode('utf-8')) + + print("幻白虎討滅戦のリンク更新および正規化が完了しました。") + +if __name__ == '__main__': + main() diff --git a/tools/update_gilgamesh.py b/tools/update_gilgamesh.py new file mode 100644 index 0000000..dd7ec22 --- /dev/null +++ b/tools/update_gilgamesh.py @@ -0,0 +1,43 @@ +import sys + +def main(): + with open('trials/index.html', 'r', encoding='utf-8-sig') as f: + content = f.read() + + target = """ + ギルガメッシュ討伐戦 / 真ギルガメッシュ + Lv50 (IL50〜/90〜) + ノーマル / 真 + エンキドゥとの共闘。ニワトリ化デバフ、カエル変化。 + 準備中 + """ + + replacement = """ + ギルガメッシュ討伐戦 / 真ギルガメッシュ + Lv50 (IL50〜/90〜) + ノーマル / 真 + エンキドゥとの共闘。ニワトリ化デバフ、カエル変化。 + 攻略を見る ➜ + """ + + 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('trials/index.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + content_clean.encode('utf-8')) + + with open('trials/gilgamesh.html', 'r', encoding='utf-8-sig') as f: + gil = f.read() + gil_lines = [line.rstrip() for line in gil.splitlines()] + gil_clean = '\r\n'.join(gil_lines) + '\r\n' + with open('trials/gilgamesh.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + gil_clean.encode('utf-8')) + + print("ギルガメッシュのリンク更新および正規化が完了しました。") + +if __name__ == '__main__': + main() diff --git a/tools/update_golbez.py b/tools/update_golbez.py new file mode 100644 index 0000000..a7d142b --- /dev/null +++ b/tools/update_golbez.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +import os +import sys + +def normalize_file(filepath): + with open(filepath, 'rb') as f: + raw = f.read() + content = raw.decode('utf-8', errors='replace').lstrip('\ufeff') + content = content.replace('\r\n', '\n').replace('\r', '\n') + lines = [line.rstrip(' \t') for line in content.split('\n')] + cleaned_lines = [] + prev_empty = False + for line in lines: + if line == '': + if not prev_empty: + cleaned_lines.append(line) + prev_empty = True + else: + cleaned_lines.append(line) + prev_empty = False + new_content = '\r\n'.join(cleaned_lines) + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + new_content.encode('utf-8')) + print(f"Normalized: {filepath}") + +index_path = 'trials/index.html' +with open(index_path, 'r', encoding='utf-8') as f: + lines = f.readlines() + +updated = False +for i, line in enumerate(lines): + if 'ゴルベーザ討滅戦' in line: + for k in range(i, i+6): + if '準備中' in lines[k]: + lines[k] = lines[k].replace('準備中', '攻略を見る ➜') + updated = True + print(f"Replaced line {k+1}") + break + if updated: + break + +if updated: + with open(index_path, 'w', encoding='utf-8') as f: + f.writelines(lines) + print("Successfully updated trials/index.html for golbez") +else: + print("Failed to find target row in trials/index.html") + +normalize_file('trials/index.html') +normalize_file('trials/golbez.html') diff --git a/tools/update_good_king_moggle_mog.py b/tools/update_good_king_moggle_mog.py new file mode 100644 index 0000000..04c3e2a --- /dev/null +++ b/tools/update_good_king_moggle_mog.py @@ -0,0 +1,43 @@ +import sys + +def main(): + with open('trials/index.html', 'r', encoding='utf-8-sig') as f: + content = f.read() + + target = """ + 善王モグル・モグXII世 / 極モグ + Lv50 (IL54〜/80〜) + 真 / 極 (8人) + 家臣モグ7体のHP削り調整、闘魂注入、メメント・モーグリ。 + 準備中 + """ + + replacement = """ + 善王モグル・モグXII世 / 極モグ + Lv50 (IL54〜/80〜) + 真 / 極 (8人) + 家臣モグ7体のHP削り調整、闘魂注入、メメント・モーグリ。 + 攻略を見る ➜ + """ + + 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('trials/index.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + content_clean.encode('utf-8')) + + with open('trials/good_king_moggle_mog.html', 'r', encoding='utf-8-sig') as f: + mog = f.read() + mog_lines = [line.rstrip() for line in mog.splitlines()] + mog_clean = '\r\n'.join(mog_lines) + '\r\n' + with open('trials/good_king_moggle_mog.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + mog_clean.encode('utf-8')) + + print("善王モグル・モグXII世のリンク更新および正規化が完了しました。") + +if __name__ == '__main__': + main() diff --git a/tools/update_grand_cosmos.py b/tools/update_grand_cosmos.py new file mode 100644 index 0000000..450a8cb --- /dev/null +++ b/tools/update_grand_cosmos.py @@ -0,0 +1,43 @@ +import sys + +def main(): + with open('dungeons/index.html', 'r', encoding='utf-8-sig') as f: + content = f.read() + + target = """ + 魔法宮殿 グラン・コスモス + Lv80 (IL430〜) + 対応 + パッチ5.1メインID。家具燃やしギミック、ホウキの誘導掃除、ルゴス。 + 準備中 + """ + + replacement = """ + 魔法宮殿 グラン・コスモス + Lv80 (IL430〜) + 対応 + パッチ5.1メインID。家具燃やしギミック、ホウキの誘導掃除、ルゴス。 + 攻略を見る ➜ + """ + + 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/grand_cosmos.html', 'r', encoding='utf-8-sig') as f: + gra = f.read() + gra_lines = [line.rstrip() for line in gra.splitlines()] + gra_clean = '\r\n'.join(gra_lines) + '\r\n' + with open('dungeons/grand_cosmos.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + gra_clean.encode('utf-8')) + + print("魔法宮殿 グラン・コスモスのリンク更新および正規化が完了しました。") + +if __name__ == '__main__': + main() diff --git a/tools/update_heroes_gauntlet.py b/tools/update_heroes_gauntlet.py new file mode 100644 index 0000000..85019e8 --- /dev/null +++ b/tools/update_heroes_gauntlet.py @@ -0,0 +1,43 @@ +import sys + +def main(): + with open('dungeons/index.html', 'r', encoding='utf-8-sig') as f: + content = f.read() + + target = """ + 漆黒決戦 ノルヴラント + Lv80 (IL460〜) + 対応 + パッチ5.3メインID。ノルヴラント全土の決戦。幻影の英雄たちとの激突。 + 準備中 + """ + + replacement = """ + 漆黒決戦 ノルヴラント + Lv80 (IL460〜) + 対応 + パッチ5.3メインID。ノルヴラント全土の決戦。幻影の英雄たちとの激突。 + 攻略を見る ➜ + """ + + 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/heroes_gauntlet.html', 'r', encoding='utf-8-sig') as f: + her = f.read() + her_lines = [line.rstrip() for line in her.splitlines()] + her_clean = '\r\n'.join(her_lines) + '\r\n' + with open('dungeons/heroes_gauntlet.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + her_clean.encode('utf-8')) + + print("漆黒決戦 ノルヴラントのリンク更新および正規化が完了しました。") + +if __name__ == '__main__': + main() diff --git a/tools/update_holminster.py b/tools/update_holminster.py new file mode 100644 index 0000000..608e491 --- /dev/null +++ b/tools/update_holminster.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +import sys + +def normalize_file(filepath): + with open(filepath, 'r', encoding='utf-8') as f: + content = f.read() + content = content.lstrip('\ufeff') + lines = [line.rstrip() for line in content.splitlines()] + norm_lines = [] + prev_blank = False + for line in lines: + if line == '': + if not prev_blank: + norm_lines.append(line) + prev_blank = True + else: + norm_lines.append(line) + prev_blank = False + result = '\r\n'.join(norm_lines) + '\r\n' + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + result.encode('utf-8')) + +normalize_file('dungeons/holminster_switch.html') + +with open('dungeons/index.html', 'r', encoding='utf-8') as f: + text = f.read() + +target = """ + 殺戮郷村 ホルミンスター + Lv71 (IL370〜) + 対応 + 漆黒フェイス初解禁ID。罪喰いの襲撃、フィリアの不可視回転突進。 + 準備中 + """ + +replacement = """ + 殺戮郷村 ホルミンスター + Lv71 (IL370〜) + 対応 + 漆黒フェイス初解禁ID。罪喰いの襲撃、フィリアの不可視回転突進。 + 攻略を見る ➜ + """ + +if target in text: + text = text.replace(target, replacement) + with open('dungeons/index.html', 'w', encoding='utf-8') as f: + f.write(text) + normalize_file('dungeons/index.html') + print("SUCCESS: Updated dungeons/index.html with Holminster link.") +else: + print("ERROR: Target string not found in dungeons/index.html") diff --git a/tools/update_innocence.py b/tools/update_innocence.py new file mode 100644 index 0000000..9ce1d57 --- /dev/null +++ b/tools/update_innocence.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +import os +import sys + +def normalize_file(filepath): + with open(filepath, 'rb') as f: + raw = f.read() + content = raw.decode('utf-8', errors='replace').lstrip('\ufeff') + content = content.replace('\r\n', '\n').replace('\r', '\n') + lines = [line.rstrip(' \t') for line in content.split('\n')] + cleaned_lines = [] + prev_empty = False + for line in lines: + if line == '': + if not prev_empty: + cleaned_lines.append(line) + prev_empty = True + else: + cleaned_lines.append(line) + prev_empty = False + new_content = '\r\n'.join(cleaned_lines) + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + new_content.encode('utf-8')) + print(f"Normalized: {filepath}") + +index_path = 'trials/index.html' +with open(index_path, 'r', encoding='utf-8') as f: + lines = f.readlines() + +updated = False +for i, line in enumerate(lines): + if 'イノセンス討滅戦' in line: + for k in range(i, i+6): + if '準備中' in lines[k]: + lines[k] = lines[k].replace('準備中', '攻略を見る ➜') + updated = True + print(f"Replaced line {k+1}") + break + if updated: + break + +if updated: + with open(index_path, 'w', encoding='utf-8') as f: + f.writelines(lines) + print("Successfully updated trials/index.html for innocence") +else: + print("Failed to find target row in trials/index.html") + +normalize_file('trials/index.html') +normalize_file('trials/innocence.html') diff --git a/tools/update_ktisis.py b/tools/update_ktisis.py new file mode 100644 index 0000000..9949457 --- /dev/null +++ b/tools/update_ktisis.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +import sys + +def normalize_file(filepath): + with open(filepath, 'r', encoding='utf-8') as f: + content = f.read() + content = content.lstrip('\ufeff') + lines = [line.rstrip() for line in content.splitlines()] + norm_lines = [] + prev_blank = False + for line in lines: + if line == '': + if not prev_blank: + norm_lines.append(line) + prev_blank = True + else: + norm_lines.append(line) + prev_blank = False + result = '\r\n'.join(norm_lines) + '\r\n' + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + result.encode('utf-8')) + +normalize_file('dungeons/ktisis_hyperboreia.html') + +with open('dungeons/index.html', 'r', encoding='utf-8') as f: + text = f.read() + +target = """ + 創造環境 ヒュペルボレア造物院 + Lv87 (IL515〜) + 対応 + エルピスの研究施設。古代人(エメトセルク、ヒュトロダエウス、ヴェーネス)と共闘可能。 + 準備中 + """ + +replacement = """ + 創造環境 ヒュペルボレア造物院 + Lv87 (IL515〜) + 対応 + エルピスの研究施設。古代人(エメトセルク、ヒュトロダエウス、ヴェーネス)と共闘可能。 + 攻略を見る ➜ + """ + +if target in text: + text = text.replace(target, replacement) + with open('dungeons/index.html', 'w', encoding='utf-8') as f: + f.write(text) + normalize_file('dungeons/index.html') + print("SUCCESS: Updated dungeons/index.html with Ktisis Hyperboreia link.") +else: + print("ERROR: Target string not found in dungeons/index.html") diff --git a/tools/update_kugane_castle.py b/tools/update_kugane_castle.py new file mode 100644 index 0000000..505c77f --- /dev/null +++ b/tools/update_kugane_castle.py @@ -0,0 +1,43 @@ +import sys + +def main(): + with open('dungeons/index.html', 'r', encoding='utf-8-sig') as f: + content = f.read() + + target = """ + 悪党成敗 クガネ城 + Lv70 (IL280〜) + 非対応 + 反乱浪士の立てこもり。からくり人形、ヨウジンボウ(小判拾い)。 + 準備中 + """ + + replacement = """ + 悪党成敗 クガネ城 + Lv70 (IL280〜) + 非対応 + 反乱浪士の立てこもり。からくり人形、ヨウジンボウ(小判拾い)。 + 攻略を見る ➜ + """ + + 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/kugane_castle.html', 'r', encoding='utf-8-sig') as f: + kug = f.read() + kug_lines = [line.rstrip() for line in kug.splitlines()] + kug_clean = '\r\n'.join(kug_lines) + '\r\n' + with open('dungeons/kugane_castle.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + kug_clean.encode('utf-8')) + + print("悪党成敗 クガネ城のリンク更新および正規化が完了しました。") + +if __name__ == '__main__': + main() diff --git a/tools/update_lakshmi.py b/tools/update_lakshmi.py new file mode 100644 index 0000000..e6ab119 --- /dev/null +++ b/tools/update_lakshmi.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +import os +import sys + +def normalize_file(filepath): + with open(filepath, 'rb') as f: + raw = f.read() + content = raw.decode('utf-8', errors='replace').lstrip('\ufeff') + content = content.replace('\r\n', '\n').replace('\r', '\n') + lines = [line.rstrip(' \t') for line in content.split('\n')] + cleaned_lines = [] + prev_empty = False + for line in lines: + if line == '': + if not prev_empty: + cleaned_lines.append(line) + prev_empty = True + else: + cleaned_lines.append(line) + prev_empty = False + new_content = '\r\n'.join(cleaned_lines) + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + new_content.encode('utf-8')) + print(f"Normalized: {filepath}") + +index_path = 'trials/index.html' +with open(index_path, 'r', encoding='utf-8') as f: + lines = f.readlines() + +updated = False +for i, line in enumerate(lines): + if 'ラクシュミ討滅戦' in line: + for k in range(i, i+6): + if '準備中' in lines[k]: + lines[k] = lines[k].replace('準備中', '攻略を見る ➜') + updated = True + print(f"Replaced line {k+1}") + break + if updated: + break + +if updated: + with open(index_path, 'w', encoding='utf-8') as f: + f.writelines(lines) + print("Successfully updated trials/index.html for lakshmi") +else: + print("Failed to find target row in trials/index.html") + +normalize_file('trials/index.html') +normalize_file('trials/lakshmi.html') diff --git a/tools/update_lapis_manalis.py b/tools/update_lapis_manalis.py new file mode 100644 index 0000000..1bac736 --- /dev/null +++ b/tools/update_lapis_manalis.py @@ -0,0 +1,43 @@ +import sys + +def main(): + with open('dungeons/index.html', 'r', encoding='utf-8-sig') as f: + content = f.read() + + target = """ + 雪山冥洞 ラピス・マナリス + Lv90 (IL605〜) + 対応 + パッチ6.3メインID。ガレマルド山岳部・リーパー発祥の地。カイナッツォ前哨戦。 + 準備中 + """ + + replacement = """ + 雪山冥洞 ラピス・マナリス + Lv90 (IL605〜) + 対応 + パッチ6.3メインID。ガレマルド山岳部・リーパー発祥の地。カイナッツォ前哨戦。 + 攻略を見る ➜ + """ + + 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/lapis_manalis.html', 'r', encoding='utf-8-sig') as f: + lap = f.read() + lap_lines = [line.rstrip() for line in lap.splitlines()] + lap_clean = '\r\n'.join(lap_lines) + '\r\n' + with open('dungeons/lapis_manalis.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + lap_clean.encode('utf-8')) + + print("雪山冥洞 ラピス・マナリスのリンク更新および正規化が完了しました。") + +if __name__ == '__main__': + main() diff --git a/tools/update_leviathan.py b/tools/update_leviathan.py new file mode 100644 index 0000000..04801d2 --- /dev/null +++ b/tools/update_leviathan.py @@ -0,0 +1,43 @@ +import sys + +def main(): + with open('trials/index.html', 'r', encoding='utf-8-sig') as f: + content = f.read() + + target = """ + 真リヴァイアサン / 極リヴァイアサン + Lv50 (IL60〜/80〜) + 真 / 極 (8人) + 船体傾斜(柵破壊・落下死)、水神のヴェール、サハギン増援。 + 準備中 + """ + + replacement = """ + 真リヴァイアサン / 極リヴァイアサン + Lv50 (IL60〜/80〜) + 真 / 極 (8人) + 船体傾斜(柵破壊・落下死)、水神のヴェール、サハギン増援。 + 攻略を見る ➜ + """ + + 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('trials/index.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + content_clean.encode('utf-8')) + + with open('trials/leviathan.html', 'r', encoding='utf-8-sig') as f: + levi = f.read() + levi_lines = [line.rstrip() for line in levi.splitlines()] + levi_clean = '\r\n'.join(levi_lines) + '\r\n' + with open('trials/leviathan.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + levi_clean.encode('utf-8')) + + print("真リヴァイアサンのリンク更新および正規化が完了しました。") + +if __name__ == '__main__': + main() diff --git a/tools/update_lh1.py b/tools/update_lh1.py new file mode 100644 index 0000000..fc1d1df --- /dev/null +++ b/tools/update_lh1.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +import sys + +def normalize_file(filepath): + with open(filepath, 'r', encoding='utf-8') as f: + content = f.read() + lines = [line.rstrip() for line in content.splitlines()] + norm_lines = [] + prev_blank = False + for line in lines: + if line == '': + if not prev_blank: + norm_lines.append(line) + prev_blank = True + else: + norm_lines.append(line) + prev_blank = False + result = '\r\n'.join(norm_lines) + '\r\n' + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + result.encode('utf-8')) + +normalize_file('raids/arcadia_lh1_savage.html') + +with open('raids/index.html', 'r', encoding='utf-8') as f: + text = f.read() + +target = """ + ライトヘビー級1層 (零式) + Lv100 (IL700〜) + 零式 (Savage) + クアドラプルクロー、キャットクライム、アクセ箱・強化薬。 + 準備中 + """ + +replacement = """ + ライトヘビー級1層 (零式) + Lv100 (IL700〜) + 零式 (Savage) + クアドラプルクロー、キャットクライム、アクセ箱・強化薬。 + 攻略を見る ➜ + """ + +if target in text: + text = text.replace(target, replacement) + with open('raids/index.html', 'w', encoding='utf-8') as f: + f.write(text) + normalize_file('raids/index.html') + print("SUCCESS: Updated raids/index.html") +else: + print("ERROR: Target string not found") diff --git a/tools/update_lh2.py b/tools/update_lh2.py new file mode 100644 index 0000000..ff45e49 --- /dev/null +++ b/tools/update_lh2.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +import sys + +def normalize_file(filepath): + with open(filepath, 'r', encoding='utf-8') as f: + content = f.read() + content = content.lstrip('\ufeff') + lines = [line.rstrip() for line in content.splitlines()] + norm_lines = [] + prev_blank = False + for line in lines: + if line == '': + if not prev_blank: + norm_lines.append(line) + prev_blank = True + else: + norm_lines.append(line) + prev_blank = False + result = '\r\n'.join(norm_lines) + '\r\n' + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + result.encode('utf-8')) + +normalize_file('raids/arcadia_lh2_savage.html') + +with open('raids/index.html', 'r', encoding='utf-8') as f: + text = f.read() + +target = """ + ライトヘビー級2層 (零式) + Lv100 (IL700〜) + 零式 (Savage) + アラモードドロップ、ラブ・ミー・テンダー誘導、足・頭・手箱。 + 準備中 + """ + +replacement = """ + ライトヘビー級2層 (零式) + Lv100 (IL700〜) + 零式 (Savage) + アラモードドロップ、ラブ・ミー・テンダー誘導、足・頭・手箱。 + 攻略を見る ➜ + """ + +if target in text: + text = text.replace(target, replacement) + with open('raids/index.html', 'w', encoding='utf-8') as f: + f.write(text) + normalize_file('raids/index.html') + print("SUCCESS: Updated raids/index.html with LH2 Savage link.") +else: + print("ERROR: Target string not found in raids/index.html") diff --git a/tools/update_lh3.py b/tools/update_lh3.py new file mode 100644 index 0000000..2157e10 --- /dev/null +++ b/tools/update_lh3.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +import sys + +def normalize_file(filepath): + with open(filepath, 'r', encoding='utf-8') as f: + content = f.read() + content = content.lstrip('\ufeff') + lines = [line.rstrip() for line in content.splitlines()] + norm_lines = [] + prev_blank = False + for line in lines: + if line == '': + if not prev_blank: + norm_lines.append(line) + prev_blank = True + else: + norm_lines.append(line) + prev_blank = False + result = '\r\n'.join(norm_lines) + '\r\n' + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + result.encode('utf-8')) + +normalize_file('raids/arcadia_lh3_savage.html') + +with open('raids/index.html', 'r', encoding='utf-8') as f: + text = f.read() + +target = """ + ライトヘビー級3層 (零式) + Lv100 (IL705〜) + 零式 (Savage) + ボンバリアン・スペシャル、スマッシュインパクト多段軽減、脚箱・硬化薬。 + 準備中 + """ + +replacement = """ + ライトヘビー級3層 (零式) + Lv100 (IL705〜) + 零式 (Savage) + ボンバリアン・スペシャル、スマッシュインパクト多段軽減、脚箱・硬化薬。 + 攻略を見る ➜ + """ + +if target in text: + text = text.replace(target, replacement) + with open('raids/index.html', 'w', encoding='utf-8') as f: + f.write(text) + normalize_file('raids/index.html') + print("SUCCESS: Updated raids/index.html with LH3 Savage link.") +else: + print("ERROR: Target string not found in raids/index.html") diff --git a/tools/update_lh4.py b/tools/update_lh4.py new file mode 100644 index 0000000..fa11dc3 --- /dev/null +++ b/tools/update_lh4.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +import sys + +def normalize_file(filepath): + with open(filepath, 'r', encoding='utf-8') as f: + content = f.read() + content = content.lstrip('\ufeff') + lines = [line.rstrip() for line in content.splitlines()] + norm_lines = [] + prev_blank = False + for line in lines: + if line == '': + if not prev_blank: + norm_lines.append(line) + prev_blank = True + else: + norm_lines.append(line) + prev_blank = False + result = '\r\n'.join(norm_lines) + '\r\n' + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + result.encode('utf-8')) + +normalize_file('raids/arcadia_lh4_savage.html') + +with open('raids/index.html', 'r', encoding='utf-8') as f: + text = f.read() + +target = """ + ライトヘビー級4層 (零式) + Lv100 (IL710〜) + 零式 (Savage) + 前半・後半連続決戦。日没・日の出ギミック、最高峰IL735武器箱・胴箱・マウント。 + 準備中 + """ + +replacement = """ + ライトヘビー級4層 (零式) + Lv100 (IL710〜) + 零式 (Savage) + 前半・後半連続決戦。日没・日の出ギミック、最高峰IL735武器箱・胴箱・マウント。 + 攻略を見る ➜ + """ + +if target in text: + text = text.replace(target, replacement) + with open('raids/index.html', 'w', encoding='utf-8') as f: + f.write(text) + normalize_file('raids/index.html') + print("SUCCESS: Updated raids/index.html with LH4 Savage link.") +else: + print("ERROR: Target string not found in raids/index.html") diff --git a/tools/update_lunar_subterrane.py b/tools/update_lunar_subterrane.py new file mode 100644 index 0000000..c68c362 --- /dev/null +++ b/tools/update_lunar_subterrane.py @@ -0,0 +1,43 @@ +import sys + +def main(): + with open('dungeons/index.html', 'r', encoding='utf-8-sig') as f: + content = f.read() + + target = """ + 深淵潜行 月の地下渓谷 + Lv90 (IL635〜) + 対応 + パッチ6.5メインID。月面深部・闇の回廊。ゼロムス前哨戦。アントリオン。 + 準備中 + """ + + replacement = """ + 深淵潜行 月の地下渓谷 + Lv90 (IL635〜) + 対応 + パッチ6.5メインID。月面深部・闇の回廊。ゼロムス前哨戦。アントリオン。 + 攻略を見る ➜ + """ + + 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/lunar_subterrane.html', 'r', encoding='utf-8-sig') as f: + lun = f.read() + lun_lines = [line.rstrip() for line in lun.splitlines()] + lun_clean = '\r\n'.join(lun_lines) + '\r\n' + with open('dungeons/lunar_subterrane.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + lun_clean.encode('utf-8')) + + print("深淵潜行 月の地下渓谷のリンク更新および正規化が完了しました。") + +if __name__ == '__main__': + main() diff --git a/tools/update_malikahs_well.py b/tools/update_malikahs_well.py new file mode 100644 index 0000000..552c487 --- /dev/null +++ b/tools/update_malikahs_well.py @@ -0,0 +1,43 @@ +import sys + +def main(): + with open('dungeons/index.html', 'r', encoding='utf-8-sig') as f: + content = f.read() + + target = """ + 爽涼離宮 マリカの大井戸 + Lv77 (IL400〜) + 対応 + アム・アレーンの大水路。巨大水車、アルマジロの回転突進、ストーヴ。 + 準備中 + """ + + replacement = """ + 爽涼離宮 マリカの大井戸 + Lv77 (IL400〜) + 対応 + アム・アレーンの大水路。巨大水車、アルマジロの回転突進、ストーヴ。 + 攻略を見る ➜ + """ + + 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/malikahs_well.html', 'r', encoding='utf-8-sig') as f: + mal = f.read() + mal_lines = [line.rstrip() for line in mal.splitlines()] + mal_clean = '\r\n'.join(mal_lines) + '\r\n' + with open('dungeons/malikahs_well.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + mal_clean.encode('utf-8')) + + print("爽涼離宮 マリカの大井戸のリンク更新および正規化が完了しました。") + +if __name__ == '__main__': + main() diff --git a/tools/update_matoyas_relict.py b/tools/update_matoyas_relict.py new file mode 100644 index 0000000..1c2be88 --- /dev/null +++ b/tools/update_matoyas_relict.py @@ -0,0 +1,43 @@ +import sys + +def main(): + with open('dungeons/index.html', 'r', encoding='utf-8-sig') as f: + content = f.read() + + target = """ + 魔術工房 マトーヤの洞窟 + Lv80 (IL470〜) + 対応 + パッチ5.4メインID。巨大カエル、泥団子転がし、使い魔マザーポークシー。 + 準備中 + """ + + replacement = """ + 魔術工房 マトーヤの洞窟 + Lv80 (IL470〜) + 対応 + パッチ5.4メインID。巨大カエル、泥団子転がし、使い魔マザーポークシー。 + 攻略を見る ➜ + """ + + 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/matoyas_relict.html', 'r', encoding='utf-8-sig') as f: + mat = f.read() + mat_lines = [line.rstrip() for line in mat.splitlines()] + mat_clean = '\r\n'.join(mat_lines) + '\r\n' + with open('dungeons/matoyas_relict.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + mat_clean.encode('utf-8')) + + print("魔術工房 マトーヤの洞窟のリンク更新および正規化が完了しました。") + +if __name__ == '__main__': + main() diff --git a/tools/update_mt_gulg.py b/tools/update_mt_gulg.py new file mode 100644 index 0000000..2981788 --- /dev/null +++ b/tools/update_mt_gulg.py @@ -0,0 +1,43 @@ +import sys + +def main(): + with open('dungeons/index.html', 'r', encoding='utf-8-sig') as f: + content = f.read() + + target = """ + 偽りのユートピア グルグ火山 + Lv79 (IL410〜) + 対応 + 巨大タロースで突入する空中火山。罪喰い大まとめ、フォーギヴン・ヴェラー。 + 準備中 + """ + + replacement = """ + 偽りのユートピア グルグ火山 + Lv79 (IL410〜) + 対応 + 巨大タロースで突入する空中火山。罪喰い大まとめ、フォーギヴン・ヴェラー。 + 攻略を見る ➜ + """ + + 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/mt_gulg.html', 'r', encoding='utf-8-sig') as f: + gulg = f.read() + gulg_lines = [line.rstrip() for line in gulg.splitlines()] + gulg_clean = '\r\n'.join(gulg_lines) + '\r\n' + with open('dungeons/mt_gulg.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + gulg_clean.encode('utf-8')) + + print("偽りのユートピア グルグ火山のリンク更新および正規化が完了しました。") + +if __name__ == '__main__': + main() diff --git a/tools/update_nabriales.py b/tools/update_nabriales.py new file mode 100644 index 0000000..7d3dbb0 --- /dev/null +++ b/tools/update_nabriales.py @@ -0,0 +1,43 @@ +import sys + +def main(): + with open('trials/index.html', 'r', encoding='utf-8-sig') as f: + content = f.read() + + target = """ + アシエン・ナブリアレス討滅戦 + Lv50 (IL90〜) + ノーマル (8人) + 異次元吸い込み、巨大メテオ衝突阻止(タンク受け)。 + 準備中 + """ + + replacement = """ + アシエン・ナブリアレス討滅戦 + Lv50 (IL90〜) + ノーマル (8人) + 異次元吸い込み、巨大メテオ衝突阻止(タンク受け)。 + 攻略を見る ➜ + """ + + 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('trials/index.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + content_clean.encode('utf-8')) + + with open('trials/nabriales.html', 'r', encoding='utf-8-sig') as f: + nab = f.read() + nab_lines = [line.rstrip() for line in nab.splitlines()] + nab_clean = '\r\n'.join(nab_lines) + '\r\n' + with open('trials/nabriales.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + nab_clean.encode('utf-8')) + + print("ナブリアレスのリンク更新および正規化が完了しました。") + +if __name__ == '__main__': + main() diff --git a/tools/update_nidhogg.py b/tools/update_nidhogg.py new file mode 100644 index 0000000..501cf4d --- /dev/null +++ b/tools/update_nidhogg.py @@ -0,0 +1,43 @@ +import sys + +def main(): + with open('trials/index.html', 'r', encoding='utf-8-sig') as f: + content = f.read() + + target = """ + ニーズヘッグ征竜戦 / 極ニーズヘッグ + Lv60 (IL205〜/220〜) + ノーマル / 極 + 竜詩戦争完結。真紅の珠、竜尾竜翼、堕天のドラゴンダイブ。 + 準備中 + """ + + replacement = """ + ニーズヘッグ征竜戦 / 極ニーズヘッグ + Lv60 (IL205〜/220〜) + ノーマル / 極 + 竜詩戦争完結。真紅の珠、竜尾竜翼、堕天のドラゴンダイブ。 + 攻略を見る ➜ + """ + + 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('trials/index.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + content_clean.encode('utf-8')) + + with open('trials/nidhogg.html', 'r', encoding='utf-8-sig') as f: + nidhogg = f.read() + nidhogg_lines = [line.rstrip() for line in nidhogg.splitlines()] + nidhogg_clean = '\r\n'.join(nidhogg_lines) + '\r\n' + with open('trials/nidhogg.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + nidhogg_clean.encode('utf-8')) + + print("ニーズヘッグ征竜戦のリンク更新および正規化が完了しました。") + +if __name__ == '__main__': + main() diff --git a/tools/update_odin.py b/tools/update_odin.py new file mode 100644 index 0000000..b9af114 --- /dev/null +++ b/tools/update_odin.py @@ -0,0 +1,43 @@ +import sys + +def main(): + with open('trials/index.html', 'r', encoding='utf-8-sig') as f: + content = f.read() + + target = """ + 闘神オーディン討伐戦 + Lv50 (IL95〜) + ノーマル (8人) + サンゲタル強攻撃、ヴァルクヌート、時間切れ真・斬鉄剣。 + 準備中 + """ + + replacement = """ + 闘神オーディン討伐戦 + Lv50 (IL95〜) + ノーマル (8人) + サンゲタル強攻撃、ヴァルクヌート、時間切れ真・斬鉄剣。 + 攻略を見る ➜ + """ + + 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('trials/index.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + content_clean.encode('utf-8')) + + with open('trials/odin.html', 'r', encoding='utf-8-sig') as f: + odin = f.read() + odin_lines = [line.rstrip() for line in odin.splitlines()] + odin_clean = '\r\n'.join(odin_lines) + '\r\n' + with open('trials/odin.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + odin_clean.encode('utf-8')) + + print("闘神オーディンのリンク更新および正規化が完了しました。") + +if __name__ == '__main__': + main() diff --git a/tools/update_omega_alpha.py b/tools/update_omega_alpha.py new file mode 100644 index 0000000..173eda6 --- /dev/null +++ b/tools/update_omega_alpha.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +import sys + +def normalize_file(filepath): + with open(filepath, 'r', encoding='utf-8') as f: + content = f.read() + content = content.lstrip('\ufeff') + lines = [line.rstrip() for line in content.splitlines()] + norm_lines = [] + prev_blank = False + for line in lines: + if line == '': + if not prev_blank: + norm_lines.append(line) + prev_blank = True + else: + norm_lines.append(line) + prev_blank = False + result = '\r\n'.join(norm_lines) + '\r\n' + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + result.encode('utf-8')) + +normalize_file('raids/omega_alphascape.html') + +with open('raids/index.html', 'r', encoding='utf-8') as f: + text = f.read() + +target = """ + アルファ編 1〜4層 + Lv70 (IL375〜) + ノーマル / 零式 + カオス(風土火水)、ミドガルズオルム、オメガM/F(連携・シールド/ブレード)、ファイナルオメガ(ハローワールド)。 + 準備中 + """ + +replacement = """ + アルファ編 1〜4層 + Lv70 (IL375〜) + ノーマル / 零式 + カオス(風土火水)、ミドガルズオルム、オメガM/F(連携・シールド/ブレード)、ファイナルオメガ(ハローワールド)。 + 攻略を見る ➜ + """ + +if target in text: + text = text.replace(target, replacement) + with open('raids/index.html', 'w', encoding='utf-8') as f: + f.write(text) + normalize_file('raids/index.html') + print("SUCCESS: Updated raids/index.html with Omega Alphascape link.") +else: + print("ERROR: Target string not found in raids/index.html") diff --git a/tools/update_omega_delta.py b/tools/update_omega_delta.py new file mode 100644 index 0000000..5794b6a --- /dev/null +++ b/tools/update_omega_delta.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +import sys + +def normalize_file(filepath): + with open(filepath, 'r', encoding='utf-8') as f: + content = f.read() + content = content.lstrip('\ufeff') + lines = [line.rstrip() for line in content.splitlines()] + norm_lines = [] + prev_blank = False + for line in lines: + if line == '': + if not prev_blank: + norm_lines.append(line) + prev_blank = True + else: + norm_lines.append(line) + prev_blank = False + result = '\r\n'.join(norm_lines) + '\r\n' + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + result.encode('utf-8')) + +normalize_file('raids/omega_deltascape.html') + +with open('raids/index.html', 'r', encoding='utf-8') as f: + text = f.read() + +target = """ + デルタ編 1〜4層 + Lv70 (IL315〜) + ノーマル / 零式 + アルテ・ロイテ、カタストロフィー、ハルカルナッソス、エクスデス(ブラックホール・ネオエクスデス)。 + 準備中 + """ + +replacement = """ + デルタ編 1〜4層 + Lv70 (IL315〜) + ノーマル / 零式 + アルテ・ロイテ、カタストロフィー、ハルカルナッソス、エクスデス(ブラックホール・ネオエクスデス)。 + 攻略を見る ➜ + """ + +if target in text: + text = text.replace(target, replacement) + with open('raids/index.html', 'w', encoding='utf-8') as f: + f.write(text) + normalize_file('raids/index.html') + print("SUCCESS: Updated raids/index.html with Omega Deltascape link.") +else: + print("ERROR: Target string not found in raids/index.html") diff --git a/tools/update_omega_sigma.py b/tools/update_omega_sigma.py new file mode 100644 index 0000000..30b25ae --- /dev/null +++ b/tools/update_omega_sigma.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +import sys + +def normalize_file(filepath): + with open(filepath, 'r', encoding='utf-8') as f: + content = f.read() + content = content.lstrip('\ufeff') + lines = [line.rstrip() for line in content.splitlines()] + norm_lines = [] + prev_blank = False + for line in lines: + if line == '': + if not prev_blank: + norm_lines.append(line) + prev_blank = True + else: + norm_lines.append(line) + prev_blank = False + result = '\r\n'.join(norm_lines) + '\r\n' + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + result.encode('utf-8')) + +normalize_file('raids/omega_sigmascape.html') + +with open('raids/index.html', 'r', encoding='utf-8') as f: + text = f.read() + +target = """ + シグマ編 1〜4層 + Lv70 (IL345〜) + ノーマル / 零式 + 魔列車(幽霊隔離)、チャダヌーク(絵画ギミック)、ガーディアン、ケフカ(ミッシング・妖星乱舞)。 + 準備中 + """ + +replacement = """ + シグマ編 1〜4層 + Lv70 (IL345〜) + ノーマル / 零式 + 魔列車(幽霊隔離)、チャダヌーク(絵画ギミック)、ガーディアン、ケフカ(ミッシング・妖星乱舞)。 + 攻略を見る ➜ + """ + +if target in text: + text = text.replace(target, replacement) + with open('raids/index.html', 'w', encoding='utf-8') as f: + f.write(text) + normalize_file('raids/index.html') + print("SUCCESS: Updated raids/index.html with Omega Sigmascape link.") +else: + print("ERROR: Target string not found in raids/index.html") diff --git a/tools/update_paglthan.py b/tools/update_paglthan.py new file mode 100644 index 0000000..f17aed4 --- /dev/null +++ b/tools/update_paglthan.py @@ -0,0 +1,43 @@ +import sys + +def main(): + with open('dungeons/index.html', 'r', encoding='utf-8-sig') as f: + content = f.read() + + target = """ + 黄金平原 パガルザン + Lv80 (IL490〜) + 対応 + パッチ5.5メインID。アマルジャ族の平原。竜車突進、ルナバハムート。 + 準備中 + """ + + replacement = """ + 黄金平原 パガルザン + Lv80 (IL490〜) + 対応 + パッチ5.5メインID。アマルジャ族の平原。竜車突進、ルナバハムート。 + 攻略を見る ➜ + """ + + 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/paglthan.html', 'r', encoding='utf-8-sig') as f: + pag = f.read() + pag_lines = [line.rstrip() for line in pag.splitlines()] + pag_clean = '\r\n'.join(pag_lines) + '\r\n' + with open('dungeons/paglthan.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + pag_clean.encode('utf-8')) + + print("黄金平原 パガルザンのリンク更新および正規化が完了しました。") + +if __name__ == '__main__': + main() diff --git a/tools/update_puppets_bunker.py b/tools/update_puppets_bunker.py new file mode 100644 index 0000000..aeba6aa --- /dev/null +++ b/tools/update_puppets_bunker.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +import sys + +def normalize_file(filepath): + with open(filepath, 'r', encoding='utf-8') as f: + content = f.read() + content = content.lstrip('\ufeff') + lines = [line.rstrip() for line in content.splitlines()] + norm_lines = [] + prev_blank = False + for line in lines: + if line == '': + if not prev_blank: + norm_lines.append(line) + prev_blank = True + else: + norm_lines.append(line) + prev_blank = False + result = '\r\n'.join(norm_lines) + '\r\n' + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + result.encode('utf-8')) + +normalize_file('raids/puppets_bunker.html') + +with open('raids/index.html', 'r', encoding='utf-8') as f: + text = f.read() + +target = """ + 人形タチノ軍事基地 + Lv80 (漆黒5.x) + 24人 (A/B/C) + リオラ、飛行ユニット、アノッグ・コノッグ、融合体(エネルギー弾幕・飛行形態)。 + 準備中 + """ + +replacement = """ + 人形タチノ軍事基地 + Lv80 (漆黒5.x) + 24人 (A/B/C) + リオラ、飛行ユニット、アノッグ・コノッグ、融合体(エネルギー弾幕・飛行形態)。 + 攻略を見る ➜ + """ + +if target in text: + text = text.replace(target, replacement) + with open('raids/index.html', 'w', encoding='utf-8') as f: + f.write(text) + normalize_file('raids/index.html') + print("SUCCESS: Updated raids/index.html with Puppets Bunker link.") +else: + print("ERROR: Target string not found in raids/index.html") diff --git a/tools/update_qitana_ravel.py b/tools/update_qitana_ravel.py new file mode 100644 index 0000000..cd06969 --- /dev/null +++ b/tools/update_qitana_ravel.py @@ -0,0 +1,43 @@ +import sys + +def main(): + with open('dungeons/index.html', 'r', encoding='utf-8-sig') as f: + content = f.read() + + target = """ + 古跡探索 キタンナ神影洞 + Lv75 (IL390〜) + 対応 + ラケティカ大森林の古代ロンカ遺跡。肩の像からの熱線照射、エロースの毒沼。 + 準備中 + """ + + replacement = """ + 古跡探索 キタンナ神影洞 + Lv75 (IL390〜) + 対応 + ラケティカ大森林の古代ロンカ遺跡。肩の像からの熱線照射、エロースの毒沼。 + 攻略を見る ➜ + """ + + 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/qitana_ravel.html', 'r', encoding='utf-8-sig') as f: + qit = f.read() + qit_lines = [line.rstrip() for line in qit.splitlines()] + qit_clean = '\r\n'.join(qit_lines) + '\r\n' + with open('dungeons/qitana_ravel.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + qit_clean.encode('utf-8')) + + print("古跡探索 キタンナ神影洞のリンク更新および正規化が完了しました。") + +if __name__ == '__main__': + main() diff --git a/tools/update_rabanastre.py b/tools/update_rabanastre.py new file mode 100644 index 0000000..7cb9527 --- /dev/null +++ b/tools/update_rabanastre.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +import sys + +def normalize_file(filepath): + with open(filepath, 'r', encoding='utf-8') as f: + content = f.read() + content = content.lstrip('\ufeff') + lines = [line.rstrip() for line in content.splitlines()] + norm_lines = [] + prev_blank = False + for line in lines: + if line == '': + if not prev_blank: + norm_lines.append(line) + prev_blank = True + else: + norm_lines.append(line) + prev_blank = False + result = '\r\n'.join(norm_lines) + '\r\n' + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + result.encode('utf-8')) + +normalize_file('raids/rabanastre.html') + +with open('raids/index.html', 'r', encoding='utf-8') as f: + text = f.read() + +target = """ + 失われた都 ラバナスタ + Lv70 (紅蓮4.x) + 24人 (A/B/C) + FFTコラボ第1弾。マティウス、ロフォカレ、ハシュマリム、冷血剣士アルガス(真偽仮面)。 + 準備中 + """ + +replacement = """ + 失われた都 ラバナスタ + Lv70 (紅蓮4.x) + 24人 (A/B/C) + FFTコラボ第1弾。マティウス、ロフォカレ、ハシュマリム、冷血剣士アルガス(真偽仮面)。 + 攻略を見る ➜ + """ + +if target in text: + text = text.replace(target, replacement) + with open('raids/index.html', 'w', encoding='utf-8') as f: + f.write(text) + normalize_file('raids/index.html') + print("SUCCESS: Updated raids/index.html with Rabanastre link.") +else: + print("ERROR: Target string not found in raids/index.html") diff --git a/tools/update_ramuh.py b/tools/update_ramuh.py new file mode 100644 index 0000000..8854d39 --- /dev/null +++ b/tools/update_ramuh.py @@ -0,0 +1,43 @@ +import sys + +def main(): + with open('trials/index.html', 'r', encoding='utf-8-sig') as f: + content = f.read() + + target = """ + 真ラムウ / 極ラムウ + Lv50 (IL65〜/85〜) + 真 / 極 (8人) + 避雷針玉集め(タンク蓄電バフスイッチ)、カオスストライク解除。 + 準備中 + """ + + replacement = """ + 真ラムウ / 極ラムウ + Lv50 (IL65〜/85〜) + 真 / 極 (8人) + 避雷針玉集め(タンク蓄電バフスイッチ)、カオスストライク解除。 + 攻略を見る ➜ + """ + + 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('trials/index.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + content_clean.encode('utf-8')) + + with open('trials/ramuh.html', 'r', encoding='utf-8-sig') as f: + ramuh = f.read() + ramuh_lines = [line.rstrip() for line in ramuh.splitlines()] + ramuh_clean = '\r\n'.join(ramuh_lines) + '\r\n' + with open('trials/ramuh.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + ramuh_clean.encode('utf-8')) + + print("真ラムウのリンク更新および正規化が完了しました。") + +if __name__ == '__main__': + main() diff --git a/tools/update_rathalos.py b/tools/update_rathalos.py new file mode 100644 index 0000000..d1e0c81 --- /dev/null +++ b/tools/update_rathalos.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +import os +import sys + +def normalize_file(filepath): + with open(filepath, 'rb') as f: + raw = f.read() + content = raw.decode('utf-8', errors='replace').lstrip('\ufeff') + content = content.replace('\r\n', '\n').replace('\r', '\n') + lines = [line.rstrip(' \t') for line in content.split('\n')] + cleaned_lines = [] + prev_empty = False + for line in lines: + if line == '': + if not prev_empty: + cleaned_lines.append(line) + prev_empty = True + else: + cleaned_lines.append(line) + prev_empty = False + new_content = '\r\n'.join(cleaned_lines) + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + new_content.encode('utf-8')) + print(f"Normalized: {filepath}") + +index_path = 'trials/index.html' +with open(index_path, 'r', encoding='utf-8') as f: + lines = f.readlines() + +updated = False +for i, line in enumerate(lines): + if 'リオレウス狩猟戦 / 極リオレウス' in line: + for k in range(i, i+6): + if '準備中' in lines[k]: + lines[k] = lines[k].replace('準備中', '攻略を見る ➜') + updated = True + print(f"Replaced line {k+1}") + break + if updated: + break + +if updated: + with open(index_path, 'w', encoding='utf-8') as f: + f.writelines(lines) + print("Successfully updated trials/index.html for rathalos") +else: + print("Failed to find target row in trials/index.html") + +normalize_file('trials/index.html') +normalize_file('trials/rathalos.html') diff --git a/tools/update_ravana.py b/tools/update_ravana.py new file mode 100644 index 0000000..a3807eb --- /dev/null +++ b/tools/update_ravana.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +import os +import sys + +def normalize_file(filepath): + with open(filepath, 'rb') as f: + raw = f.read() + content = raw.decode('utf-8', errors='replace').lstrip('\ufeff') + content = content.replace('\r\n', '\n').replace('\r', '\n') + lines = [line.rstrip(' \t') for line in content.split('\n')] + cleaned_lines = [] + prev_empty = False + for line in lines: + if line == '': + if not prev_empty: + cleaned_lines.append(line) + prev_empty = True + else: + cleaned_lines.append(line) + prev_empty = False + new_content = '\r\n'.join(cleaned_lines) + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + new_content.encode('utf-8')) + print(f"Normalized: {filepath}") + +index_path = 'trials/index.html' +with open(index_path, 'r', encoding='utf-8') as f: + lines = f.readlines() + +updated = False +for i, line in enumerate(lines): + if 'ラーヴァナ討滅戦 / 極ラーヴァナ' in line: + for k in range(i, i+6): + if '準備中' in lines[k]: + lines[k] = lines[k].replace('準備中', '攻略を見る ➜') + updated = True + print(f"Replaced line {k+1}") + break + if updated: + break + +if updated: + with open(index_path, 'w', encoding='utf-8') as f: + f.writelines(lines) + print("Successfully updated trials/index.html for ravana") +else: + print("Failed to find target row in trials/index.html") + +normalize_file('trials/index.html') +normalize_file('trials/ravana.html') diff --git a/tools/update_ridorana.py b/tools/update_ridorana.py new file mode 100644 index 0000000..6c62ee8 --- /dev/null +++ b/tools/update_ridorana.py @@ -0,0 +1,92 @@ +# -*- coding: utf-8 -*- +import sys + +def normalize_file(filepath): + with open(filepath, 'r', encoding='utf-8') as f: + content = f.read() + content = content.lstrip('\ufeff') + lines = [line.rstrip() for line in content.splitlines()] + norm_lines = [] + prev_blank = False + for line in lines: + if line == '': + if not prev_blank: + norm_lines.append(line) + prev_blank = True + else: + norm_lines.append(line) + prev_blank = False + result = '\r\n'.join(norm_lines) + '\r\n' + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + result.encode('utf-8')) + +normalize_file('raids/ridorana.html') + +with open('raids/index.html', 'r', encoding='utf-8') as f: + text = f.read() + +# リドルアナ更新 +target_ridorana = """ + 封じられた聖塔 リドルアナ + Lv70 (紅蓮4.x) + 24人 (A/B/C) + ファムフリート、ベリアス(時間停止)、労働八号(算数ギミック素数計算)、鬼龍ヤズマット。 + 準備中 + """ + +replacement_ridorana = """ + 封じられた聖塔 リドルアナ + Lv70 (紅蓮4.x) + 24人 (A/B/C) + ファムフリート、ベリアス(時間停止)、労働八号(算数ギミック素数計算)、鬼龍ヤズマット。 + 攻略を見る ➜ + """ + +# クルーザー級・ヘビー級更新 +target_cruiser = """ + クルーザー級(1〜4層) + Lv100 (パッチ7.2) + ノーマル / 零式 + パッチ7.2実装予定。第2弾レイドシリーズ。 + 準備中 + + + ヘビー級(1〜4層) + Lv100 (パッチ7.4) + ノーマル / 零式 + パッチ7.4実装予定。アルカディア完結編。 + 準備中 + """ + +replacement_cruiser = """ + クルーザー級(1〜4層) + Lv100 (パッチ7.2) + ノーマル / 零式 + パッチ7.2実装予定。第2弾レイドシリーズ。 + パッチ7.2実装予定 + + + ヘビー級(1〜4層) + Lv100 (パッチ7.4) + ノーマル / 零式 + パッチ7.4実装予定。アルカディア完結編。 + パッチ7.4実装予定 + """ + +if target_ridorana in text: + text = text.replace(target_ridorana, replacement_ridorana) + print("SUCCESS: Target ridorana found and replaced") +else: + print("ERROR: target_ridorana not found") + +if target_cruiser in text: + text = text.replace(target_cruiser, replacement_cruiser) + print("SUCCESS: Target cruiser found and replaced") +else: + print("ERROR: target_cruiser not found") + +with open('raids/index.html', 'w', encoding='utf-8') as f: + f.write(text) + +normalize_file('raids/index.html') +print("Successfully processed raids/index.html") diff --git a/tools/update_rubicante.py b/tools/update_rubicante.py new file mode 100644 index 0000000..3869f70 --- /dev/null +++ b/tools/update_rubicante.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +import os +import sys + +def normalize_file(filepath): + with open(filepath, 'rb') as f: + raw = f.read() + content = raw.decode('utf-8', errors='replace').lstrip('\ufeff') + content = content.replace('\r\n', '\n').replace('\r', '\n') + lines = [line.rstrip(' \t') for line in content.split('\n')] + cleaned_lines = [] + prev_empty = False + for line in lines: + if line == '': + if not prev_empty: + cleaned_lines.append(line) + prev_empty = True + else: + cleaned_lines.append(line) + prev_empty = False + new_content = '\r\n'.join(cleaned_lines) + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + new_content.encode('utf-8')) + print(f"Normalized: {filepath}") + +index_path = 'trials/index.html' +with open(index_path, 'r', encoding='utf-8') as f: + lines = f.readlines() + +updated = False +for i, line in enumerate(lines): + if 'ルビカンテ討滅戦' in line: + for k in range(i, i+6): + if '準備中' in lines[k]: + lines[k] = lines[k].replace('準備中', '攻略を見る ➜') + updated = True + print(f"Replaced line {k+1}") + break + if updated: + break + +if updated: + with open(index_path, 'w', encoding='utf-8') as f: + f.writelines(lines) + print("Successfully updated trials/index.html for rubicante") +else: + print("Failed to find target row in trials/index.html") + +normalize_file('trials/index.html') +normalize_file('trials/rubicante.html') diff --git a/tools/update_ruby_weapon.py b/tools/update_ruby_weapon.py new file mode 100644 index 0000000..62edc9d --- /dev/null +++ b/tools/update_ruby_weapon.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +import os +import sys + +def normalize_file(filepath): + with open(filepath, 'rb') as f: + raw = f.read() + content = raw.decode('utf-8', errors='replace').lstrip('\ufeff') + content = content.replace('\r\n', '\n').replace('\r', '\n') + lines = [line.rstrip(' \t') for line in content.split('\n')] + cleaned_lines = [] + prev_empty = False + for line in lines: + if line == '': + if not prev_empty: + cleaned_lines.append(line) + prev_empty = True + else: + cleaned_lines.append(line) + prev_empty = False + new_content = '\r\n'.join(cleaned_lines) + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + new_content.encode('utf-8')) + print(f"Normalized: {filepath}") + +index_path = 'trials/index.html' +with open(index_path, 'r', encoding='utf-8') as f: + lines = f.readlines() + +updated = False +for i, line in enumerate(lines): + if 'ルビーウェポン破壊作戦' in line: + for k in range(i, i+6): + if '準備中' in lines[k]: + lines[k] = lines[k].replace('準備中', '攻略を見る ➜') + updated = True + print(f"Replaced line {k+1}") + break + if updated: + break + +if updated: + with open(index_path, 'w', encoding='utf-8') as f: + f.writelines(lines) + print("Successfully updated trials/index.html for ruby_weapon") +else: + print("Failed to find target row in trials/index.html") + +normalize_file('trials/index.html') +normalize_file('trials/ruby_weapon.html') diff --git a/tools/update_seiryu.py b/tools/update_seiryu.py new file mode 100644 index 0000000..1034bcf --- /dev/null +++ b/tools/update_seiryu.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +import os +import sys + +def normalize_file(filepath): + with open(filepath, 'rb') as f: + raw = f.read() + content = raw.decode('utf-8', errors='replace').lstrip('\ufeff') + content = content.replace('\r\n', '\n').replace('\r', '\n') + lines = [line.rstrip(' \t') for line in content.split('\n')] + cleaned_lines = [] + prev_empty = False + for line in lines: + if line == '': + if not prev_empty: + cleaned_lines.append(line) + prev_empty = True + else: + cleaned_lines.append(line) + prev_empty = False + new_content = '\r\n'.join(cleaned_lines) + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + new_content.encode('utf-8')) + print(f"Normalized: {filepath}") + +index_path = 'trials/index.html' +with open(index_path, 'r', encoding='utf-8') as f: + lines = f.readlines() + +updated = False +for i, line in enumerate(lines): + if '青龍征魂戦 / 極青龍' in line: + for k in range(i, i+6): + if '準備中' in lines[k]: + lines[k] = lines[k].replace('準備中', '攻略を見る ➜') + updated = True + print(f"Replaced line {k+1}") + break + if updated: + break + +if updated: + with open(index_path, 'w', encoding='utf-8') as f: + f.writelines(lines) + print("Successfully updated trials/index.html for seiryu") +else: + print("Failed to find target row in trials/index.html") + +normalize_file('trials/index.html') +normalize_file('trials/seiryu.html') diff --git a/tools/update_sephirot.py b/tools/update_sephirot.py new file mode 100644 index 0000000..27a9428 --- /dev/null +++ b/tools/update_sephirot.py @@ -0,0 +1,43 @@ +import sys + +def main(): + with open('trials/index.html', 'r', encoding='utf-8-sig') as f: + content = f.read() + + target = """ + 魔神セフィロト討滅戦 / 極セフィロト + Lv60 (IL190〜/205〜) + ノーマル / 極 + 三闘神。巨大化後の緑黄デバフタケノコ踏み、巨大パンチ。 + 準備中 + """ + + replacement = """ + 魔神セフィロト討滅戦 / 極セフィロト + Lv60 (IL190〜/205〜) + ノーマル / 極 + 三闘神。巨大化後の緑黄デバフタケノコ踏み、巨大パンチ。 + 攻略を見る ➜ + """ + + 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('trials/index.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + content_clean.encode('utf-8')) + + with open('trials/sephirot.html', 'r', encoding='utf-8-sig') as f: + sephirot = f.read() + sephirot_lines = [line.rstrip() for line in sephirot.splitlines()] + sephirot_clean = '\r\n'.join(sephirot_lines) + '\r\n' + with open('trials/sephirot.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + sephirot_clean.encode('utf-8')) + + print("魔神セフィロト討滅戦のリンク更新および正規化が完了しました。") + +if __name__ == '__main__': + main() diff --git a/tools/update_shinryu.py b/tools/update_shinryu.py new file mode 100644 index 0000000..0f77fcb --- /dev/null +++ b/tools/update_shinryu.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +import os +import sys + +def normalize_file(filepath): + with open(filepath, 'rb') as f: + raw = f.read() + content = raw.decode('utf-8', errors='replace').lstrip('\ufeff') + content = content.replace('\r\n', '\n').replace('\r', '\n') + lines = [line.rstrip(' \t') for line in content.split('\n')] + cleaned_lines = [] + prev_empty = False + for line in lines: + if line == '': + if not prev_empty: + cleaned_lines.append(line) + prev_empty = True + else: + cleaned_lines.append(line) + prev_empty = False + new_content = '\r\n'.join(cleaned_lines) + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + new_content.encode('utf-8')) + print(f"Normalized: {filepath}") + +index_path = 'trials/index.html' +with open(index_path, 'r', encoding='utf-8') as f: + lines = f.readlines() + +updated = False +for i, line in enumerate(lines): + if '神龍討滅戦' in line: + for k in range(i, i+6): + if '準備中' in lines[k]: + lines[k] = lines[k].replace('準備中', '攻略を見る ➜') + updated = True + print(f"Replaced line {k+1}") + break + if updated: + break + +if updated: + with open(index_path, 'w', encoding='utf-8') as f: + f.writelines(lines) + print("Successfully updated trials/index.html for shinryu") +else: + print("Failed to find target row in trials/index.html") + +normalize_file('trials/index.html') +normalize_file('trials/shinryu.html') diff --git a/tools/update_shisui.py b/tools/update_shisui.py new file mode 100644 index 0000000..9fccfa1 --- /dev/null +++ b/tools/update_shisui.py @@ -0,0 +1,43 @@ +import sys + +def main(): + with open('dungeons/index.html', 'r', encoding='utf-8-sig') as f: + content = f.read() + + target = """ + 海底宮殿 紫水宮 + Lv63 (IL245〜) + 対応 + 紅玉海の竜宮城。玉手箱でおじいさん化して大技回避、紫水妖女。 + 準備中 + """ + + replacement = """ + 海底宮殿 紫水宮 + Lv63 (IL245〜) + 対応 + 紅玉海の竜宮城。玉手箱でおじいさん化して大技回避、紫水妖女。 + 攻略を見る ➜ + """ + + 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/shisui.html', 'r', encoding='utf-8-sig') as f: + shi = f.read() + shi_lines = [line.rstrip() for line in shi.splitlines()] + shi_clean = '\r\n'.join(shi_lines) + '\r\n' + with open('dungeons/shisui.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + shi_clean.encode('utf-8')) + + print("海底宮殿 紫水宮のリンク更新および正規化が完了しました。") + +if __name__ == '__main__': + main() diff --git a/tools/update_shiva.py b/tools/update_shiva.py new file mode 100644 index 0000000..ae5db33 --- /dev/null +++ b/tools/update_shiva.py @@ -0,0 +1,43 @@ +import sys + +def main(): + with open('trials/index.html', 'r', encoding='utf-8-sig') as f: + content = f.read() + + target = """ + 真シヴァ / 極シヴァ + Lv50 (IL80〜/95〜) + 真 / 極 (8人) + 剣(頭割り)と杖(散開)の切り替え、アイシクルインパクト、氷結床。 + 準備中 + """ + + replacement = """ + 真シヴァ / 極シヴァ + Lv50 (IL80〜/95〜) + 真 / 極 (8人) + 剣(頭割り)と杖(散開)の切り替え、アイシクルインパクト、氷結床。 + 攻略を見る ➜ + """ + + 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('trials/index.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + content_clean.encode('utf-8')) + + with open('trials/shiva.html', 'r', encoding='utf-8-sig') as f: + shiva = f.read() + shiva_lines = [line.rstrip() for line in shiva.splitlines()] + shiva_clean = '\r\n'.join(shiva_lines) + '\r\n' + with open('trials/shiva.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + shiva_clean.encode('utf-8')) + + print("真シヴァのリンク更新および正規化が完了しました。") + +if __name__ == '__main__': + main() diff --git a/tools/update_sirensong_sea.py b/tools/update_sirensong_sea.py new file mode 100644 index 0000000..bdbe4e2 --- /dev/null +++ b/tools/update_sirensong_sea.py @@ -0,0 +1,43 @@ +import sys + +def main(): + with open('dungeons/index.html', 'r', encoding='utf-8-sig') as f: + content = f.read() + + target = """ + 漂流海域 セイレーン海 + Lv61 (IL240〜) + 対応 + ひんがしの国へ向かう幽霊船航路。船幽霊の呪縛、セイレーンの魅了歌。 + 準備中 + """ + + replacement = """ + 漂流海域 セイレーン海 + Lv61 (IL240〜) + 対応 + ひんがしの国へ向かう幽霊船航路。船幽霊の呪縛、セイレーンの魅了歌。 + 攻略を見る ➜ + """ + + 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/sirensong_sea.html', 'r', encoding='utf-8-sig') as f: + sir = f.read() + sir_lines = [line.rstrip() for line in sir.splitlines()] + sir_clean = '\r\n'.join(sir_lines) + '\r\n' + with open('dungeons/sirensong_sea.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + sir_clean.encode('utf-8')) + + print("漂流海域 セイレーン海のリンク更新および正規化が完了しました。") + +if __name__ == '__main__': + main() diff --git a/tools/update_smileton.py b/tools/update_smileton.py new file mode 100644 index 0000000..84fd658 --- /dev/null +++ b/tools/update_smileton.py @@ -0,0 +1,43 @@ +import sys + +def main(): + with open('dungeons/index.html', 'r', encoding='utf-8-sig') as f: + content = f.read() + + target = """ + 楽園都市 スマイルトン + Lv90 (IL540〜) + 非対応 + レポリットの建設都市。スマイリー・フェイス、ビッグ・チーズの爆撃ライン。 + 準備中 + """ + + replacement = """ + 楽園都市 スマイルトン + Lv90 (IL540〜) + 非対応 + レポリットの建設都市。スマイリー・フェイス、ビッグ・チーズの爆撃ライン。 + 攻略を見る ➜ + """ + + 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/smileton.html', 'r', encoding='utf-8-sig') as f: + smi = f.read() + smi_lines = [line.rstrip() for line in smi.splitlines()] + smi_clean = '\r\n'.join(smi_lines) + '\r\n' + with open('dungeons/smileton.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + smi_clean.encode('utf-8')) + + print("楽園都市 スマイルトンのリンク更新および正規化が完了しました。") + +if __name__ == '__main__': + main() diff --git a/tools/update_sophia.py b/tools/update_sophia.py new file mode 100644 index 0000000..0ff121c --- /dev/null +++ b/tools/update_sophia.py @@ -0,0 +1,43 @@ +import sys + +def main(): + with open('trials/index.html', 'r', encoding='utf-8-sig') as f: + content = f.read() + + target = """ + 女神ソフィア討滅戦 / 極ソフィア + Lv60 (IL220〜/235〜) + ノーマル / 極 + 天秤ギミック(皿の傾き判定・線数え)、娘の視線。 + 準備中 + """ + + replacement = """ + 女神ソフィア討滅戦 / 極ソフィア + Lv60 (IL220〜/235〜) + ノーマル / 極 + 天秤ギミック(皿の傾き判定・線数え)、娘の視線。 + 攻略を見る ➜ + """ + + 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('trials/index.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + content_clean.encode('utf-8')) + + with open('trials/sophia.html', 'r', encoding='utf-8-sig') as f: + sophia = f.read() + sophia_lines = [line.rstrip() for line in sophia.splitlines()] + sophia_clean = '\r\n'.join(sophia_lines) + '\r\n' + with open('trials/sophia.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + sophia_clean.encode('utf-8')) + + print("女神ソフィア討滅戦のリンク更新および正規化が完了しました。") + +if __name__ == '__main__': + main() diff --git a/tools/update_steps_of_faith.py b/tools/update_steps_of_faith.py new file mode 100644 index 0000000..17843e5 --- /dev/null +++ b/tools/update_steps_of_faith.py @@ -0,0 +1,43 @@ +import sys + +def main(): + with open('trials/index.html', 'r', encoding='utf-8-sig') as f: + content = f.read() + + target = """ + 皇都イシュガルド防衛戦 + Lv50 (IL90〜) + ソロ改修済 + 雲廊の巨大龍ヴィシャップ迎撃。パッチ6.xによりソロバトル化。 + 準備中 + """ + + replacement = """ + 皇都イシュガルド防衛戦 + Lv50 (IL90〜) + ソロ改修済 + 雲廊の巨大龍ヴィシャップ迎撃。パッチ6.xによりソロバトル化。 + 攻略を見る ➜ + """ + + 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('trials/index.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + content_clean.encode('utf-8')) + + with open('trials/steps_of_faith.html', 'r', encoding='utf-8-sig') as f: + steps = f.read() + steps_lines = [line.rstrip() for line in steps.splitlines()] + steps_clean = '\r\n'.join(steps_lines) + '\r\n' + with open('trials/steps_of_faith.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + steps_clean.encode('utf-8')) + + print("皇都イシュガルド防衛戦のリンク更新および正規化が完了しました。") + +if __name__ == '__main__': + main() diff --git a/tools/update_stigma_four.py b/tools/update_stigma_four.py new file mode 100644 index 0000000..94cbc6a --- /dev/null +++ b/tools/update_stigma_four.py @@ -0,0 +1,43 @@ +import sys + +def main(): + with open('dungeons/index.html', 'r', encoding='utf-8-sig') as f: + content = f.read() + + target = """ + 電脳夢想 スティグマ・フォー + Lv90 (IL540〜) + 非対応 + オミクロン族の戦闘マトリクス。プロトオメガの召喚、竜型兵器迎撃。 + 準備中 + """ + + replacement = """ + 電脳夢想 スティグマ・フォー + Lv90 (IL540〜) + 非対応 + オミクロン族の戦闘マトリクス。プロトオメガの召喚、竜型兵器迎撃。 + 攻略を見る ➜ + """ + + 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/stigma_four.html', 'r', encoding='utf-8-sig') as f: + sti = f.read() + sti_lines = [line.rstrip() for line in sti.splitlines()] + sti_clean = '\r\n'.join(sti_lines) + '\r\n' + with open('dungeons/stigma_four.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + sti_clean.encode('utf-8')) + + print("電脳夢想 スティグマ・フォーのリンク更新および正規化が完了しました。") + +if __name__ == '__main__': + main() diff --git a/tools/update_susano.py b/tools/update_susano.py new file mode 100644 index 0000000..1e622c8 --- /dev/null +++ b/tools/update_susano.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +import os +import sys + +def normalize_file(filepath): + with open(filepath, 'rb') as f: + raw = f.read() + content = raw.decode('utf-8', errors='replace').lstrip('\ufeff') + content = content.replace('\r\n', '\n').replace('\r', '\n') + lines = [line.rstrip(' \t') for line in content.split('\n')] + cleaned_lines = [] + prev_empty = False + for line in lines: + if line == '': + if not prev_empty: + cleaned_lines.append(line) + prev_empty = True + else: + cleaned_lines.append(line) + prev_empty = False + new_content = '\r\n'.join(cleaned_lines) + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + new_content.encode('utf-8')) + print(f"Normalized: {filepath}") + +index_path = 'trials/index.html' +with open(index_path, 'r', encoding='utf-8') as f: + lines = f.readlines() + +updated = False +for i, line in enumerate(lines): + if 'スサノオ討滅戦' in line: + for k in range(i, i+6): + if '準備中' in lines[k]: + lines[k] = lines[k].replace('準備中', '攻略を見る ➜') + updated = True + print(f"Replaced line {k+1}") + break + if updated: + break + +if updated: + with open(index_path, 'w', encoding='utf-8') as f: + f.writelines(lines) + print("Successfully updated trials/index.html for susano") +else: + print("Failed to find target row in trials/index.html") + +normalize_file('trials/index.html') +normalize_file('trials/susano.html') diff --git a/tools/update_suzaku.py b/tools/update_suzaku.py new file mode 100644 index 0000000..8f95232 --- /dev/null +++ b/tools/update_suzaku.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +import os +import sys + +def normalize_file(filepath): + with open(filepath, 'rb') as f: + raw = f.read() + content = raw.decode('utf-8', errors='replace').lstrip('\ufeff') + content = content.replace('\r\n', '\n').replace('\r', '\n') + lines = [line.rstrip(' \t') for line in content.split('\n')] + cleaned_lines = [] + prev_empty = False + for line in lines: + if line == '': + if not prev_empty: + cleaned_lines.append(line) + prev_empty = True + else: + cleaned_lines.append(line) + prev_empty = False + new_content = '\r\n'.join(cleaned_lines) + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + new_content.encode('utf-8')) + print(f"Normalized: {filepath}") + +index_path = 'trials/index.html' +with open(index_path, 'r', encoding='utf-8') as f: + lines = f.readlines() + +updated = False +for i, line in enumerate(lines): + if '朱雀征魂戦 / 極朱雀' in line: + for k in range(i, i+6): + if '準備中' in lines[k]: + lines[k] = lines[k].replace('準備中', '攻略を見る ➜') + updated = True + print(f"Replaced line {k+1}") + break + if updated: + break + +if updated: + with open(index_path, 'w', encoding='utf-8') as f: + f.writelines(lines) + print("Successfully updated trials/index.html for suzaku") +else: + print("Failed to find target row in trials/index.html") + +normalize_file('trials/index.html') +normalize_file('trials/suzaku.html') diff --git a/tools/update_temple_of_the_fist.py b/tools/update_temple_of_the_fist.py new file mode 100644 index 0000000..9c517b9 --- /dev/null +++ b/tools/update_temple_of_the_fist.py @@ -0,0 +1,43 @@ +import sys + +def main(): + with open('dungeons/index.html', 'r', encoding='utf-8-sig') as f: + content = f.read() + + target = """ + 壊神修行 星導山寺院 + Lv70 (IL280〜) + 非対応 + モンク総本山。クァール石像、ラールガーの試練。 + 準備中 + """ + + replacement = """ + 壊神修行 星導山寺院 + Lv70 (IL280〜) + 非対応 + モンク総本山。クァール石像、ラールガーの試練。 + 攻略を見る ➜ + """ + + 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/temple_of_the_fist.html', 'r', encoding='utf-8-sig') as f: + tem = f.read() + tem_lines = [line.rstrip() for line in tem.splitlines()] + tem_clean = '\r\n'.join(tem_lines) + '\r\n' + with open('dungeons/temple_of_the_fist.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + tem_clean.encode('utf-8')) + + print("壊神修行 星導山寺院のリンク更新および正規化が完了しました。") + +if __name__ == '__main__': + main() diff --git a/tools/update_thaleia.py b/tools/update_thaleia.py new file mode 100644 index 0000000..5a7433b --- /dev/null +++ b/tools/update_thaleia.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +import sys + +def normalize_file(filepath): + with open(filepath, 'r', encoding='utf-8') as f: + content = f.read() + content = content.lstrip('\ufeff') + lines = [line.rstrip() for line in content.splitlines()] + norm_lines = [] + prev_blank = False + for line in lines: + if line == '': + if not prev_blank: + norm_lines.append(line) + prev_blank = True + else: + norm_lines.append(line) + prev_blank = False + result = '\r\n'.join(norm_lines) + '\r\n' + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + result.encode('utf-8')) + +normalize_file('raids/thaleia.html') + +with open('raids/index.html', 'r', encoding='utf-8') as f: + text = f.read() + +target = """ + 華めく神域 タレイア + Lv90 (暁月6.x) + 24人 (A/B/C) + サリャク(河川水流)、リムレーン(大津波)、オシュオン(登山・巨人体)、エウロギア(十二神全技複合)。 + 準備中 + """ + +replacement = """ + 華めく神域 タレイア + Lv90 (暁月6.x) + 24人 (A/B/C) + サリャク(河川水流)、リムレーン(大津波)、オシュオン(登山・巨人体)、エウロギア(十二神全技複合)。 + 攻略を見る ➜ + """ + +if target in text: + text = text.replace(target, replacement) + with open('raids/index.html', 'w', encoding='utf-8') as f: + f.write(text) + normalize_file('raids/index.html') + print("SUCCESS: Updated raids/index.html with Thaleia link.") +else: + print("ERROR: Target string not found in raids/index.html") diff --git a/tools/update_thordan.py b/tools/update_thordan.py new file mode 100644 index 0000000..f3aae6e --- /dev/null +++ b/tools/update_thordan.py @@ -0,0 +1,43 @@ +import sys + +def main(): + with open('trials/index.html', 'r', encoding='utf-8-sig') as f: + content = f.read() + + target = """ + ナイツ・オブ・ラウンド / 極ナイツ + Lv60 (IL142〜/205〜) + ノーマル / 極 + 【蒼天ラスボス】 騎神トールダンと蒼天騎士団の怒涛の連係。 + 準備中 + """ + + replacement = """ + ナイツ・オブ・ラウンド / 極ナイツ + Lv60 (IL142〜/205〜) + ノーマル / 極 + 【蒼天ラスボス】 騎神トールダンと蒼天騎士団の怒涛の連係。 + 攻略を見る ➜ + """ + + 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('trials/index.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + content_clean.encode('utf-8')) + + with open('trials/thordan.html', 'r', encoding='utf-8-sig') as f: + thordan = f.read() + thordan_lines = [line.rstrip() for line in thordan.splitlines()] + thordan_clean = '\r\n'.join(thordan_lines) + '\r\n' + with open('trials/thordan.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + thordan_clean.encode('utf-8')) + + print("トールダン討滅戦のリンク更新および正規化が完了しました。") + +if __name__ == '__main__': + main() diff --git a/tools/update_titania.py b/tools/update_titania.py new file mode 100644 index 0000000..463fe7c --- /dev/null +++ b/tools/update_titania.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +import os +import sys + +def normalize_file(filepath): + with open(filepath, 'rb') as f: + raw = f.read() + content = raw.decode('utf-8', errors='replace').lstrip('\ufeff') + content = content.replace('\r\n', '\n').replace('\r', '\n') + lines = [line.rstrip(' \t') for line in content.split('\n')] + cleaned_lines = [] + prev_empty = False + for line in lines: + if line == '': + if not prev_empty: + cleaned_lines.append(line) + prev_empty = True + else: + cleaned_lines.append(line) + prev_empty = False + new_content = '\r\n'.join(cleaned_lines) + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + new_content.encode('utf-8')) + print(f"Normalized: {filepath}") + +index_path = 'trials/index.html' +with open(index_path, 'r', encoding='utf-8') as f: + lines = f.readlines() + +updated = False +for i, line in enumerate(lines): + if 'ティターニア討滅戦' in line: + for k in range(i, i+6): + if '準備中' in lines[k]: + lines[k] = lines[k].replace('準備中', '攻略を見る ➜') + updated = True + print(f"Replaced line {k+1}") + break + if updated: + break + +if updated: + with open(index_path, 'w', encoding='utf-8') as f: + f.writelines(lines) + print("Successfully updated trials/index.html for titania") +else: + print("Failed to find target row in trials/index.html") + +normalize_file('trials/index.html') +normalize_file('trials/titania.html') diff --git a/tools/update_tower_breach.py b/tools/update_tower_breach.py new file mode 100644 index 0000000..7003550 --- /dev/null +++ b/tools/update_tower_breach.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +import sys + +def normalize_file(filepath): + with open(filepath, 'r', encoding='utf-8') as f: + content = f.read() + content = content.lstrip('\ufeff') + lines = [line.rstrip() for line in content.splitlines()] + norm_lines = [] + prev_blank = False + for line in lines: + if line == '': + if not prev_blank: + norm_lines.append(line) + prev_blank = True + else: + norm_lines.append(line) + prev_blank = False + result = '\r\n'.join(norm_lines) + '\r\n' + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + result.encode('utf-8')) + +normalize_file('raids/tower_at_paradigms_breach.html') + +with open('raids/index.html', 'r', encoding='utf-8') as f: + text = f.read() + +target = """ + 希望ノ砲台:「塔」 + Lv80 (漆黒5.x) + 24人 (A/B/C) + ジャック、ヘンゼル&グレーテル、赤い少女、偽造サレタ神(開花した少女)。 + 準備中 + """ + +replacement = """ + 希望ノ砲台:「塔」 + Lv80 (漆黒5.x) + 24人 (A/B/C) + ジャック、ヘンゼル&グレーテル、赤い少女、偽造サレタ神(開花した少女)。 + 攻略を見る ➜ + """ + +if target in text: + text = text.replace(target, replacement) + with open('raids/index.html', 'w', encoding='utf-8') as f: + f.write(text) + normalize_file('raids/index.html') + print("SUCCESS: Updated raids/index.html with Tower at Paradigms Breach link.") +else: + print("ERROR: Target string not found in raids/index.html") diff --git a/tools/update_troia.py b/tools/update_troia.py new file mode 100644 index 0000000..d9f1460 --- /dev/null +++ b/tools/update_troia.py @@ -0,0 +1,43 @@ +import sys + +def main(): + with open('dungeons/index.html', 'r', encoding='utf-8-sig') as f: + content = f.read() + + target = """ + 異界孤城 トロイアコート + Lv90 (IL595〜) + 対応 + パッチ6.2メインID。第十三世界ヴォイドの城。ベアトリクス、スカルミリオーネ。 + 準備中 + """ + + replacement = """ + 異界孤城 トロイアコート + Lv90 (IL595〜) + 対応 + パッチ6.2メインID。第十三世界ヴォイドの城。ベアトリクス、スカルミリオーネ。 + 攻略を見る ➜ + """ + + 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/fell_court_of_troia.html', 'r', encoding='utf-8-sig') as f: + tro = f.read() + tro_lines = [line.rstrip() for line in tro.splitlines()] + tro_clean = '\r\n'.join(tro_lines) + '\r\n' + with open('dungeons/fell_court_of_troia.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + tro_clean.encode('utf-8')) + + print("異界孤城 トロイアコートのリンク更新および正規化が完了しました。") + +if __name__ == '__main__': + main() diff --git a/tools/update_tsukuyomi.py b/tools/update_tsukuyomi.py new file mode 100644 index 0000000..a347fa8 --- /dev/null +++ b/tools/update_tsukuyomi.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +import os +import sys + +def normalize_file(filepath): + with open(filepath, 'rb') as f: + raw = f.read() + content = raw.decode('utf-8', errors='replace').lstrip('\ufeff') + content = content.replace('\r\n', '\n').replace('\r', '\n') + lines = [line.rstrip(' \t') for line in content.split('\n')] + cleaned_lines = [] + prev_empty = False + for line in lines: + if line == '': + if not prev_empty: + cleaned_lines.append(line) + prev_empty = True + else: + cleaned_lines.append(line) + prev_empty = False + new_content = '\r\n'.join(cleaned_lines) + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + new_content.encode('utf-8')) + print(f"Normalized: {filepath}") + +index_path = 'trials/index.html' +with open(index_path, 'r', encoding='utf-8') as f: + lines = f.readlines() + +updated = False +for i, line in enumerate(lines): + if 'ツクヨミ討滅戦' in line: + for k in range(i, i+6): + if '準備中' in lines[k]: + lines[k] = lines[k].replace('準備中', '攻略を見る ➜') + updated = True + print(f"Replaced line {k+1}") + break + if updated: + break + +if updated: + with open(index_path, 'w', encoding='utf-8') as f: + f.writelines(lines) + print("Successfully updated trials/index.html for tsukuyomi") +else: + print("Failed to find target row in trials/index.html") + +normalize_file('trials/index.html') +normalize_file('trials/tsukuyomi.html') diff --git a/tools/update_twinning.py b/tools/update_twinning.py new file mode 100644 index 0000000..b74bc42 --- /dev/null +++ b/tools/update_twinning.py @@ -0,0 +1,43 @@ +import sys + +def main(): + with open('dungeons/index.html', 'r', encoding='utf-8-sig') as f: + content = f.read() + + target = """ + 異界遺構 シルクス・ツイニング + Lv80 (IL410〜) + 非対応 + 「Long Fall」の大人気BGM。アラグのハイテク防衛、タイクーン。 + 準備中 + """ + + replacement = """ + 異界遺構 シルクス・ツイニング + Lv80 (IL410〜) + 非対応 + 「Long Fall」の大人気BGM。アラグのハイテク防衛、タイクーン。 + 攻略を見る ➜ + """ + + 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/twinning.html', 'r', encoding='utf-8-sig') as f: + twi = f.read() + twi_lines = [line.rstrip() for line in twi.splitlines()] + twi_clean = '\r\n'.join(twi_lines) + '\r\n' + with open('dungeons/twinning.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + twi_clean.encode('utf-8')) + + print("異界遺構 シルクス・ツイニングのリンク更新および正規化が完了しました。") + +if __name__ == '__main__': + main() diff --git a/tools/update_ultima_weapon.py b/tools/update_ultima_weapon.py new file mode 100644 index 0000000..abd46ec --- /dev/null +++ b/tools/update_ultima_weapon.py @@ -0,0 +1,43 @@ +import sys + +def main(): + with open('trials/index.html', 'r', encoding='utf-8-sig') as f: + content = f.read() + + target = """ + 究極幻想 アルテマウェポン (極アルテマ) + Lv50 (IL61〜) + 極 (8人) + エーテル波動爆雷処理、3蛮神技連続発動、誘導レーザー。 + 準備中 + """ + + replacement = """ + 究極幻想 アルテマウェポン (極アルテマ) + Lv50 (IL61〜) + 極 (8人) + エーテル波動爆雷処理、3蛮神技連続発動、誘導レーザー。 + 攻略を見る ➜ + """ + + 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('trials/index.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + content_clean.encode('utf-8')) + + with open('trials/ultima_weapon.html', 'r', encoding='utf-8-sig') as f: + ultima = f.read() + ultima_lines = [line.rstrip() for line in ultima.splitlines()] + ultima_clean = '\r\n'.join(ultima_lines) + '\r\n' + with open('trials/ultima_weapon.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + ultima_clean.encode('utf-8')) + + print("究極幻想 アルテマウェポンのリンク更新および正規化が完了しました。") + +if __name__ == '__main__': + main() diff --git a/tools/update_ultimate_alexander.py b/tools/update_ultimate_alexander.py new file mode 100644 index 0000000..ad7f384 --- /dev/null +++ b/tools/update_ultimate_alexander.py @@ -0,0 +1,43 @@ +import sys + +def main(): + with open('trials/index.html', 'r', encoding='utf-8-sig') as f: + content = f.read() + + target = """ + 絶アレキサンダー討滅戦 + Lv80 (IL475シンク) + 絶 (Ultimate) + リビングリキッド、チェイサー・ジャスティス、完全体アレキ。称号「The Perfect Legend」。 + 準備中 + """ + + replacement = """ + 絶アレキサンダー討滅戦 + Lv80 (IL475シンク) + 絶 (Ultimate) + リビングリキッド、チェイサー・ジャスティス、完全体アレキ。称号「The Perfect Legend」。 + 攻略を見る ➜ + """ + + 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('trials/index.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + content_clean.encode('utf-8')) + + with open('trials/ultimate_alexander.html', 'r', encoding='utf-8-sig') as f: + alex = f.read() + alex_lines = [line.rstrip() for line in alex.splitlines()] + alex_clean = '\r\n'.join(alex_lines) + '\r\n' + with open('trials/ultimate_alexander.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + alex_clean.encode('utf-8')) + + print("絶アレキサンダー討滅戦のリンク更新および正規化が完了しました。") + +if __name__ == '__main__': + main() diff --git a/tools/update_ultimate_bahamut.py b/tools/update_ultimate_bahamut.py new file mode 100644 index 0000000..da213b3 --- /dev/null +++ b/tools/update_ultimate_bahamut.py @@ -0,0 +1,43 @@ +import sys + +def main(): + with open('trials/index.html', 'r', encoding='utf-8-sig') as f: + content = f.read() + + target = """ + 絶バハムート討滅戦 + Lv70 (IL340シンク) + 絶 (Ultimate) + ツインタニア・ネール・バハムート3連戦。金バハ。称号「The Legend」。 + 準備中 + """ + + replacement = """ + 絶バハムート討滅戦 + Lv70 (IL340シンク) + 絶 (Ultimate) + ツインタニア・ネール・バハムート3連戦。金バハ。称号「The Legend」。 + 攻略を見る ➜ + """ + + 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('trials/index.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + content_clean.encode('utf-8')) + + with open('trials/ultimate_bahamut.html', 'r', encoding='utf-8-sig') as f: + baha = f.read() + baha_lines = [line.rstrip() for line in baha.splitlines()] + baha_clean = '\r\n'.join(baha_lines) + '\r\n' + with open('trials/ultimate_bahamut.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + baha_clean.encode('utf-8')) + + print("絶バハムート討滅戦のリンク更新および正規化が完了しました。") + +if __name__ == '__main__': + main() diff --git a/tools/update_ultimate_dragonsong.py b/tools/update_ultimate_dragonsong.py new file mode 100644 index 0000000..b944d5c --- /dev/null +++ b/tools/update_ultimate_dragonsong.py @@ -0,0 +1,43 @@ +import sys + +def main(): + with open('trials/index.html', 'r', encoding='utf-8-sig') as f: + content = f.read() + + target = """ + 絶竜詩戦争 + Lv90 (IL605シンク) + 絶 (Ultimate) + オルシュファン救出ifルート、騎神・邪竜・二天竜・最終騎神。称号「The Dragonsong's Reprise」。 + 準備中 + """ + + replacement = """ + 絶竜詩戦争 + Lv90 (IL605シンク) + 絶 (Ultimate) + オルシュファン救出ifルート、騎神・邪竜・二天竜・最終騎神。称号「The Dragonsong's Reprise」。 + 攻略を見る ➜ + """ + + 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('trials/index.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + content_clean.encode('utf-8')) + + with open('trials/ultimate_dragonsong.html', 'r', encoding='utf-8-sig') as f: + dsr = f.read() + dsr_lines = [line.rstrip() for line in dsr.splitlines()] + dsr_clean = '\r\n'.join(dsr_lines) + '\r\n' + with open('trials/ultimate_dragonsong.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + dsr_clean.encode('utf-8')) + + print("絶竜詩戦争のリンク更新および正規化が完了しました。") + +if __name__ == '__main__': + main() diff --git a/tools/update_ultimate_eden.py b/tools/update_ultimate_eden.py new file mode 100644 index 0000000..ec1a490 --- /dev/null +++ b/tools/update_ultimate_eden.py @@ -0,0 +1,43 @@ +import sys + +def main(): + with open('trials/index.html', 'r', encoding='utf-8-sig') as f: + content = f.read() + + target = """ + 絶もうひとつの未来 + Lv100 (IL710シンク) + 絶 (Ultimate) + 【パッチ7.1最新絶】 エデン共鳴編・再生編ifストーリー。光の巫女と闇の巫女。 + 準備中 + """ + + replacement = """ + 絶もうひとつの未来 + Lv100 (IL710シンク) + 絶 (Ultimate) + 【パッチ7.1最新絶】 エデン共鳴編・再生編ifストーリー。光の巫女と闇の巫女。 + 攻略を見る ➜ + """ + + 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('trials/index.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + content_clean.encode('utf-8')) + + with open('trials/ultimate_eden.html', 'r', encoding='utf-8-sig') as f: + eden = f.read() + eden_lines = [line.rstrip() for line in eden.splitlines()] + eden_clean = '\r\n'.join(eden_lines) + '\r\n' + with open('trials/ultimate_eden.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + eden_clean.encode('utf-8')) + + print("絶もうひとつの未来のリンク更新および正規化が完了しました。") + +if __name__ == '__main__': + main() diff --git a/tools/update_ultimate_omega.py b/tools/update_ultimate_omega.py new file mode 100644 index 0000000..8728291 --- /dev/null +++ b/tools/update_ultimate_omega.py @@ -0,0 +1,43 @@ +import sys + +def main(): + with open('trials/index.html', 'r', encoding='utf-8-sig') as f: + content = f.read() + + target = """ + 絶オメガ検証戦 + Lv90 (IL635シンク) + 絶 (Ultimate) + オメガ、オメガM/F、ファイナルオメガ、デュナミスオメガ。称号「The Alpha Legend」。 + 準備中 + """ + + replacement = """ + 絶オメガ検証戦 + Lv90 (IL635シンク) + 絶 (Ultimate) + オメガ、オメガM/F、ファイナルオメガ、デュナミスオメガ。称号「The Alpha Legend」。 + 攻略を見る ➜ + """ + + 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('trials/index.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + content_clean.encode('utf-8')) + + with open('trials/ultimate_omega.html', 'r', encoding='utf-8-sig') as f: + top = f.read() + top_lines = [line.rstrip() for line in top.splitlines()] + top_clean = '\r\n'.join(top_lines) + '\r\n' + with open('trials/ultimate_omega.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + top_clean.encode('utf-8')) + + print("絶オメガ検証戦のリンク更新および正規化が完了しました。") + +if __name__ == '__main__': + main() diff --git a/tools/update_ultimate_ultima.py b/tools/update_ultimate_ultima.py new file mode 100644 index 0000000..c0d301b --- /dev/null +++ b/tools/update_ultimate_ultima.py @@ -0,0 +1,43 @@ +import sys + +def main(): + with open('trials/index.html', 'r', encoding='utf-8-sig') as f: + content = f.read() + + target = """ + 絶アルテマウェポン破壊作戦 + Lv70 (IL375シンク) + 絶 (Ultimate) + ガルーダ・イフリート・タイタン覚醒。乱撃・追撃・爆撃。称号「The Ultimate Legend」。 + 準備中 + """ + + replacement = """ + 絶アルテマウェポン破壊作戦 + Lv70 (IL375シンク) + 絶 (Ultimate) + ガルーダ・イフリート・タイタン覚醒。乱撃・追撃・爆撃。称号「The Ultimate Legend」。 + 攻略を見る ➜ + """ + + 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('trials/index.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + content_clean.encode('utf-8')) + + with open('trials/ultimate_ultima.html', 'r', encoding='utf-8-sig') as f: + ultima = f.read() + ultima_lines = [line.rstrip() for line in ultima.splitlines()] + ultima_clean = '\r\n'.join(ultima_lines) + '\r\n' + with open('trials/ultimate_ultima.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + ultima_clean.encode('utf-8')) + + print("絶アルテマウェポン破壊作戦のリンク更新および正規化が完了しました。") + +if __name__ == '__main__': + main() diff --git a/tools/update_vanaspati.py b/tools/update_vanaspati.py new file mode 100644 index 0000000..202b988 --- /dev/null +++ b/tools/update_vanaspati.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +import sys + +def normalize_file(filepath): + with open(filepath, 'r', encoding='utf-8') as f: + content = f.read() + content = content.lstrip('\ufeff') + lines = [line.rstrip() for line in content.splitlines()] + norm_lines = [] + prev_blank = False + for line in lines: + if line == '': + if not prev_blank: + norm_lines.append(line) + prev_blank = True + else: + norm_lines.append(line) + prev_blank = False + result = '\r\n'.join(norm_lines) + '\r\n' + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + result.encode('utf-8')) + +normalize_file('dungeons/vanaspati.html') + +with open('dungeons/index.html', 'r', encoding='utf-8') as f: + text = f.read() + +target = """ + 終末樹海 ヴァナスパティ + Lv85 (IL510〜) + 対応 + 終末の獣に変異する民。隕石落下、炎熱地獄、変異体スヴァーバヌ。 + 準備中 + """ + +replacement = """ + 終末樹海 ヴァナスパティ + Lv85 (IL510〜) + 対応 + 終末の獣に変異する民。隕石落下、炎熱地獄、変異体スヴァーバヌ。 + 攻略を見る ➜ + """ + +if target in text: + text = text.replace(target, replacement) + with open('dungeons/index.html', 'w', encoding='utf-8') as f: + f.write(text) + normalize_file('dungeons/index.html') + print("SUCCESS: Updated dungeons/index.html with Vanaspati link.") +else: + print("ERROR: Target string not found in dungeons/index.html") diff --git a/tools/update_void_ark.py b/tools/update_void_ark.py new file mode 100644 index 0000000..8d39cd3 --- /dev/null +++ b/tools/update_void_ark.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +import sys + +def normalize_file(filepath): + with open(filepath, 'r', encoding='utf-8') as f: + content = f.read() + content = content.lstrip('\ufeff') + lines = [line.rstrip() for line in content.splitlines()] + norm_lines = [] + prev_blank = False + for line in lines: + if line == '': + if not prev_blank: + norm_lines.append(line) + prev_blank = True + else: + norm_lines.append(line) + prev_blank = False + result = '\r\n'.join(norm_lines) + '\r\n' + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + result.encode('utf-8')) + +normalize_file('raids/void_ark.html') + +with open('raids/index.html', 'r', encoding='utf-8') as f: + text = f.read() + +target = """ + 魔航船 ヴォイドアーク + Lv60 (蒼天3.x) + 24人 (A/B/C) + マハ第1弾。ケトゥ・ケトゥ、イルミンスール、キュクレイン、エキドナ。 + 準備中 + """ + +replacement = """ + 魔航船 ヴォイドアーク + Lv60 (蒼天3.x) + 24人 (A/B/C) + マハ第1弾。ケトゥ・ケトゥ、イルミンスール、キュクレイン、エキドナ。 + 攻略を見る ➜ + """ + +if target in text: + text = text.replace(target, replacement) + with open('raids/index.html', 'w', encoding='utf-8') as f: + f.write(text) + normalize_file('raids/index.html') + print("SUCCESS: Updated raids/index.html with Void Ark link.") +else: + print("ERROR: Target string not found in raids/index.html") diff --git a/tools/update_wol.py b/tools/update_wol.py new file mode 100644 index 0000000..0dfd93a --- /dev/null +++ b/tools/update_wol.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +import os +import sys + +def normalize_file(filepath): + with open(filepath, 'rb') as f: + raw = f.read() + content = raw.decode('utf-8', errors='replace').lstrip('\ufeff') + content = content.replace('\r\n', '\n').replace('\r', '\n') + lines = [line.rstrip(' \t') for line in content.split('\n')] + cleaned_lines = [] + prev_empty = False + for line in lines: + if line == '': + if not prev_empty: + cleaned_lines.append(line) + prev_empty = True + else: + cleaned_lines.append(line) + prev_empty = False + new_content = '\r\n'.join(cleaned_lines) + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + new_content.encode('utf-8')) + print(f"Normalized: {filepath}") + +index_path = 'trials/index.html' +with open(index_path, 'r', encoding='utf-8') as f: + lines = f.readlines() + +updated = False +for i, line in enumerate(lines): + if 'ウォーリア・オブ・ライト討滅戦' in line: + for k in range(i, i+6): + if '準備中' in lines[k]: + lines[k] = lines[k].replace('準備中', '攻略を見る ➜') + updated = True + print(f"Replaced line {k+1}") + break + if updated: + break + +if updated: + with open(index_path, 'w', encoding='utf-8') as f: + f.writelines(lines) + print("Successfully updated trials/index.html for warrior_of_light") +else: + print("Failed to find target row in trials/index.html") + +normalize_file('trials/index.html') +normalize_file('trials/warrior_of_light.html') diff --git a/tools/update_yojimbo.py b/tools/update_yojimbo.py new file mode 100644 index 0000000..95b7093 --- /dev/null +++ b/tools/update_yojimbo.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +import os +import sys + +def normalize_file(filepath): + with open(filepath, 'rb') as f: + raw = f.read() + content = raw.decode('utf-8', errors='replace').lstrip('\ufeff') + content = content.replace('\r\n', '\n').replace('\r', '\n') + lines = [line.rstrip(' \t') for line in content.split('\n')] + cleaned_lines = [] + prev_empty = False + for line in lines: + if line == '': + if not prev_empty: + cleaned_lines.append(line) + prev_empty = True + else: + cleaned_lines.append(line) + prev_empty = False + new_content = '\r\n'.join(cleaned_lines) + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + new_content.encode('utf-8')) + print(f"Normalized: {filepath}") + +index_path = 'trials/index.html' +with open(index_path, 'r', encoding='utf-8') as f: + lines = f.readlines() + +updated = False +for i, line in enumerate(lines): + if 'ヨウジンボウ討滅戦' in line: + for k in range(i, i+6): + if '準備中' in lines[k]: + lines[k] = lines[k].replace('準備中', '攻略を見る ➜') + updated = True + print(f"Replaced line {k+1}") + break + if updated: + break + +if updated: + with open(index_path, 'w', encoding='utf-8') as f: + f.writelines(lines) + print("Successfully updated trials/index.html for yojimbo") +else: + print("Failed to find target row in trials/index.html") + +normalize_file('trials/index.html') +normalize_file('trials/yojimbo.html') diff --git a/tools/update_zeromus.py b/tools/update_zeromus.py new file mode 100644 index 0000000..a9a2fb1 --- /dev/null +++ b/tools/update_zeromus.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +import os +import sys + +def normalize_file(filepath): + with open(filepath, 'rb') as f: + raw = f.read() + content = raw.decode('utf-8', errors='replace').lstrip('\ufeff') + content = content.replace('\r\n', '\n').replace('\r', '\n') + lines = [line.rstrip(' \t') for line in content.split('\n')] + cleaned_lines = [] + prev_empty = False + for line in lines: + if line == '': + if not prev_empty: + cleaned_lines.append(line) + prev_empty = True + else: + cleaned_lines.append(line) + prev_empty = False + new_content = '\r\n'.join(cleaned_lines) + with open(filepath, 'wb') as f: + f.write(b'\xef\xbb\xbf' + new_content.encode('utf-8')) + print(f"Normalized: {filepath}") + +index_path = 'trials/index.html' +with open(index_path, 'r', encoding='utf-8') as f: + lines = f.readlines() + +updated = False +for i, line in enumerate(lines): + if 'ゼロムス討滅戦' in line: + for k in range(i, i+6): + if '準備中' in lines[k]: + lines[k] = lines[k].replace('準備中', '攻略を見る ➜') + updated = True + print(f"Replaced line {k+1}") + break + if updated: + break + +if updated: + with open(index_path, 'w', encoding='utf-8') as f: + f.writelines(lines) + print("Successfully updated trials/index.html for zeromus") +else: + print("Failed to find target row in trials/index.html") + +normalize_file('trials/index.html') +normalize_file('trials/zeromus.html') diff --git a/tools/update_zurvan.py b/tools/update_zurvan.py new file mode 100644 index 0000000..1578013 --- /dev/null +++ b/tools/update_zurvan.py @@ -0,0 +1,43 @@ +import sys + +def main(): + with open('trials/index.html', 'r', encoding='utf-8-sig') as f: + content = f.read() + + target = """ + 鬼神ズルワーン討滅戦 / 極ズルワーン + Lv60 (IL235〜/250〜) + ノーマル / 極 + 波動砲、紋踏み(サザンクロス)、炎氷のデバフ同色ペア。 + 準備中 + """ + + replacement = """ + 鬼神ズルワーン討滅戦 / 極ズルワーン + Lv60 (IL235〜/250〜) + ノーマル / 極 + 波動砲、紋踏み(サザンクロス)、炎氷のデバフ同色ペア。 + 攻略を見る ➜ + """ + + 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('trials/index.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + content_clean.encode('utf-8')) + + with open('trials/zurvan.html', 'r', encoding='utf-8-sig') as f: + zurvan = f.read() + zurvan_lines = [line.rstrip() for line in zurvan.splitlines()] + zurvan_clean = '\r\n'.join(zurvan_lines) + '\r\n' + with open('trials/zurvan.html', 'wb') as f: + f.write(b'\xef\xbb\xbf' + zurvan_clean.encode('utf-8')) + + print("鬼神ズルワーン討滅戦のリンク更新および正規化が完了しました。") + +if __name__ == '__main__': + main()