-
Notifications
You must be signed in to change notification settings - Fork 0
/
generate-readme.js
executable file
·56 lines (52 loc) · 1.59 KB
/
generate-readme.js
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
var fs = require('fs');
var repos = {
'Data structures': [
'csharp-data-structures',
'growing-with-the-web',
'js-data-structures',
'js-avl-tree',
'js-binary-heap',
'js-binomial-heap',
'js-fibonacci-heap',
'js-heap-tests',
'js-splay-tree',
'py-data-structures',
'ts-avl-tree',
'ts-fibonacci-heap',
'ts-splay-tree'
],
'Sorting': [
'csharp-sorting',
'java-sorting',
'js-sorting',
'py-sorting',
'ruby-sorting',
],
'Interview questions': [
'js-interview-questions',
],
'Design patterns': [
'java-design-patterns',
'js-design-patterns',
]
};
var markdown =
`## gwtw/meta\n` +
`\n` +
`This is a meta repo which is used as a dashboard for the repositories within the [gwtw](https://github.com/gwtw) organization.\n`;
for (var category in repos) {
markdown +=
`\n` +
`### ${category}\n` +
`\n` +
`| Repo | Build status | Coverage | \n` +
`|---|---|---|---\n`;
repos[category].forEach(r => {
markdown +=
`| [${r}](https://github.com/gwtw/${r}) ` +
`| [![Build Status](https://api.travis-ci.org/gwtw/${r}.svg?branch=master)](http://travis-ci.org/gwtw/${r}) ` +
`| [![Coverage Status](https://coveralls.io/repos/github/gwtw/${r}/badge.svg?branch=master)](https://coveralls.io/github/gwtw/${r}?branch=master) ` +
`| [Issues](https://github.com/gwtw/${r}/issues)\n`;
});
}
fs.writeFileSync('./README.md', markdown);