29 lines
1.0 KiB
Python
29 lines
1.0 KiB
Python
import os
|
|
import sys
|
|
|
|
sys.stdout.reconfigure(encoding='utf-8')
|
|
|
|
non_conforming = []
|
|
|
|
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()
|
|
|
|
# 正しいiframe形式か判定: wiki-header-frame と wiki-sidebar-frame が両方あるか
|
|
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):
|
|
non_conforming.append(path)
|
|
|
|
print(f"非準拠ファイル総数: {len(non_conforming)}")
|
|
for p in non_conforming:
|
|
print(p)
|