From fe9ba337d854f731e254f9c39cee8e9283dfd04b Mon Sep 17 00:00:00 2001 From: Austin Chen Date: Wed, 3 Aug 2022 14:43:34 -0700 Subject: [PATCH] Fix ftx script --- functions/src/scripts/grants/scrape-ftx.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/functions/src/scripts/grants/scrape-ftx.ts b/functions/src/scripts/grants/scrape-ftx.ts index d6a8f173..c205d00f 100644 --- a/functions/src/scripts/grants/scrape-ftx.ts +++ b/functions/src/scripts/grants/scrape-ftx.ts @@ -1,4 +1,4 @@ -// Run with `npx ts-node src/scripts/scrape-ftx.ts` +// Run with `npx ts-node src/scripts/grants/scrape-ftx.ts` import * as cheerio from 'cheerio' import * as fs from 'fs' @@ -61,7 +61,11 @@ async function scrapeFtx() { )}, description: '${strip(grant.description)}' },` ), ] - fs.writeFileSync('ftx-grants.csv', csvLines.join('\n')) + console.log(csvLines.join('\n')) + fs.writeFileSync( + '../web/lib/util/ftx-grants.ts', + 'export const grants = [\n' + csvLines.join('\n') + '\n]' + ) } if (require.main === module) {