diff --git a/scripts/contributors.py b/scripts/contributors.py index a69d4dae..e449c2ce 100644 --- a/scripts/contributors.py +++ b/scripts/contributors.py @@ -8,6 +8,27 @@ 你也可以前往 获取全部贡献者列表。 以字典序排序: + + """ @@ -30,13 +51,16 @@ def get_api(): def main(): + data = get_api() + data.sort(key=lambda x: x["login"].casefold()) + filename = os.path.abspath(os.path.join(__file__, os.path.pardir, os.path.pardir, "docs", "contributor.md")) with open(filename, "w") as f: print(HEADER, file=f) - data = get_api() - data.sort(key=lambda x: x["login"].casefold()) + print('
', file=f) for item in data: - print(f"- [{item['login']}]({item['html_url']})", file=f) + print(f"- ![Avatar]({item['avatar_url']}){{: width=64 height=64 }} [{item['login']}]({item['html_url']})", file=f) + print('
', file=f) if __name__ == "__main__":