parent
fe9ba337d8
commit
69f58d7435
|
@ -32,7 +32,6 @@
|
|||
"@tiptap/extension-mention": "2.0.0-beta.102",
|
||||
"@tiptap/starter-kit": "2.0.0-beta.190",
|
||||
"cors": "2.8.5",
|
||||
"csv-parser": "3.0.0",
|
||||
"express": "4.18.1",
|
||||
"firebase-admin": "10.0.0",
|
||||
"firebase-functions": "3.21.2",
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,21 +0,0 @@
|
|||
// Run with `npx ts-node src/scripts/grants/parse-op.ts`
|
||||
|
||||
import * as fs from 'fs'
|
||||
|
||||
// Parse OpenPhil grants from csv file
|
||||
async function parseOp() {
|
||||
const csv = fs.readFileSync('op-grants.csv', 'utf8')
|
||||
const lines = csv.split('\n')
|
||||
// Remove header row
|
||||
lines.shift()
|
||||
const grants = lines.map((line) => {
|
||||
const [grant, orgName, focusArea, amount, date] = line.split(',')
|
||||
// Return a json-formatted string like `{ from: 'OP', to: 'Manifold', amount: 1234 }`
|
||||
return `{ from: "OP", to: ${orgName}, date: ${date}, amount: ${amount}, description: ${grant}${focusArea} }`
|
||||
})
|
||||
fs.writeFileSync('output-grants.csv', grants.join('\n'))
|
||||
}
|
||||
|
||||
if (require.main === module) {
|
||||
parseOp().then(() => process.exit())
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
import { Grant } from '.'
|
||||
|
||||
export const ftxGrants: Grant[] = []
|
|
@ -5043,13 +5043,6 @@ csstype@^3.0.2:
|
|||
resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.0.tgz#4ddcac3718d787cf9df0d1b7d15033925c8f29f2"
|
||||
integrity sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==
|
||||
|
||||
csv-parser@3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/csv-parser/-/csv-parser-3.0.0.tgz#b88a6256d79e090a97a1b56451f9327b01d710e7"
|
||||
integrity sha512-s6OYSXAK3IdKqYO33y09jhypG/bSDHPuyCme/IdEHfWpLf/jKcpitVFyOC6UemgGk8v7Q5u2XE0vvwmanxhGlQ==
|
||||
dependencies:
|
||||
minimist "^1.2.0"
|
||||
|
||||
d3-array@2, d3-array@^2.3.0:
|
||||
version "2.12.1"
|
||||
resolved "https://registry.yarnpkg.com/d3-array/-/d3-array-2.12.1.tgz#e20b41aafcdffdf5d50928004ececf815a465e81"
|
||||
|
|
Loading…
Reference in New Issue
Block a user