fix: ダンジョン・レイド・討滅戦全209ページのヘッダー・サイドバー構造を大元テンプレート(Seesaaニュートラルグレーiframe共通化)に完全統一
This commit is contained in:
1 parent
a653dcb5a6
commit
6d752556d7
217 files changed
+5958
-2770
No files matched your search
@@ -0,0 +1,43 @@
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
|
||||
sys.stdout.reconfigure(encoding='utf-8')
|
||||
|
||||
with open('tools/test_extract.py', 'r', encoding='utf-8') as fp:
|
||||
code = fp.read()
|
||||
|
||||
# extract_content 関数定義部分をそのまま利用
|
||||
exec(code[:code.find("test_files = [")])
|
||||
|
||||
unknown_files = []
|
||||
success_count = 0
|
||||
|
||||
with open('tools/list_non_conforming_pages.py', 'r', encoding='utf-8') as fp:
|
||||
lines = fp.readlines()
|
||||
|
||||
for root, dirs, files in os.walk('.'):
|
||||
if '.git' in root or 'node_modules' in root:
|
||||
continue
|
||||
for f in files:
|
||||
if f.endswith('.html'):
|
||||
path = os.path.join(root, f).replace('\\', '/')
|
||||
if path in ['./common/header.html', './common/sidebar.html', './common/templates/dungeon_raid_template.html']:
|
||||
continue
|
||||
with open(path, 'r', encoding='utf-8', errors='ignore') as fp:
|
||||
content = fp.read()
|
||||
has_iframe_header = 'wiki-header-frame' in content
|
||||
has_iframe_sidebar = 'wiki-sidebar-frame' in content
|
||||
if not (has_iframe_header and has_iframe_sidebar):
|
||||
t, d, c, pattern = extract_content(content)
|
||||
if pattern == "UNKNOWN" or not c:
|
||||
unknown_files.append(path)
|
||||
else:
|
||||
success_count += 1
|
||||
|
||||
print(f"抽出成功ファイル数: {success_count} / {success_count + len(unknown_files)}")
|
||||
print(f"抽出失敗ファイル数: {len(unknown_files)}")
|
||||
if unknown_files:
|
||||
print("失敗ファイル一覧:")
|
||||
for uf in unknown_files:
|
||||
print(uf)
|
||||
Reference in new issue
Block a user