1
0

feat: Convert to modules
All checks were successful
Remote Deploy / deploy (push) Successful in 3s

This commit is contained in:
2025-08-31 16:48:40 +02:00
parent 1a29836e44
commit c82fef9e4f
9 changed files with 23 additions and 129 deletions

View File

@@ -1,9 +1,9 @@
const XLSX = require('xlsx');
const fs = require("fs");
const parseAbsence = require('./utils/parseAbsence');
const parseTeachers = require('./utils/parseTeachers');
import XLSX from "xlsx";
import fs from "fs";
import parseAbsence from "./utils/parseAbsence.js";
import parseTeachers from "./utils/parseTeachers.js";
async function parseThisShit(downloadedFilePath) {
export default async function parseThisShit(downloadedFilePath) {
const workbook = XLSX.readFile(downloadedFilePath);
const sheetNames = workbook.SheetNames;
@@ -138,6 +138,4 @@ async function parseThisShit(downloadedFilePath) {
fs.writeFileSync('db/current.json', JSON.stringify(data));
}
module.exports = parseThisShit;
// parseThisShit("downloads/table.xlsx");