const fs = require('fs');
let code = fs.readFileSync('public/index.html', 'utf8');
// 1. Update the table header to move Date next to # (Serial No)
const oldThead = `
`;
const newThead = `
#
File Name & Batch
(click ✏️ to edit title live)
Date
File Type
Upload Status
(live progress & speed)
Action
`;
if (code.includes(oldThead)) {
code = code.replace(oldThead, newThead);
console.log('✔ Replaced thead');
} else {
console.log('⚠ Could not match oldThead directly');
}
// 2. Add Date Analytics & Multi-Date Filter Bar right above the table
const oldTableContainerStart = `
#
Video Date
File Name & Batch
(click ✏️ to edit title live)
File Type
Upload Status
(live progress & speed)
Action