diff --git a/script/index.js b/script/index.js index 213dec527d8d..eff29a4a98f1 100644 --- a/script/index.js +++ b/script/index.js @@ -41,22 +41,19 @@ function delay(ms) { } (async () => { - // await run('daily', 'all') - // await run('weekly', 'all') - // await run('monthly', 'all') - - // let languages = readFileSync(path.resolve(__dirname, DATA_BASE_URL, 'languages.json'), 'utf8'); - // languages = JSON.parse(languages); - - // console.log("Number of languages: ", languages.length) - - // for(const langObj of languages){ - // await delay(5 * 60) - // await run('daily', convertToSlug(langObj.name)) - // await run('weekly', convertToSlug(langObj.name)) - // await run('monthly', convertToSlug(langObj.name)) - // } - await run('daily', 'json') - await run('weekly', 'json') - await run('monthly', 'json') + await run('daily', 'all') + await run('weekly', 'all') + await run('monthly', 'all') + + let languages = readFileSync(path.resolve(__dirname, DATA_BASE_URL, 'languages.json'), 'utf8'); + languages = JSON.parse(languages); + + console.log("Number of languages: ", languages.length) + + for(const langObj of languages){ + await delay(5 * 60) + await run('daily', convertToSlug(langObj.name)) + await run('weekly', convertToSlug(langObj.name)) + await run('monthly', convertToSlug(langObj.name)) + } })(); \ No newline at end of file diff --git a/script/parse.js b/script/parse.js index 6aa7dc76aa27..ac16ae05dc2a 100644 --- a/script/parse.js +++ b/script/parse.js @@ -17,9 +17,7 @@ function parse(data){ const addStars = $(elm).find('span').last().text().match(/\d+/g)[0] const contributors = $(elm).find(`a[data-hovercard-type="user"] .avatar.avatar-user`).map((_ ,user) => { const name = $(user).attr('alt').replace(/^@/, '') - // const url = BASE_URL + $(user).attr('href') const url = `${BASE_URL}/${name}` - // console.log(url) return { avatar: $(user).attr('src'), name,