-
Notifications
You must be signed in to change notification settings - Fork 0
/
json-to-md.py
38 lines (29 loc) · 1.14 KB
/
json-to-md.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# -*- coding: utf-8 -*-
import os, json
template='''# All in One Repository Bot
Ever wish there was a curated list for your curated lists, including other curated lists of curated lists that may or may not contain other curated lists?
``` python
print('A curated list of '+('curated lists of '*∞)+'curated lists.')
```
_Updated as often as I can. Want to contribute? Go ahead and make a pull request._
- [x] Index top 1000 curated lists.
- [x] Make a bot do it for me
- [x] Automate the curation entirely
- [ ] Organize lists
- [ ] Create easy search for lists.
# Awesome Lists
'''
with open('README.md','w') as curated_lists_md:
curated_lists_md.write(template)
with open('awesome-list.json','r') as curated_lists_json:
curated_lists = json.load(curated_lists_json)
count = 1
for curated_list in curated_lists:
# '* [`{1}`]({2}): {3}\n'
curated_lists_md.write('__{}. [`{}`]({})__: {}\n\n'.format(
count,
curated_list['repo'],
'https://www.github.com/'+curated_list['repo'],
curated_list['description']
))
count = count + 1