User Submitting Signup

This commit is contained in:
metacryst
2025-11-18 07:58:35 -06:00
parent 81ca35bf2f
commit b8e48f7945
8 changed files with 196 additions and 35 deletions

27
qrCodes/convertToJSON.js Normal file
View File

@@ -0,0 +1,27 @@
import fs from 'fs'
import {parse} from 'csv-parse'
const csvFilePath = './tokens.csv';
const jsonFilePath = './tokens.json';
fs.readFile(csvFilePath, 'utf8', (err, data) => {
if (err) {
console.error('Error reading file:', err);
return;
}
parse(data, { columns: true, skip_empty_lines: true }, (err, output) => {
if (err) {
console.error('Error parsing CSV:', err);
return;
}
fs.writeFile(jsonFilePath, JSON.stringify(output, null, 2), (err) => {
if (err) {
console.error('Error writing JSON file:', err);
} else {
console.log(`JSON successfully written to ${jsonFilePath}`);
}
});
});
});

View File

@@ -1,6 +1,7 @@
{
"type": "module",
"dependencies": {
"csv-parse": "^6.1.0",
"csv-writer": "^1.6.0",
"qrcode": "^1.5.4",
"uuid": "^13.0.0"