Skip to content

Commit

Permalink
Update discussions2MkdocsBlog.py v2
Browse files Browse the repository at this point in the history
  • Loading branch information
shenweiyan committed Oct 18, 2023
1 parent 1acbff5 commit b7d2ae0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions discussions2MkdocsBlog.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,12 @@ def __main__():
gh_owner = gh_repo.split("/")[0]
gh_repo_name = gh_repo.split("/")[-1]

# 创建目录; 目录存在则先删除 md
outdir = args.outdir if args.outdir else os.getcwd()
if os.path.exists(outdir):
# 清除输出目录所有的 md
for file_path in Path(outdir).glob("*.md")
for file_path in Path(outdir).glob("*.md"):
file_path.unlink()
else:
# 创建输出目录
os.makedirs(outdir)

url = "https://api.github.com/graphql"
Expand Down

0 comments on commit b7d2ae0

Please sign in to comment.