Permalink
Browse files

docs, feat: remove github token.

  • Loading branch information...
xicilion committed Sep 27, 2017
1 parent ec4958d commit a3cfcc5e890839612f67a5e39e94a017c805d625
Showing with 4 additions and 2 deletions.
  1. +4 −2 tools/awesome.js
View
@@ -24,8 +24,10 @@ function clean_folder(p) {
clean_folder(docsFolder);
fs.mkdir(path.join(docsFolder, 'module'));
var token = 'xxxxxxxxxxxxxx';
var list = new Buffer(http.get("https://api.github.com/repos/fibjs/awesome/readme", {
"Authorization": "token e9dd2316e2373af6bae66c9f6116c5fecf1ce536"
"Authorization": "token " + token
}).json().content, 'base64').toString();
var ls = [];
@@ -34,7 +36,7 @@ list = list.replace(/- \[(.+?)\]\((.+?)\)/g, (s, s1, s2) => {
console.log('getting', u);
coroutine.sleep(100);
var doc = new Buffer(http.get(u, {
"Authorization": "token e9dd2316e2373af6bae66c9f6116c5fecf1ce536"
"Authorization": "token " + token
}).json().content, 'base64').toString();
fs.writeTextFile(path.join(docsFolder, 'module', s1 + '.md'), doc);

0 comments on commit a3cfcc5

Please sign in to comment.