파일 저장 항목 공란 추가

This commit is contained in:
2025-04-02 17:59:08 +09:00
parent cd5d19212c
commit 148437c97a
4 changed files with 33 additions and 12 deletions

View File

@@ -152,7 +152,7 @@ class XMLScorer:
}
print(f"File name: {results['filename']}")
for criterion_id, criterion in self.scoring_criteria.items():
# 키값의 첫 숫자를 확인
@@ -167,11 +167,11 @@ class XMLScorer:
previous_first_digit = first_digit
id = criterion_id
xpath = criterion['path']
xpath2 = criterion['path2']
search_value = criterion['searchValue']
right_answer = criterion['value']
points = criterion['points']
xpath = criterion['path'] if 'path' in criterion else None
xpath2 = criterion['path2'] if 'path2' in criterion else None
search_value = criterion['searchValue'] if 'searchValue' in criterion else None
right_answer = criterion['value'] if 'value' in criterion else None
points = criterion['points'] if 'points' in criterion else None
category = criterion['category']
item = criterion['item']
similar_text = None
@@ -254,7 +254,7 @@ class XMLScorer:
partial_score += scoring['points']
print(f'scoring: {scoring}')
results['total_score'] = total_score
if previous_first_digit is not None:
@@ -544,11 +544,11 @@ def main():
exam_round = '2503'
exam_types = [
'A',
'B',
'C',
# 'B',
# 'C',
]
test_mode = False
# test_mode = True
# test_mode = False
test_mode = True
output_excel_paths = []
for exam_type in exam_types:
@@ -577,4 +577,4 @@ def main():
print(f"채점 결과 엑셀 파일: {output_excel_paths}")
if __name__ == '__main__':
main()
main()