곰픽(dpi) 채점 결과 업데이트

This commit is contained in:
2025-05-07 16:58:03 +09:00
parent 38a323c0b0
commit 5ee5330e13
9 changed files with 16 additions and 12 deletions

View File

@@ -12,11 +12,12 @@ const getToday = require('./getToday.js');
const todayDate = getToday();
const examRound = '2504';
const dic_or_dpi = 'DIC'
// const dic_or_dpi = 'DIC'
const dic_or_dpi = 'DPI'
const examTypes = [
'A',
// 'A',
'B',
'C',
// 'C',
// 'D'
];
@@ -55,17 +56,20 @@ examTypes.forEach(type => {
// 맥에서 한글 디렉토리 이름을 읽어서 엑셀에 저장 할 시 자소 분리가 되어 저장되는 문제 노말라이즈해서 해결
const name = student.normalize('NFC');
const studentDir = path.join(answerFilesDir, student);
const psdFiles = fs.readdirSync(studentDir).filter(file => file.endsWith('.psd'));
// const psdFiles = fs.readdirSync(studentDir).filter(file => file.endsWith('.psd'));
const psdFiles = fs.readdirSync(studentDir).filter(file => file.toLowerCase().endsWith('.psd'));
// DIAT시험 프로젝트로 생성시 gmep확장자로
// 교육용 프로젝프로 생성시 gmdp확장자로 생성됨
// 두 경우 모두 처리
const gmepFile = fs.readdirSync(studentDir).filter(
file => file.endsWith('.gmep') || file.endsWith('.gmdp')
file => file.toLowerCase().endsWith('.gmep')
|| file.toLowerCase().endsWith('.gmdp')
);
// 곰픽 파일 gpdp 파일 이거나 xml 파일
const gpdpFiles = fs.readdirSync(studentDir).filter(
file => file.endsWith('.xml')
file => file.toLowerCase().endsWith('.xml')
);
// 학생 이름을 key로 하는 객체 생성