(2-25) 각주 문구입력시 연속된 2개이상의 공백 처리
This commit is contained in:
67
score5.py
67
score5.py
@@ -517,35 +517,37 @@ class XMLScorer:
|
||||
|
||||
def main():
|
||||
# scoring_criteria_path = r'./DIW.json'
|
||||
scoring_criteria_path = r'./DIW_2502A.json'
|
||||
# scoring_criteria_path = r'./DIW_2502A.json'
|
||||
# scoring_criteria_path = r'./DIW_2502B.json'
|
||||
# scoring_criteria_path = r'./DIW_2502C.json'
|
||||
# scoring_criteria_path = r'./DIW_2502D.json'
|
||||
# scoring_criteria_path = r'./DIW_2502E.json'
|
||||
scoring_criteria_path = r'./DIW_2502E.json'
|
||||
|
||||
# xml(hml)파일 디렉토리 경로
|
||||
# xml_directory = r'./output'
|
||||
xml_directory = r'./output/A'
|
||||
# xml_directory = r'./output/A'
|
||||
# xml_directory = r'./output/B'
|
||||
# xml_directory = r'./output/C'
|
||||
# xml_directory = r'./output/D'
|
||||
# xml_directory = r'./output/E'
|
||||
#xml_directory = r'./output/E'
|
||||
xml_directory = r'./output/ee'
|
||||
|
||||
|
||||
# 오탈자 체크를 위한 정답 파일 경로
|
||||
# answer_path = r'./output/정답.hml'
|
||||
answer_path = r'./output/A/DIW_2502A.hml'
|
||||
# answer_path = r'./output/A/DIW_2502A.hml'
|
||||
# answer_path = r'./output/B/DIW_2502B.hml'
|
||||
# answer_path = r'./output/C/DIW_2502C.hml'
|
||||
# answer_path = r'./output/D/DIW_2502D.hml'
|
||||
# answer_path = r'./output/E/DIW_2502E.hml'
|
||||
answer_path = r'./output/E/DIW_2502E.hml'
|
||||
|
||||
timestamp = datetime.now().strftime("%y%m%d")
|
||||
# 엑셀 파일명 (비어있으면 자동생성)
|
||||
output_path = f"{timestamp}_result_2502A.xlsx"
|
||||
# output_path = f"{timestamp}_result_2502B.xlsx"
|
||||
# output_path = f"{timestamp}_result_2502C.xlsx"
|
||||
# output_path = f"{timestamp}_result_2502D.xlsx"
|
||||
# output_path = f"{timestamp}_result_2502E.xlsx"
|
||||
# output_path = f"{timestamp}_DIW_2502A_채점결과.xlsx"
|
||||
# output_path = f"{timestamp}_DIW_2502B_채점결과.xlsx"
|
||||
# output_path = f"{timestamp}_DIW_2502C_채점결과.xlsx"
|
||||
# output_path = f"{timestamp}_DIW_2502D_채점결과.xlsx"
|
||||
output_path = f"{timestamp}_DIW_2502E_채점결과.xlsx"
|
||||
|
||||
# 채점 클래스 초기화
|
||||
scorer = XMLScorer(scoring_criteria_path)
|
||||
@@ -559,46 +561,3 @@ def main():
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
# def select_file():
|
||||
# # file_path = filedialog.askopenfilename(filetypes=[("XML and HML files", "*.xml *.hml"), ("All files", "*.*")])
|
||||
# file_path = filedialog.askopenfilename(filetypes=[("HWPML files", "*.hml"), ("All files", "*.*")], initialdir='./output')
|
||||
# # file_path = filedialog.askdirectory(initialdir='./output')
|
||||
|
||||
# if file_path:
|
||||
# file_entry.delete(0, tk.END)
|
||||
# file_entry.insert(0, file_path)
|
||||
|
||||
# def export_results():
|
||||
# file_path = file_entry.get()
|
||||
# if not file_path:
|
||||
# messagebox.showerror("Error", "파일을 선택하세요.")
|
||||
# return
|
||||
|
||||
# # XMLScorer 인스턴스 생성 및 파일 처리
|
||||
# scoring_criteria_path = r'./scoring_criteria.json'
|
||||
# scorer = XMLScorer(scoring_criteria_path)
|
||||
# results = [] # 실제로는 XML 파일을 처리하여 결과를 생성해야 함
|
||||
# scorer.export_to_excel(results, output_path=file_path)
|
||||
# messagebox.showinfo("Success", "엑셀 파일이 성공적으로 저장되었습니다.")
|
||||
|
||||
# # GUI 설정
|
||||
# root = tk.Tk()
|
||||
# root.title("XML Scorer")
|
||||
|
||||
# frame = tk.Frame(root)
|
||||
# frame.pack(padx=10, pady=10)
|
||||
|
||||
# file_label = tk.Label(frame, text="파일 선택:")
|
||||
# file_label.grid(row=0, column=0, padx=5, pady=5)
|
||||
|
||||
# file_entry = tk.Entry(frame, width=50)
|
||||
# file_entry.grid(row=0, column=1, padx=5, pady=5)
|
||||
|
||||
# file_button = tk.Button(frame, text="Browse", command=select_file)
|
||||
# file_button.grid(row=0, column=2, padx=5, pady=5)
|
||||
|
||||
# export_button = tk.Button(frame, text="Export to Excel", command=export_results)
|
||||
# export_button.grid(row=1, column=0, columnspan=3, pady=10)
|
||||
|
||||
# root.mainloop()
|
||||
Reference in New Issue
Block a user