File tree 3 files changed +16
-132
lines changed
3 files changed +16
-132
lines changed Original file line number Diff line number Diff line change @@ -246,12 +246,26 @@ def generate_summary():
246
246
with open ('./summary_en.md' , 'w' , encoding = 'utf-8' ) as f :
247
247
f .write (summary_en )
248
248
249
+ @staticmethod
250
+ def remove_empty_folders ():
251
+ """remove empty sub folders"""
252
+ sub_folders = [str (i * 100 ).zfill (4 ) + '-' + str (i * 100 + 99 ).zfill (4 ) for i in range (100 )]
253
+
254
+ for item in sub_folders :
255
+ if not os .path .isdir (f'./{ item } ' ):
256
+ continue
257
+ files = os .listdir (f'./{ item } ' )
258
+ for f in files :
259
+ if os .path .isdir (f'./{ item } /{ f } ' ):
260
+ if not os .listdir (f'./{ item } /{ f } ' ):
261
+ os .rmdir (f'./{ item } /{ f } ' )
262
+
249
263
250
264
if __name__ == '__main__' :
251
265
spider = LCSpider ()
252
266
253
- spider .get_all_questions ()
254
- spider .save_result ()
267
+ # spider.get_all_questions()
268
+ # spider.save_result()
255
269
256
270
spider .generate_readme ()
257
271
spider .generate_question_readme ()
You can’t perform that action at this time.
0 commit comments