Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
CSDN 技术社区
skill_tree_web_in_action
提交
96cb125d
S
skill_tree_web_in_action
项目概览
CSDN 技术社区
/
skill_tree_web_in_action
通知
8
Star
3
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
skill_tree_web_in_action
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
96cb125d
编写于
12月 29, 2021
作者:
M
Mars Liu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
sync tree.py script
上级
c49aa40c
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
11 addition
and
9 deletion
+11
-9
src/tree.py
src/tree.py
+11
-9
未找到文件。
src/tree.py
浏览文件 @
96cb125d
...
@@ -7,7 +7,6 @@ import sys
...
@@ -7,7 +7,6 @@ import sys
import
uuid
import
uuid
import
re
import
re
id_set
=
set
()
id_set
=
set
()
logger
=
logging
.
getLogger
(
__name__
)
logger
=
logging
.
getLogger
(
__name__
)
logger
.
setLevel
(
logging
.
INFO
)
logger
.
setLevel
(
logging
.
INFO
)
...
@@ -16,6 +15,7 @@ formatter = logging.Formatter('%(asctime)s - %(levelname)s - %(message)s')
...
@@ -16,6 +15,7 @@ formatter = logging.Formatter('%(asctime)s - %(levelname)s - %(message)s')
handler
.
setFormatter
(
formatter
)
handler
.
setFormatter
(
formatter
)
logger
.
addHandler
(
handler
)
logger
.
addHandler
(
handler
)
def
search_author
(
author_dict
,
username
):
def
search_author
(
author_dict
,
username
):
for
key
in
author_dict
:
for
key
in
author_dict
:
names
=
author_dict
[
key
]
names
=
author_dict
[
key
]
...
@@ -23,6 +23,7 @@ def search_author(author_dict, username):
...
@@ -23,6 +23,7 @@ def search_author(author_dict, username):
return
key
return
key
return
username
return
username
def
user_name
(
md_file
,
author_dict
):
def
user_name
(
md_file
,
author_dict
):
ret
=
subprocess
.
Popen
([
ret
=
subprocess
.
Popen
([
"git"
,
"log"
,
md_file
"git"
,
"log"
,
md_file
...
@@ -35,8 +36,9 @@ def user_name(md_file, author_dict):
...
@@ -35,8 +36,9 @@ def user_name(md_file, author_dict):
author_nick_name
=
author_lines
[
-
1
]
author_nick_name
=
author_lines
[
-
1
]
return
search_author
(
author_dict
,
author_nick_name
)
return
search_author
(
author_dict
,
author_nick_name
)
def
load_json
(
p
):
def
load_json
(
p
):
with
open
(
p
,
'r'
)
as
f
:
with
open
(
p
,
'r'
,
encoding
=
"utf-8"
)
as
f
:
return
json
.
loads
(
f
.
read
())
return
json
.
loads
(
f
.
read
())
...
@@ -92,13 +94,13 @@ def check_export(base, cfg):
...
@@ -92,13 +94,13 @@ def check_export(base, cfg):
class
TreeWalker
:
class
TreeWalker
:
def
__init__
(
def
__init__
(
self
,
root
,
self
,
root
,
tree_name
,
tree_name
,
title
=
None
,
title
=
None
,
log
=
None
,
log
=
None
,
authors
=
None
,
authors
=
None
,
enable_notebook
=
None
,
enable_notebook
=
None
,
ignore_keywords
=
False
ignore_keywords
=
False
):
):
self
.
ignore_keywords
=
ignore_keywords
self
.
ignore_keywords
=
ignore_keywords
self
.
authors
=
authors
if
authors
else
{}
self
.
authors
=
authors
if
authors
else
{}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录