Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
CSDN 技术社区
skill_tree_oceanbase
提交
f9c2989d
S
skill_tree_oceanbase
项目概览
CSDN 技术社区
/
skill_tree_oceanbase
通知
7
Star
4
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
skill_tree_oceanbase
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
f9c2989d
编写于
11月 22, 2021
作者:
M
Mars Liu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fixed odd orders
上级
532b5944
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
1 addition
and
12 deletion
+1
-12
src/tree.py
src/tree.py
+1
-12
未找到文件。
src/tree.py
浏览文件 @
f9c2989d
...
@@ -107,17 +107,6 @@ class TreeWalker:
...
@@ -107,17 +107,6 @@ class TreeWalker:
full_path
=
os
.
path
.
join
(
chapter_path
,
f
"
{
index
+
1
}
.
{
section_title
}
"
)
full_path
=
os
.
path
.
join
(
chapter_path
,
f
"
{
index
+
1
}
.
{
section_title
}
"
)
if
os
.
path
.
isdir
(
full_path
):
if
os
.
path
.
isdir
(
full_path
):
self
.
ensure_exercises
(
full_path
)
self
.
ensure_exercises
(
full_path
)
# TODO 四级知识点的处理仅为 Java 技能树的临时处理而设定,未来java技能树上线前会删掉这部分代码,将四级节点
# 合并到三级节点
for
idx
,
[
num
,
sub_section_title
]
in
self
.
sort_dir_list
([
p
for
p
in
os
.
listdir
(
full_path
)
if
os
.
path
.
isdir
(
os
.
path
.
join
(
full_path
,
p
))]):
order
=
idx
+
1
ensure_path
=
os
.
path
.
join
(
full_path
,
f
"
{
order
}
.
{
sub_section_title
}
"
)
forth_full_path
=
os
.
path
.
join
(
full_path
,
f
"
{
num
}
.
{
sub_section_title
}
"
)
if
ensure_path
!=
forth_full_path
:
os
.
rename
(
forth_full_path
,
ensure_path
)
if
os
.
path
.
isdir
(
ensure_path
):
self
.
ensure_exercises
(
forth_full_path
)
tree_path
=
os
.
path
.
join
(
self
.
root
,
"tree.json"
)
tree_path
=
os
.
path
.
join
(
self
.
root
,
"tree.json"
)
dump_json
(
tree_path
,
self
.
tree
,
exist_ok
=
True
,
override
=
True
)
dump_json
(
tree_path
,
self
.
tree
,
exist_ok
=
True
,
override
=
True
)
...
@@ -310,6 +299,6 @@ class TreeWalker:
...
@@ -310,6 +299,6 @@ class TreeWalker:
full_name
=
os
.
path
.
join
(
section_path
,
e
)
full_name
=
os
.
path
.
join
(
section_path
,
e
)
logger
.
info
(
full_name
)
logger
.
info
(
full_name
)
exercise
=
load_json
(
full_name
)
exercise
=
load_json
(
full_name
)
if
"exercise_id"
not
in
exercise
:
if
not
exercise
.
get
(
"exercise_id"
)
:
exercise
[
"exercise_id"
]
=
uuid
.
uuid4
().
hex
exercise
[
"exercise_id"
]
=
uuid
.
uuid4
().
hex
dump_json
(
full_name
,
exercise
,
exist_ok
=
True
,
override
=
True
)
dump_json
(
full_name
,
exercise
,
exist_ok
=
True
,
override
=
True
)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录