提交 75690168 编写于 作者: 每日一练社区's avatar 每日一练社区

fix bug

上级 8da5a674
...@@ -5,5 +5,7 @@ ...@@ -5,5 +5,7 @@
"微生物增殖" "微生物增殖"
], ],
"children": [], "children": [],
"export": [] "export": [
"solution.json"
]
} }
\ No newline at end of file
...@@ -5,5 +5,7 @@ ...@@ -5,5 +5,7 @@
"星系炸弹" "星系炸弹"
], ],
"children": [], "children": [],
"export": [] "export": [
"solution.json"
]
} }
\ No newline at end of file
...@@ -5,5 +5,7 @@ ...@@ -5,5 +5,7 @@
"蛇形填数" "蛇形填数"
], ],
"children": [], "children": [],
"export": [] "export": [
"solution.json"
]
} }
\ No newline at end of file
...@@ -5,5 +5,7 @@ ...@@ -5,5 +5,7 @@
"跑步训练" "跑步训练"
], ],
"children": [], "children": [],
"export": [] "export": [
"solution.json"
]
} }
\ No newline at end of file
...@@ -5,5 +5,7 @@ ...@@ -5,5 +5,7 @@
"特别数的和" "特别数的和"
], ],
"children": [], "children": [],
"export": [] "export": [
"solution.json"
]
} }
\ No newline at end of file
...@@ -5,5 +5,7 @@ ...@@ -5,5 +5,7 @@
"切面条" "切面条"
], ],
"children": [], "children": [],
"export": [] "export": [
"solution.json"
]
} }
\ No newline at end of file
...@@ -5,5 +5,7 @@ ...@@ -5,5 +5,7 @@
"日志统计" "日志统计"
], ],
"children": [], "children": [],
"export": [] "export": [
"solution.json"
]
} }
\ No newline at end of file
...@@ -5,5 +5,7 @@ ...@@ -5,5 +5,7 @@
"神奇算式" "神奇算式"
], ],
"children": [], "children": [],
"export": [] "export": [
"solution.json"
]
} }
\ No newline at end of file
...@@ -5,5 +5,7 @@ ...@@ -5,5 +5,7 @@
"星期一" "星期一"
], ],
"children": [], "children": [],
"export": [] "export": [
"solution.json"
]
} }
\ No newline at end of file
...@@ -5,5 +5,7 @@ ...@@ -5,5 +5,7 @@
"生日蜡烛" "生日蜡烛"
], ],
"children": [], "children": [],
"export": [] "export": [
"solution.json"
]
} }
\ No newline at end of file
...@@ -5,5 +5,7 @@ ...@@ -5,5 +5,7 @@
"合并检测" "合并检测"
], ],
"children": [], "children": [],
"export": [] "export": [
"solution.json"
]
} }
\ No newline at end of file
...@@ -5,5 +5,7 @@ ...@@ -5,5 +5,7 @@
"k倍区间" "k倍区间"
], ],
"children": [], "children": [],
"export": [] "export": [
"solution.json"
]
} }
\ No newline at end of file
...@@ -5,5 +5,7 @@ ...@@ -5,5 +5,7 @@
"纸牌三角形" "纸牌三角形"
], ],
"children": [], "children": [],
"export": [] "export": [
"solution.json"
]
} }
\ No newline at end of file
...@@ -5,5 +5,7 @@ ...@@ -5,5 +5,7 @@
"交换瓶子" "交换瓶子"
], ],
"children": [], "children": [],
"export": [] "export": [
"solution.json"
]
} }
\ No newline at end of file
...@@ -5,5 +5,7 @@ ...@@ -5,5 +5,7 @@
"排它平方数" "排它平方数"
], ],
"children": [], "children": [],
"export": [] "export": [
"solution.json"
]
} }
\ No newline at end of file
...@@ -5,5 +5,7 @@ ...@@ -5,5 +5,7 @@
"REPEAT 程序" "REPEAT 程序"
], ],
"children": [], "children": [],
"export": [] "export": [
"solution.json"
]
} }
\ No newline at end of file
...@@ -5,5 +5,7 @@ ...@@ -5,5 +5,7 @@
"煤球数目" "煤球数目"
], ],
"children": [], "children": [],
"export": [] "export": [
"solution.json"
]
} }
\ No newline at end of file
...@@ -5,5 +5,7 @@ ...@@ -5,5 +5,7 @@
"门牌制作" "门牌制作"
], ],
"children": [], "children": [],
"export": [] "export": [
"solution.json"
]
} }
\ No newline at end of file
...@@ -5,5 +5,7 @@ ...@@ -5,5 +5,7 @@
"平面切分" "平面切分"
], ],
"children": [], "children": [],
"export": [] "export": [
"solution.json"
]
} }
\ No newline at end of file
...@@ -5,5 +5,7 @@ ...@@ -5,5 +5,7 @@
"消除尾一" "消除尾一"
], ],
"children": [], "children": [],
"export": [] "export": [
"solution.json"
]
} }
\ No newline at end of file
...@@ -5,5 +5,7 @@ ...@@ -5,5 +5,7 @@
"四平方和" "四平方和"
], ],
"children": [], "children": [],
"export": [] "export": [
"solution.json"
]
} }
\ No newline at end of file
...@@ -5,5 +5,7 @@ ...@@ -5,5 +5,7 @@
"完美平方数" "完美平方数"
], ],
"children": [], "children": [],
"export": [] "export": [
"solution.json"
]
} }
\ No newline at end of file
...@@ -5,5 +5,7 @@ ...@@ -5,5 +5,7 @@
"黄金连分数" "黄金连分数"
], ],
"children": [], "children": [],
"export": [] "export": [
"solution.json"
]
} }
\ No newline at end of file
...@@ -5,5 +5,7 @@ ...@@ -5,5 +5,7 @@
"字母阵列" "字母阵列"
], ],
"children": [], "children": [],
"export": [] "export": [
"solution.json"
]
} }
\ No newline at end of file
...@@ -5,5 +5,7 @@ ...@@ -5,5 +5,7 @@
"字符串编码" "字符串编码"
], ],
"children": [], "children": [],
"export": [] "export": [
"solution.json"
]
} }
\ No newline at end of file
...@@ -5,5 +5,7 @@ ...@@ -5,5 +5,7 @@
"人物相关性分析" "人物相关性分析"
], ],
"children": [], "children": [],
"export": [] "export": [
"solution.json"
]
} }
\ No newline at end of file
...@@ -5,5 +5,7 @@ ...@@ -5,5 +5,7 @@
"解码" "解码"
], ],
"children": [], "children": [],
"export": [] "export": [
"solution.json"
]
} }
\ No newline at end of file
...@@ -5,5 +5,7 @@ ...@@ -5,5 +5,7 @@
"回文日期" "回文日期"
], ],
"children": [], "children": [],
"export": [] "export": [
"solution.json"
]
} }
\ No newline at end of file
...@@ -5,5 +5,7 @@ ...@@ -5,5 +5,7 @@
"格子中输出" "格子中输出"
], ],
"children": [], "children": [],
"export": [] "export": [
"solution.json"
]
} }
\ No newline at end of file
...@@ -5,5 +5,7 @@ ...@@ -5,5 +5,7 @@
"最大公共子串" "最大公共子串"
], ],
"children": [], "children": [],
"export": [] "export": [
"solution.json"
]
} }
\ No newline at end of file
...@@ -5,5 +5,7 @@ ...@@ -5,5 +5,7 @@
"取数位" "取数位"
], ],
"children": [], "children": [],
"export": [] "export": [
"solution.json"
]
} }
\ No newline at end of file
...@@ -5,5 +5,7 @@ ...@@ -5,5 +5,7 @@
"逆波兰表达式" "逆波兰表达式"
], ],
"children": [], "children": [],
"export": [] "export": [
"solution.json"
]
} }
\ No newline at end of file
...@@ -5,5 +5,7 @@ ...@@ -5,5 +5,7 @@
"扑克序列" "扑克序列"
], ],
"children": [], "children": [],
"export": [] "export": [
"solution.json"
]
} }
\ No newline at end of file
...@@ -5,5 +5,7 @@ ...@@ -5,5 +5,7 @@
"振兴中华" "振兴中华"
], ],
"children": [], "children": [],
"export": [] "export": [
"solution.json"
]
} }
\ No newline at end of file
...@@ -5,5 +5,7 @@ ...@@ -5,5 +5,7 @@
"幸运数" "幸运数"
], ],
"children": [], "children": [],
"export": [] "export": [
"solution.json"
]
} }
\ No newline at end of file
...@@ -5,5 +5,7 @@ ...@@ -5,5 +5,7 @@
"跑步锻炼" "跑步锻炼"
], ],
"children": [], "children": [],
"export": [] "export": [
"solution.json"
]
} }
\ No newline at end of file
...@@ -5,5 +5,7 @@ ...@@ -5,5 +5,7 @@
"小朋友排队" "小朋友排队"
], ],
"children": [], "children": [],
"export": [] "export": [
"solution.json"
]
} }
\ No newline at end of file
...@@ -5,5 +5,7 @@ ...@@ -5,5 +5,7 @@
"灵能传输" "灵能传输"
], ],
"children": [], "children": [],
"export": [] "export": [
"solution.json"
]
} }
\ No newline at end of file
...@@ -5,5 +5,7 @@ ...@@ -5,5 +5,7 @@
"压缩变换" "压缩变换"
], ],
"children": [], "children": [],
"export": [] "export": [
"solution.json"
]
} }
\ No newline at end of file
...@@ -5,5 +5,7 @@ ...@@ -5,5 +5,7 @@
"明码" "明码"
], ],
"children": [], "children": [],
"export": [] "export": [
"solution.json"
]
} }
\ No newline at end of file
...@@ -5,5 +5,7 @@ ...@@ -5,5 +5,7 @@
"三体攻击" "三体攻击"
], ],
"children": [], "children": [],
"export": [] "export": [
"solution.json"
]
} }
\ No newline at end of file
...@@ -5,5 +5,7 @@ ...@@ -5,5 +5,7 @@
"兰顿蚂蚁" "兰顿蚂蚁"
], ],
"children": [], "children": [],
"export": [] "export": [
"solution.json"
]
} }
\ No newline at end of file
...@@ -5,5 +5,7 @@ ...@@ -5,5 +5,7 @@
"跳蚱蜢" "跳蚱蜢"
], ],
"children": [], "children": [],
"export": [] "export": [
"solution.json"
]
} }
\ No newline at end of file
...@@ -5,5 +5,7 @@ ...@@ -5,5 +5,7 @@
"网络分析" "网络分析"
], ],
"children": [], "children": [],
"export": [] "export": [
"solution.json"
]
} }
\ No newline at end of file
...@@ -5,5 +5,7 @@ ...@@ -5,5 +5,7 @@
"字串排序" "字串排序"
], ],
"children": [], "children": [],
"export": [] "export": [
"solution.json"
]
} }
\ No newline at end of file
...@@ -5,5 +5,7 @@ ...@@ -5,5 +5,7 @@
"李白打酒" "李白打酒"
], ],
"children": [], "children": [],
"export": [] "export": [
"solution.json"
]
} }
\ No newline at end of file
...@@ -5,5 +5,7 @@ ...@@ -5,5 +5,7 @@
"迷宫" "迷宫"
], ],
"children": [], "children": [],
"export": [] "export": [
"solution.json"
]
} }
\ No newline at end of file
...@@ -5,5 +5,7 @@ ...@@ -5,5 +5,7 @@
"装饰珠" "装饰珠"
], ],
"children": [], "children": [],
"export": [] "export": [
"solution.json"
]
} }
\ No newline at end of file
...@@ -5,5 +5,7 @@ ...@@ -5,5 +5,7 @@
"组合数问题" "组合数问题"
], ],
"children": [], "children": [],
"export": [] "export": [
"solution.json"
]
} }
\ No newline at end of file
...@@ -5,5 +5,7 @@ ...@@ -5,5 +5,7 @@
"糖果" "糖果"
], ],
"children": [], "children": [],
"export": [] "export": [
"solution.json"
]
} }
\ No newline at end of file
...@@ -5,5 +5,7 @@ ...@@ -5,5 +5,7 @@
"矩阵" "矩阵"
], ],
"children": [], "children": [],
"export": [] "export": [
"solution.json"
]
} }
\ No newline at end of file
...@@ -5,5 +5,7 @@ ...@@ -5,5 +5,7 @@
"垒骰子" "垒骰子"
], ],
"children": [], "children": [],
"export": [] "export": [
"solution.json"
]
} }
\ No newline at end of file
...@@ -542,6 +542,36 @@ def check_exercises_is_duplicate(): ...@@ -542,6 +542,36 @@ def check_exercises_is_duplicate():
print(collections.Counter(exercises_check_list)) print(collections.Counter(exercises_check_list))
def add_config_export():
count = 0
dirs = ['data/2.算法中阶', 'data/3.算法高阶', 'data/1.算法初阶']
exercises_ids = []
for dir in dirs:
dirs_ = os.listdir(dir)
algo_floor_dirs = []
for algo_floor_dir in dirs_:
leetcode_class_dir = os.path.join(dir, algo_floor_dir)
if os.path.isdir(leetcode_class_dir):
algo_floor_dirs.append(leetcode_class_dir)
for algo_floor_dir in algo_floor_dirs:
exercises_dirs_ = os.listdir(algo_floor_dir)
exercises_dirs = []
for exercises_dir_ in exercises_dirs_:
exercises_dir = os.path.join(algo_floor_dir, exercises_dir_)
if os.path.isdir(exercises_dir):
exercises_dirs.append(exercises_dir)
for idx, tem_dir in enumerate(exercises_dirs):
print(tem_dir)
config_path = os.path.join(tem_dir, 'config.json')
with open(config_path, 'r', encoding='utf-8') as f:
config_data = json.load(f)
config_data['export'] = ["solution.json"]
config_data_json = json.dumps(config_data, ensure_ascii=False, indent=2)
with open(config_path, 'w', encoding='utf-8') as f:
f.write(config_data_json)
...@@ -558,6 +588,7 @@ add_solution_md_template_for_lanqiao() ...@@ -558,6 +588,7 @@ add_solution_md_template_for_lanqiao()
add_color_for_special_exercises() add_color_for_special_exercises()
add_config_export()
# check_exercises_is_duplicate() # check_exercises_is_duplicate()
# leetcode_helper_update_md() # leetcode_helper_update_md()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册