You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
9 lines
270 B
Python
9 lines
270 B
Python
11 months ago
|
import json
|
||
|
|
||
|
def load_json (path="index.json"):
|
||
|
with open(path) as fin:
|
||
|
data = json.load(fin)
|
||
|
data['projects'] = [x for x in data['@graph'] if x['type'] == 'project']
|
||
|
data['projects'].sort(key=lambda x: x['title'].strip('"').lower())
|
||
|
return data
|