diff --git a/250328_DIC_2503A_TEST.xlsx b/250328_DIC_2503A_TEST.xlsx deleted file mode 100644 index b13b4ad..0000000 Binary files a/250328_DIC_2503A_TEST.xlsx and /dev/null differ diff --git a/250328_DIC_2503B_TEST.xlsx b/250328_DIC_2503B_TEST.xlsx deleted file mode 100644 index 2aa0472..0000000 Binary files a/250328_DIC_2503B_TEST.xlsx and /dev/null differ diff --git a/250331_DIC_2503A_채점결과.xlsx b/250331_DIC_2503A_채점결과.xlsx new file mode 100644 index 0000000..b6933be Binary files /dev/null and b/250331_DIC_2503A_채점결과.xlsx differ diff --git a/250331_DIC_2503B_채점결과.xlsx b/250331_DIC_2503B_채점결과.xlsx new file mode 100644 index 0000000..ed847a7 Binary files /dev/null and b/250331_DIC_2503B_채점결과.xlsx differ diff --git a/250328_DIC_2503C_TEST.xlsx b/250331_DIC_2503C_TEST.xlsx similarity index 92% rename from 250328_DIC_2503C_TEST.xlsx rename to 250331_DIC_2503C_TEST.xlsx index 209122c..7d7db2a 100644 Binary files a/250328_DIC_2503C_TEST.xlsx and b/250331_DIC_2503C_TEST.xlsx differ diff --git a/250331_DIC_2503C_채점결과.xlsx b/250331_DIC_2503C_채점결과.xlsx new file mode 100644 index 0000000..addd228 Binary files /dev/null and b/250331_DIC_2503C_채점결과.xlsx differ diff --git a/psdExport_2.js b/psdExport_2.js index 92af310..dc1f833 100644 --- a/psdExport_2.js +++ b/psdExport_2.js @@ -12,9 +12,10 @@ const getToday = require('./getToday.js'); const todayDate = getToday(); // -------------------------------------------------------- -const scoringJson = require('./DIC_2503A.json'); +// const scoringJson = require('./DIC_2503A.json'); // const scoringJson = require('./DIC_2503B.json'); -// const scoringJson = require('./DIC_2503C.json'); +const scoringJson = require('./DIC_2503C.json'); +const { get } = require('http'); // const scoringJson = require('./DIC_2503D.json'); // TEST @@ -23,7 +24,7 @@ const scoringJson = require('./DIC_2503A.json'); // const scoringJson = require('./DIC_2503C_TEST.json'); // const scoringJson = require('./DIC_2503D_TEST.json'); // -------------------------------------------------------- -const answerFilesDir = './output/A/DIC'; +// const answerFilesDir = './output/A/DIC'; // const answerFilesDir = './output/B/DIC'; // const answerFilesDir = './output/C/DIC'; // const answerFilesDir = './output/D/DIC'; @@ -31,19 +32,19 @@ const answerFilesDir = './output/A/DIC'; // TEST // const answerFilesDir = './output/A/TEST'; // const answerFilesDir = './output/B/TEST'; -// const answerFilesDir = './output/C/TEST'; +const answerFilesDir = './output/C/TEST'; // const answerFilesDir = './output/D/TEST'; // -------------------------------------------------------- -const outputExcelFile = './'+todayDate+'_DIC_2503A_채점결과.xlsx'; +// const outputExcelFile = './'+todayDate+'_DIC_2503A_채점결과.xlsx'; // const outputExcelFile = './'+todayDate+'_DIC_2503B_채점결과.xlsx'; -// const outputExcelFile = './'+todayDate+'_DIC_2503C_채점결과.xlsx'; +// const outputExcelFile = './' + todayDate + '_DIC_2503C_채점결과.xlsx'; // const outputExcelFile = './'+todayDate+'_DIC_2503D_채점결과.xlsx'; // TEST // const outputExcelFile = './'+todayDate+'_DIC_2503A_TEST.xlsx'; -// const outputExcelFile = './' + todayDate + '_DIC_2503B_TEST.xlsx'; -// const outputExcelFile = './'+todayDate+'_DIC_2503C_TEST.xlsx'; +// const outputExcelFile = './'+todayDate+'_DIC_2503B_TEST.xlsx'; +const outputExcelFile = './'+todayDate+'_DIC_2503C_TEST.xlsx'; // const outputExcelFile = './'+todayDate+'_DIC_2503D_TEST.xlsx'; // -------------------------------------------------------- @@ -166,7 +167,7 @@ function getTrackClipNode(xmlDoc, type, videoStartTime, openingStartTime) { let trackClipNode = null; // 동영상 자막이면 2, 오프닝 자막이면 1, 그 외는 0 - const subtitleOrder = type === 'video' ? 2 : type === 'opening' ? 1 : 0; + const subtitleOrder = type === 'video' ? 2 : type === 'opening' ? 1 : null; const startTime = type === 'video' ? videoStartTime : openingStartTime; // xpath 구문을 통해 CRTrackClip 요소의 ClipIndex를 찾음 @@ -475,6 +476,13 @@ function getGmepScore(gmepData, scoringJson, index) { // 문제의 타입이 video(동영상자막) 또는 opening(오프닝자막)일 경우 else if (type == "video" || type == "opening") { + const trackClipNode = getTrackClipNode(gmepXmlDoc, type, videoStartTime, openingStartTime); + // 찾으려는 자막이 존재하지 않는 경우 + // (2-28) 문항의 경우 오프닝 자막이 없어도 xpath구문의 sum함수 결과값이 0이 반환되는것을 방지 + if ( trackClipNode === undefined ) { + scoringResult[key] = 0; + continue; + } const result = ele ? xpath.select(ele, gmepXmlDoc) : []; const result2 = ele2 ? xpath.select(ele2, gmepXmlDoc) : []; const result3 = ele3 ? xpath.select(ele3, gmepXmlDoc) : []; @@ -546,7 +554,7 @@ function getGmepScore(gmepData, scoringJson, index) { scoringResult[key] = 0; } } - else if (type == "videoIsExist") { + else if (type == "videoIsExist") { const result = ele ? xpath.select(ele, gmepXmlDoc) : []; const result2 = ele2 ? xpath.select(ele2, gmepXmlDoc) : []; const allResults = [...[result], ...[result2]]; @@ -557,7 +565,7 @@ function getGmepScore(gmepData, scoringJson, index) { totalScore += point; scoringResult[key] = point; console.log(`🚀 ~ result.forEach ~ 정답:${rightAnswer} / 작성답안:${allResults}`); - } + } else { scoringResult[key] = 0; console.log("🚀 ~ result.forEach ~ 오답:", rightAnswer) diff --git a/z.xbook b/z.xbook index 5addf1d..8ce3b01 100644 --- a/z.xbook +++ b/z.xbook @@ -1 +1 @@ -[{"kind":2,"language":"xpath","value":"//Layer/Name/@value = 'Germs'"},{"kind":2,"language":"xpath","value":"//Layer[Name[@value='Germs']]/Effects/Item[Name[@value='선명하게'] and EffectData[amount[@value=\"12\"]]]"},{"kind":2,"language":"xpath","value":"//Layer[Name[@value='Germs']]/Effects/Item/(Name/@value | EffectData/amount/@value)"},{"kind":2,"language":"xpath","value":"//CRCUnitArr[@Name='{search}']//GCUnitPool/GCUnit[@Type='2']/@*[name()='VID100' or name()='VID101']"},{"kind":2,"language":"xpath","value":"//Layer//op_points[Item]/Item[last()]/X/@value"},{"kind":2,"language":"xpath","value":"//Layer//op_points[Item]/Item[1]/X/@value"},{"kind":2,"language":"xpath","value":"//Layer//Shape[contains(draw_type/@value, 'Interior')]/secondary_color/@value"},{"kind":2,"language":"xpath","value":"//Layer//Shape[contains(draw_type/@value, 'Interior')]/secondary_color/@value"},{"kind":2,"language":"xpath","value":"//Layer/BlendOp/@value | //Layer/Opacity/@value"},{"kind":2,"language":"xpath","value":"//CRTransFilter[@ClipIndex=count(//CRTrackList[@Name='비디오1']/CRTrackClip[@ClipIndex=count(//CRClip[@Path='이미지3.jpg']/preceding-sibling::CRClip | //CRClip[@Type='11']/CRCUnitArr[@Path='이미지3.jpg']/../preceding-sibling::CRClip)][1]/preceding-sibling::CRTrackClip)]/@*[name()='ID' or name()='Range' or name()='Type']"},{"kind":2,"language":"xpath","value":"//CRTransFilter[@ClipIndex=count(//CRTrackList[@Name='비디오1']/CRTrackClip[@ClipIndex=count(//CRClip[@Path='이미지1.jpg']/preceding-sibling::CRClip | //CRClip[@Type='11']/CRCUnitArr[@Path='이미지1.jpg']/../preceding-sibling::CRClip)][1]/preceding-sibling::CRTrackClip)]/@*[name()='ID' or name()='Range' or name()='Type']"},{"kind":2,"language":"xpath","value":"//CRTransFilter[@ClipIndex=count(//CRTrackList[@Name='비디오1']/CRTrackClip[@ClipIndex=count(//CRClip[@Path='이미지3.jpg']/preceding-sibling::CRClip)])]/@*[name()='ID' or name()='Range' or name()='Type']"}] \ No newline at end of file +[{"kind":2,"language":"xpath","value":"//Layer/Name/@value = 'Germs'"},{"kind":2,"language":"xpath","value":"//Layer[Name[@value='Germs']]/Effects/Item[Name[@value='선명하게'] and EffectData[amount[@value=\"12\"]]]"},{"kind":2,"language":"xpath","value":"//Layer[Name[@value='Germs']]/Effects/Item/(Name/@value | EffectData/amount/@value)"},{"kind":2,"language":"xpath","value":"//CRCUnitArr[@Name='{search}']//GCUnitPool/GCUnit[@Type='2']/@*[name()='VID100' or name()='VID101']"},{"kind":2,"language":"xpath","value":"//Layer//op_points[Item]/Item[last()]/X/@value"},{"kind":2,"language":"xpath","value":"//Layer//op_points[Item]/Item[1]/X/@value"},{"kind":2,"language":"xpath","value":"//Layer//Shape[contains(draw_type/@value, 'Interior')]/secondary_color/@value"},{"kind":2,"language":"xpath","value":"//Layer//Shape[contains(draw_type/@value, 'Interior')]/secondary_color/@value"},{"kind":2,"language":"xpath","value":"//Layer/BlendOp/@value | //Layer/Opacity/@value"},{"kind":2,"language":"xpath","value":"//CRTransFilter[@ClipIndex=count(//CRTrackList[@Name='비디오1']/CRTrackClip[@ClipIndex=count(//CRClip[@Path='이미지3.jpg']/preceding-sibling::CRClip | //CRClip[@Type='11']/CRCUnitArr[@Path='이미지3.jpg']/../preceding-sibling::CRClip)][1]/preceding-sibling::CRTrackClip)]/@*[name()='ID' or name()='Range' or name()='Type']"},{"kind":2,"language":"xpath","value":"//CRTransFilter[@ClipIndex=count(//CRTrackList[@Name='비디오1']/CRTrackClip[@ClipIndex=count(//CRClip[@Path='이미지1.jpg']/preceding-sibling::CRClip | //CRClip[@Type='11']/CRCUnitArr[@Path='이미지1.jpg']/../preceding-sibling::CRClip)][1]/preceding-sibling::CRTrackClip)]/@*[name()='ID' or name()='Range' or name()='Type']"},{"kind":2,"language":"xpath","value":"//CRTransFilter[@ClipIndex=count(//CRTrackList[@Name='비디오1']/CRTrackClip[@ClipIndex=count(//CRClip[@Path='이미지3.jpg']/preceding-sibling::CRClip)])]/@*[name()='ID' or name()='Range' or name()='Type']"},{"kind":2,"language":"xpath","value":"sum(//CRCUnitArr[1] and //CRTrackList[@Name='텍스트']/CRTrackClip[not(@ClipIndex='-1')][1]/preceding-sibling::CRTrackClip/@Length)"},{"kind":2,"language":"xpath","value":"sum(//CRCUnitArr[2] and //CRTrackList[@Name='텍스트']/CRTrackClip[not(@ClipIndex='-1')][2]/preceding-sibling::CRTrackClip/@Length)\r\n"}] \ No newline at end of file diff --git a/회차별채점자료/2503/excel_채점결과/250328_DIC_2503A_채점결과.xlsx b/회차별채점자료/2503/excel_채점결과/250328_DIC_2503A_채점결과.xlsx new file mode 100644 index 0000000..9019f36 Binary files /dev/null and b/회차별채점자료/2503/excel_채점결과/250328_DIC_2503A_채점결과.xlsx differ diff --git a/회차별채점자료/2503/excel_채점결과/250328_DIC_2503B_채점결과.xlsx b/회차별채점자료/2503/excel_채점결과/250328_DIC_2503B_채점결과.xlsx new file mode 100644 index 0000000..ed847a7 Binary files /dev/null and b/회차별채점자료/2503/excel_채점결과/250328_DIC_2503B_채점결과.xlsx differ diff --git a/회차별채점자료/2503/excel_채점결과/250328_DIC_2503C_채점결과.xlsx b/회차별채점자료/2503/excel_채점결과/250328_DIC_2503C_채점결과.xlsx new file mode 100644 index 0000000..addd228 Binary files /dev/null and b/회차별채점자료/2503/excel_채점결과/250328_DIC_2503C_채점결과.xlsx differ diff --git a/회차별채점자료/2503/excel_채점결과/250331_DIC_2503A_채점결과.xlsx b/회차별채점자료/2503/excel_채점결과/250331_DIC_2503A_채점결과.xlsx new file mode 100644 index 0000000..b6933be Binary files /dev/null and b/회차별채점자료/2503/excel_채점결과/250331_DIC_2503A_채점결과.xlsx differ diff --git a/회차별채점자료/2503/excel_채점결과/250331_DIC_2503B_채점결과.xlsx b/회차별채점자료/2503/excel_채점결과/250331_DIC_2503B_채점결과.xlsx new file mode 100644 index 0000000..ed847a7 Binary files /dev/null and b/회차별채점자료/2503/excel_채점결과/250331_DIC_2503B_채점결과.xlsx differ diff --git a/회차별채점자료/2503/excel_채점결과/250331_DIC_2503C_채점결과.xlsx b/회차별채점자료/2503/excel_채점결과/250331_DIC_2503C_채점결과.xlsx new file mode 100644 index 0000000..addd228 Binary files /dev/null and b/회차별채점자료/2503/excel_채점결과/250331_DIC_2503C_채점결과.xlsx differ