-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
23 lines (17 loc) · 671 Bytes
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
const Reader = require("./entities/Reader");
const Processor = require("./entities/Processor");
const Table = require("./entities/Table");
const HtmlParser = require("./entities/HtmlParser");
const Writer = require("./entities/Writer");
const PdfWriter = require("./entities/PdfWriter");
const reader = new Reader();
const writer = new Writer();
async function main() {
const data = await reader.read("./users.csv");
const processedData = Processor.process(data);
const tableData = new Table(processedData);
const html = await HtmlParser.parse(tableData);
writer.write(Date.now()+".html", html);
PdfWriter.writePdf(Date.now() + ".pdf", html);
}
main();