补全9月11日至13日课评:为13名学生创建请假文档,为5个班级创建总结文档
This commit is contained in:
18
.claude/memory/temp/verify_fix.py
Normal file
18
.claude/memory/temp/verify_fix.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import os, sys, re
|
||||
folder = os.path.abspath(sys.argv[1]) if len(sys.argv) > 1 else os.getcwd()
|
||||
files = [f for f in os.listdir(folder) if f.endswith('.html') and f != '总览.html']
|
||||
for name in sorted(files):
|
||||
p = os.path.join(folder, name)
|
||||
with open(p, encoding='utf-8') as f:
|
||||
c = f.read()
|
||||
star_html = (len(c.split('<div class="metrics">')) - 1) + c.count('class="star ') + c.count('class="star-rating')
|
||||
star_css = len(re.findall(r'\.star-rating \{|\.metric-item \{|\.metric-label \{|\.star \{|\.star\.filled|\.half-filled\.', c))
|
||||
star_js = len(re.findall(r'function initStarRatings|function setStarRating|initStarRatings\(\);', c))
|
||||
bf = c.count('backdrop-filter')
|
||||
car = 'id="cardsSlider"' in c
|
||||
sc_dn = '.student-card { display: none; }' in c
|
||||
opens = c.count('<div'); closes = c.count('</div>')
|
||||
bal = 'OK' if opens == closes else 'MISMATCH %d/%d' % (opens, closes)
|
||||
print('%-46s carousel=%-5s starHTML=%d starCSS=%d starJS=%d backdrop=%d scdn=%s div=%s' % (
|
||||
name, car, star_html, star_css, star_js, bf, sc_dn if car else 'n/a(scroll)', bal))
|
||||
Reference in New Issue
Block a user