Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
peng-yq committed Oct 22, 2024
2 parents b08c2b1 + adb1b03 commit d3917bb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
- [2023-08-23] [考研总结] [19-英语-zls-跨考现当代文学-@scu](personal-summary/mks/19-英语-zls-跨考现当代文学[email protected])
- [2023-08-21] [考研总结] [18-信息安全(密码学方向)-匿名-考研-@国科大杭高院](https://zhuanlan.zhihu.com/p/625418401)
- [2023-08-06] [考研总结] [19-农学-付黎明-考研-@上海交通大学](personal-summary/rdzw/19-农学-付黎明-考研-@上海交通大学.md)
- [2023-08-06] [天大交换] [21-数学与应用数学-Andmilde-天大交换](exchange/tju-exchange/21-数学与应用数学-Andmilde-天大交换.md)

<!-- recent-update-end -->

Expand Down
11 changes: 8 additions & 3 deletions update.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,15 @@ def generate_readme(data):
with open(readme_path, "r", encoding="utf-8") as f:
readme_content = f.read()
new_content = ""
last_item = ""
for item in total_item:
new_content += (
f'- {get_markdown_url(item["title"], item["url"], date=item["date"], tag=item["tag"], space=True)}\n'
)
new_item = f'- {get_markdown_url(item["title"], item["url"], date=item["date"], tag=item["tag"], space=True)}\n'

if last_item == new_item:
continue

new_content += new_item
last_item = new_item
_count += 1
if _count >= max_item_count:
break
Expand Down

0 comments on commit d3917bb

Please sign in to comment.