Initial commit of Vox English challenge system

This commit is contained in:
chaos
2026-03-17 00:05:46 +08:00
commit 8a055daf5e
41 changed files with 4790 additions and 0 deletions

25
generate_template.cjs Normal file
View File

@@ -0,0 +1,25 @@
const XLSX = require('xlsx');
const path = require('path');
const fs = require('fs');
const data = [
['word', 'meaning'],
['apple', 'n. 苹果'],
['banana', 'n. 香蕉'],
['persistent', 'adj. 执着的,持久的'],
['eloquent', 'adj. 雄辩的,有口才的']
];
const ws = XLSX.utils.aoa_to_sheet(data);
const wb = XLSX.utils.book_new();
XLSX.utils.book_append_sheet(wb, ws, 'Words');
const staticDir = path.join(__dirname, 'static');
if (!fs.existsSync(staticDir)) {
fs.mkdirSync(staticDir);
}
const outFile = path.join(staticDir, 'import_template.xlsx');
XLSX.writeFile(wb, outFile);
console.log('Template generated at:', outFile);