File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,6 @@ def get_problem_info(workbook_url):
2525 ret = []
2626 while True :
2727 x = txt .find (pattern )
28- print (x )
2928 if x == - 1 : break
3029 txt = txt [x + 9 :]
3130 prob_id , prob_name = '' , ''
@@ -64,8 +63,9 @@ def gen_ind_workbook(attrs, category):
6463 category_idx = category [chapter_idx ].index (prob_id )
6564 file_path = solution_path + prob_id
6665 if not os .path .exists (file_path + '.java' ):
67- with open (file_path + '.java' , 'w' , encoding = "UTF-8" ) as f :
68- f .write (txt )
66+ os .makedirs (os .path .dirname (file_path ), exist_ok = True ) # 디렉토리 없으면 생성
67+ with open (file_path + '.java' , 'w' , encoding = "UTF-8" ) as f :
68+ f .write (txt )
6969 try :
7070 codes = open (file_path + '.java' , 'r' , encoding = "UTF-8" ).read ()
7171 except : # EUC-KR -> UTF-8
You can’t perform that action at this time.
0 commit comments