1. 2504회 정시 채점자료 업데이트

2.  "■ 행사안내 ■" 특수문자 제외하고 검색 적용
3. 문서 내 하이퍼링크 텍스트 존재 할 경우 해당 문자열 처리 방법 추가
This commit is contained in:
2025-04-30 17:54:55 +09:00
parent 0cb1cc0b08
commit c7357d088b
33 changed files with 26667 additions and 63 deletions

View File

@@ -392,9 +392,14 @@ class XMLScorer:
self.evaluate_answer(scoring, user_answer, right_answer, points, method="partial_score")
# 줄간격
elif "LineSpacing" in (category or ""):
# 쪽 테두리
elif "PageBorder" in (category or ""):
pageBorderfills = root.xpath(xpath)
for pageBorderfill in pageBorderfills:
headerInside = pageBorderfill.get('HeaderInside')
borderfill_id = pageBorderfill.get('BorferFill')
print( f"headerInside: {headerInside}, borderfill_id: {borderfill_id}")
break
@@ -686,7 +691,7 @@ class XMLScorer:
def main():
# 시험회차 및 유형
exam_round = '2504'
exam_round = '2504_2'
exam_types = [
'A',
# 'B',
@@ -697,20 +702,24 @@ def main():
output_excel_paths = []
for exam_type in exam_types:
scoring_criteria_path = f'./DIW_{exam_round}{exam_type}_test.json'
# scoring_criteria_path = f'./DIW_{exam_round}{exam_type}.json'
# xml(hml)파일 디렉토리 경로
# JSON 채점기준표 파일 (예시:DIW_2503A.json)
# scoring_criteria_path = f'./DIW_{exam_round}.json'
scoring_criteria_path = f'./DIW_{exam_round}_{exam_type}_new.json'
xml_directory = f'./output/{exam_type}/{"TEST" if test_mode else "DIW"}'
# xml(hml)파일 디렉토리 경로 (예시:./output/A/DIW)
# xml_directory = f'./output/{exam_type}/{"TEST" if test_mode else "DIW"}'
# 오탈자 체크를 위한 정답 파일 경로 (형식:DIW_2503A.hml)
correct_answer_file = f'./output/{exam_type}/DIW/DIW_{exam_round}{exam_type}.hml'
# 회차가 여러개인 경우
xml_directory = f'./output/{exam_round}/{exam_type}/{"TEST" if test_mode else "DIW"}'
# 엑셀 파일명 (비어있으면 자동생성)
# 오탈자 체크를 위한 정답 파일 경로 (예시:./output/A/DIW/DIW_2503A.hml)
# correct_answer_file = f'./output/{exam_type}/DIW/DIW_{exam_round}{exam_type}.hml'
correct_answer_file = f'./output/{exam_round}/{exam_type}/DIW/DIW_{exam_round}{exam_type}.hml'
# 엑셀 파일명 (비어있으면 자동생성) (예시:241001_DIW_2503A_채점결과.xlsx)
timestamp = datetime.now().strftime("%y%m%d")
# output_path = f'{timestamp}_DIW_{exam_round}{exam_type}_{"TEST" if test_mode else "채점결과"}.xlsx'
output_path = f'{timestamp}_DIW_{exam_round}{exam_type}_{"TEST" if test_mode else "채점결과"}_2.xlsx'
output_path = f'{timestamp}_DIW_{exam_round}회_{exam_type}형_{"TEST" if test_mode else "채점결과"}.xlsx'
# 채점 클래스 초기화
scorer = XMLScorer(scoring_criteria_path)