mirror of
https://github.com/MunGell/awesome-for-beginners.git
synced 2026-01-24 04:19:06 -08:00
ruff formatting
This commit is contained in:
13
.github/scripts/render-readme.py
vendored
13
.github/scripts/render-readme.py
vendored
@@ -6,16 +6,21 @@ TEMPLATEPATH = "./.github/"
|
||||
TEMPLATEFILE = "README-template.j2"
|
||||
TARGETFILE = "./README.md"
|
||||
|
||||
|
||||
def new_technology_dict(repo_technology):
|
||||
return {"link_id": repo_technology.lower(), "entries": []}
|
||||
|
||||
|
||||
technologies = {}
|
||||
|
||||
with open(DATAFILE, 'r') as datafile:
|
||||
with open(DATAFILE, "r") as datafile:
|
||||
data = json.loads(datafile.read())
|
||||
|
||||
for technology in data["technologies"]:
|
||||
technologies[technology] = {"link_id": data["technologies"][technology], "entries": []}
|
||||
technologies[technology] = {
|
||||
"link_id": data["technologies"][technology],
|
||||
"entries": [],
|
||||
}
|
||||
|
||||
for repository in data["repositories"]:
|
||||
repo_technologies = repository["technologies"]
|
||||
@@ -29,7 +34,9 @@ template = env.get_template(TEMPLATEFILE)
|
||||
|
||||
categories = []
|
||||
for key, value in zip(technologies.keys(), technologies.values()):
|
||||
categories.append({"title": key, "link_id": value["link_id"], "entries": value["entries"]})
|
||||
categories.append(
|
||||
{"title": key, "link_id": value["link_id"], "entries": value["entries"]}
|
||||
)
|
||||
|
||||
categories = sorted(categories, key=lambda x: x["title"].upper())
|
||||
for category in categories:
|
||||
|
||||
Reference in New Issue
Block a user