Skip to content

Commit

Permalink
Update update_readme.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Dobby-Kim committed May 3, 2024
1 parent bd8f3bd commit 50d6f59
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions .github/scripts/update_readme.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,17 @@ def update_readme():
entries = {}
chapters = set()
for md_file in md_files:
chapter, item, title, author = parse_md_filename(md_file)
key = (int(chapter), int(item), title)
link = f"https://github.com/{os.getenv('GITHUB_REPOSITORY')}/blob/master/{md_file}"
if key not in entries:
entries[key] = []
entries[key].append((author, link))
chapters.add(int(chapter))
try:
chapter, item, title, author = parse_md_filename(md_file)
key = (int(chapter), int(item), title)
link = f"https://github.com/{os.getenv('GITHUB_REPOSITORY')}/blob/master/{md_file}"
if key not in entries:
entries[key] = []
entries[key].append((author, link))
chapters.add(int(chapter))
except:
print("형식에 맞지 않는 파일 발견: " + chapter, item, title, author)


sorted_entries = sorted(entries.items(),reverse=True)
sorted_chapters = sorted(chapters,reverse=True)
Expand Down

0 comments on commit 50d6f59

Please sign in to comment.