2601회 채점자료 업데이트
This commit is contained in:
@@ -6,17 +6,17 @@ import re
|
||||
# 채점자료 정답 파일만 복사하는 스크립트
|
||||
|
||||
# ===== 사용자 설정 =====
|
||||
source_dir = r"D:\project\HWP\HWP-Scoring\회차별채점자료\2512"
|
||||
exam_round = "2512" # 회차명
|
||||
source_dir = r"D:\project\HWP\HWP-Scoring\회차별채점자료\2601_2"
|
||||
exam_round = "2601_2" # 회차명
|
||||
exam_code = "DIW" # 코드명
|
||||
# =======================
|
||||
|
||||
|
||||
def get_exam_type(filename: str):
|
||||
"""
|
||||
파일명에서 확장자 앞의 마지막 알파벳을 추출 (예: 국어A.hwpx → A)
|
||||
파일명에서 확장자 앞의 마지막 알파벳을 추출 (예: 국어A.hwp → A)
|
||||
"""
|
||||
match = re.search(r"([A-Za-z])\.hwpx$", filename)
|
||||
match = re.search(r"([A-Za-z])\.hwp$", filename)
|
||||
return match.group(1).upper() if match else None
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ def copy_exam_files():
|
||||
copied = 0
|
||||
|
||||
for path in src.rglob("*"):
|
||||
if path.is_file() and path.suffix.lower() == ".hwpx":
|
||||
if path.is_file() and path.suffix.lower() == ".hwp":
|
||||
exam_type = get_exam_type(path.name)
|
||||
if not exam_type:
|
||||
continue # 마지막 문자가 알파벳이 아니면 건너뜀
|
||||
|
||||
Reference in New Issue
Block a user