You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
437 B
JavaScript

// rename to a format compatible with prepareData
const fs = require('fs');
const data = JSON.parse(fs.readFileSync('data.json'));
const dir = 'raw'
if(!fs.existsSync('data')) fs.mkdirSync('data');
for(let i = 0; i < data.length; i++) {
const datai = data[i]
try {
fs.copyFileSync(`${dir}/${datai.uuid}/resultraw.png`, `data/${datai.solution}.png`)
} catch(e) {
console.log(e)
}
}
console.log('done')