mirror of
https://codeberg.org/fediverse/fep.git
synced 2026-08-05 03:35:52 +00:00
18c788de7c
Discussion https://socialhub.activitypub.rocks/t/can-we-add-a-generated-json-list-of-feps-to-the-repo/4616 Reviewed-on: https://codeberg.org/fediverse/fep/pulls/426 Reviewed-by: helge <helge@noreply.codeberg.org> Co-authored-by: silverpill <silverpill@firemail.cc> Co-committed-by: silverpill <silverpill@firemail.cc>
18 lines
350 B
Python
Executable File
18 lines
350 B
Python
Executable File
#!/usr/bin/env python
|
|
|
|
import json
|
|
|
|
from tools import index, Readme
|
|
|
|
with open("README.md", "w") as f1:
|
|
f1.writelines(Readme().content)
|
|
|
|
result = []
|
|
for fep in index():
|
|
data = fep.parsed_frontmatter
|
|
data["title"] = fep.title
|
|
result.append(data)
|
|
|
|
with open("index.json", "w") as index_file:
|
|
json.dump(result, index_file, indent=2)
|