diff --git a/binaryToChartxml.py b/binaryToChartxml.py deleted file mode 100644 index 4da8733..0000000 --- a/binaryToChartxml.py +++ /dev/null @@ -1,55 +0,0 @@ -from pathlib import Path -from lxml import etree as ET -import base64 -import re - -class binaryToChartxml: - def __init__(self, xml_path): - self.tree = ET.parse(xml_path) - self.root = self.tree.getroot() - - def decoding_bindata(self): - binary_data = self.root.xpath('//BINDATA[@Id=//BINITEM[@Format="OLE"]/@BinData]/text()') - binary_data = binary_data[0].encode('utf-8') - encoded_data = re.sub(b'', b'', binary_data) - - # print(encoded_data) - encoded_data = encoded_data.replace(b'', b'') - encoded_data = encoded_data.replace(b'\r\n', b'') - - # base64 디코딩을 수행합니다. - decoded_data = base64.b64decode(encoded_data+b'==') - - print(decoded_data) - - # 디코딩된 데이터 내용 중 xml 형식만 추출할 때 , 사이의 데이터만 추출. - start = decoded_data.find(b'') - # print(end) - self.xml_data = decoded_data[start:end+len(b'')] - - - # def save_chart_xml(self, xml_output_path): - # def save_chart_xml(self): - # with open(, 'wb') as file: - # file.write(self.xml_data) - - - - -# xml 파일 읽기 -# xml_path = r"C:\Users\dra\project\HWP-Scoring\output\워드(한글)-009865-고미송.hml" -# tree = ET.parse(xml_path) -# root = tree.getroot() -# # xpath로 바이너리 부분추출 -# binary_data = root.xpath('//BINDATA[@Id=//BINITEM[@Format="OLE"]/@BinData]/text()') -# binary_data = str(binary_data[0]) -# print(f'binary : {binary_data}') -# # base64 디코딩 -# decoded_data = base64.b64decode(binary_data) - -# # 디코딩된 데이터를 파일로 저장 -# output_file = f"decoded_output_test.bin" -# with open(output_file, "wb") as decoded_file: -# decoded_file.write(decoded_data) diff --git a/ext_BinData.xml b/ext_BinData.xml deleted file mode 100644 index 927bb7f..0000000 --- a/ext_BinData.xml +++ /dev/null @@ -1,297 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 과일야채 항산화지수 비교 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 항산화지수(100g당) - - - - 항산화지수(100g당) - - - - - - - - - - - - - - - - - - - - {"블루베리", "딸기", "자두", "오렌지", "시금치", "양배추"} - - - - 블루베리 - - - 딸기 - - - 자두 - - - 오렌지 - - - 시금치 - - - 양배추 - - - - - - - General - - - 2400 - - - 1540 - - - 949 - - - 750 - - - 1260 - - - 980 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/scoring_criteria_2501B.json b/scoring_criteria_2501B.json index 384eb8e..a83a775 100644 --- a/scoring_criteria_2501B.json +++ b/scoring_criteria_2501B.json @@ -468,8 +468,8 @@ "item": "문구② (2. 패러다임 바뀐 음주 문화)/③ 진하게" }, "2-25":{ - "path":"boolean(//CHAR[contains(text(),'MZ세대')]/following-sibling::FOOTNOTE/descendant::CHAR[contains(text(),'밀레니얼 세대와 Z세대를 통틀어 지칭하는 신조어')])", - "path2": null, + "path": "boolean(//CHAR[contains(text(),'MZ세대')]/following-sibling::FOOTNOTE/descendant::CHAR[contains(text(),'밀레니얼 세대와 Z세대를 통틀어 지칭하는 신조어')])", + "path2": "boolean(//CHAR[substring(., string-length(.) - string-length('MZ세대') + 1) = 'MZ세대']/following-sibling::FOOTNOTE/descendant::CHAR[contains(text(),'밀레니얼 세대와 Z세대를 통틀어 지칭하는 신조어')])", "searchValue": null, "value":true, "points": 3, @@ -577,7 +577,7 @@ }, "2-37":{ "path":"boolean(//BORDERFILL[@Id=//TABLE/ROW[1]/CELL/@BorderFill]/BOTTOMBORDER[@Type='DoubleSlim' and @Width='0.5mm'])", - "path2": null, + "path2": "boolean(//BORDERFILL[@Id=//CELLZONE[@StartRowAddr='0' and @EndRowAddr='0' and @StartColAddr='0' and @EndColAddr='2']/@BorderFill]/BOTTOMBORDER[@Type='DoubleSlim' and @Width='0.5mm'])", "searchValue": null, "value":true, "points": 2,