Skip to content

Commit

Permalink
feat: script to pass submissions file as an argument
Browse files Browse the repository at this point in the history
  • Loading branch information
adrienjoly committed Mar 19, 2020
1 parent 6aa14f2 commit 8c037f1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/extract-student-submissions-from-spreadsheet-json.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
// script to convert json file from google spreadsheet to /students/*.json submission files

const JSON_SUBMISSIONS_FILE = '../student-submissions.csv.json' // csv file exported from google spreadsheets and converted to json with https://www.csvjson.com/csv2json
// USAGE: $ node src/extract-student-submissions-from-spreadsheet-json.js ./student-submissions.csv.json

const JSON_SUBMISSIONS_FILE = process.argv[2] || 'student-submissions.csv.json' // csv file exported from google spreadsheets and converted to json with https://www.csvjson.com/csv2json

const fs = require('fs');
const submissions = require(JSON_SUBMISSIONS_FILE);
const submissions = require('../' + JSON_SUBMISSIONS_FILE);

try {
fs.mkdirSync('./students');
Expand Down

0 comments on commit 8c037f1

Please sign in to comment.