diff --git a/psdExport_2.js b/psdExport_2.js index e0cfe38..933a17d 100644 --- a/psdExport_2.js +++ b/psdExport_2.js @@ -14,8 +14,9 @@ const todayDate = getToday(); // -------------------------------------------------------- // const scoringJson = require('./DIC_2502A.json'); // const scoringJson = require('./DIC_2502B.json'); -const scoringJson = require('./DIC_2502C.json'); +// const scoringJson = require('./DIC_2502C.json'); // const scoringJson = require('./DIC_2502D.json'); +const scoringJson = require('./samples/DIC(gompic).json'); // TEST // const scoringJson = require('./DIC_2502A_TEST.json'); @@ -31,7 +32,7 @@ const answerFilesDir = './samples/'; // 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'; // -------------------------------------------------------- @@ -43,8 +44,9 @@ const answerFilesDir = './output/C/TEST'; // TEST // const outputExcelFile = './'+todayDate+'_DIC_2502A_TEST.xlsx'; // const outputExcelFile = './'+todayDate+'_DIC_2502B_TEST.xlsx'; -const outputExcelFile = './' + todayDate + '_DIC_2502C_TEST.xlsx'; +// const outputExcelFile = './' + todayDate + '_DIC_2502C_TEST.xlsx'; // const outputExcelFile = './'+todayDate+'_DIC_2502D_TEST.xlsx'; +const outputExcelFile = './'+todayDate+'_gompic.xlsx'; // -------------------------------------------------------- diff --git a/samples/DIC(gompic).json b/samples/DIC(gompic).json new file mode 100644 index 0000000..0524501 --- /dev/null +++ b/samples/DIC(gompic).json @@ -0,0 +1,149 @@ +{ + "4": { + "1": { + "type": "multi", + "ele": "//Document/Width/@value | //Document/Height/@value", + "value": [ + "650", + "450" + ], + "point": 5, + "desc": "캔버스 사이즈 650*450" + }, + "2": { + "ele": "none", + "point": 5, + "desc": "배경색 문항은 채점 불가" + }, + "3": { + "ele": "//Layer[contains(Name/@value, 'Layer 2')][MaskOpType/@value='Layering']", + "point": 6 + }, + "4": { + "ele": "none", + "point": 5, + "desc": "가로방향 흐릿하게 문항은 채점 불가" + }, + "5": { + "ele": "//Layer[contains(Name/@value, 'Layer 3')]//shape_type/@value", + "answer": "ROUNDED_RECTANGLE", + "point": 6 + }, + "6": { + "type": "size", + "posX": "//Layer[contains(Name/@value, 'Layer 3')]//op_points[Item]/Item[last()]/X/@value - //Layer[contains(Name/@value, 'Layer 3')]//op_points[Item]/Item[1]/X/@value", + "posY": "//Layer[contains(Name/@value, 'Layer 3')]//op_points[Item]/Item[last()]/Y/@value - //Layer[contains(Name/@value, 'Layer 3')]//op_points[Item]/Item[1]/Y/@value", + "value": { + "width": 370, + "height": 60 + }, + "point": 3, + "desc": "레이어 쉐이프 X, Y 좌표를 가지고 너비, 높이 계산하여 정답 채점" + }, + "7": { + "type": "gradient", + "startColor": "//Layer[contains(Name/@value, 'Layer 3')]//gradient_start_color/@value", + "endColor": "//Layer[contains(Name/@value, 'Layer 3')]//gradient_end_color/@value", + "value": { + "startColor": "347813", + "endColor": "041177" + }, + "point": 6 + }, + "8": { + "type": "exact", + "ele": "//Layer//Shape[shape_type/@value='TEXT']/lines/Item/@value", + "value": "어린이 과학관", + "point": 5 + }, + "9": { + "type": "exact", + "ele": "//Layer//Shape[shape_type/@value='TEXT']/font/Name/@value", + "value": "돋움", + "point": 3 + }, + "10": { + "type": "exact", + "ele": "//Layer//Shape[shape_type/@value='TEXT']/font/Italic/@value", + "value": "True", + "point": 3 + }, + "11": { + "type": "exact", + "ele": "//Layer//Shape[shape_type/@value='TEXT']/font/Size/@value", + "value": "32", + "point": 3 + }, + "12": { + "type": "color", + "ele": "//Layer//Shape[shape_type/@value='TEXT'][contains(draw_type/@value, 'Interior')]/secondary_color/@value", + "value": "f04da5", + "point": 3, + "desc": "색상 코드 비교 시 소문자로 입력할 것" + }, + "13": { + "type": "exact", + "ele": "//Layer//Shape[shape_type/@value='TEXT']/outline_peninfo/Width/@value", + "value": "3", + "point": 3 + }, + "14": { + "type": "color", + "ele": "//Layer//Shape[shape_type/@value='TEXT'][contains(draw_type/@value, 'Outline')]/primary_color/@value", + "value": "ffe000", + "point": 3, + "desc": "색상 코드 비교 시 소문자로 입력할 것" + }, + "15": { + "ele": "//Layer[MaskOpType/@value='Clipping'][last()]", + "point": 6, + "desc": "클리핑 마스크 항목은 별도 레이어로 추가되고 해당 속성을 추가해놓은 레이어가 있는지 여부 체크 함" + }, + "16": { + "ele": "//Layer[contains(Name/@value, 'Layer 3')]//shape_type/@value", + "value": "RECTANGLE", + "point": 3 + }, + "17": { + "type": "size", + "posX": "//Layer[contains(Name/@value, 'Layer 5')]//op_points[Item]/Item[last()]/X/@value - //Layer[contains(Name/@value, 'Layer 5')]//op_points[Item]/Item[1]/X/@value", + "posY": "//Layer[contains(Name/@value, 'Layer 5')]//op_points[Item]/Item[last()]/Y/@value - //Layer[contains(Name/@value, 'Layer 5')]//op_points[Item]/Item[1]/Y/@value", + "value": { + "width": 150, + "height": 150 + }, + "point": 3, + "desc": "레이어 쉐이프 X, Y 좌표를 가지고 너비, 높이 계산하여 정답 채점" + }, + "18": { + "ele": "//Layer[contains(Name/@value, 'Layer 5')]//outline_peninfo/Width/@value", + "value": "7", + "point": 3 + }, + "19": { + "type": "color", + "ele": "//Layer//Shape[shape_type/@value='RECTANGLE'][contains(draw_type/@value, 'Outline')]/primary_color/@value", + "value": "008878", + "point": 3, + "desc": "색상 코드 비교 시 소문자로 입력할 것(채우기:secondary_color, 외곽선:primary_color)" + }, + "20": { + "type": "shadow", + "ele": { + "shadow": "//Layer//Shape[shape_type/@value='RECTANGLE'][contains(draw_type/@value, 'Shadow')]", + "width": "//Layer//Shape[shape_type/@value='RECTANGLE'][contains(draw_type/@value, 'Shadow')]/shadow_width/@value", + "distance": "//Layer//Shape[shape_type/@value='RECTANGLE'][contains(draw_type/@value, 'Shadow')]/shadow_distance/@value", + "blur": "//Layer//Shape[shape_type/@value='RECTANGLE'][contains(draw_type/@value, 'Shadow')]/shadow_blur/@value", + "angle": "//Layer//Shape[shape_type/@value='RECTANGLE'][contains(draw_type/@value, 'Shadow')]/shadow_angle/@value" + }, + "value": { + "width": "5", + "distance": "3", + "blur": "1", + "angle": "320" + }, + "point": 5, + "desc": "그림자 속성이 있는 경우 그림자 속성의 너비, 거리, 흐림 정도, 각도를 비교하여 정답 채점" + } + } +} \ No newline at end of file