diff --git a/electron/decoder/decoder.js b/electron/decoder/decoder.js index e69de29..aec1b7f 100644 --- a/electron/decoder/decoder.js +++ b/electron/decoder/decoder.js @@ -0,0 +1,12 @@ +const { DBFFile } = require("dbffile"); + +async function DecodeEstimate(filePath) { + //Path to AD1 + let dbf = await DBFFile.open("C:\\VPS\\EMS\\687_3_A.LIN"); + console.log(`DBF file contains ${dbf.recordCount} records.`); + console.log(`Field names: ${dbf.fields.map((f) => f.name).join(", ")}`); + let records = await dbf.readRecords(100); + for (let record of records) console.log(record); +} + +exports.DecodeEstimate = DecodeEstimate; diff --git a/src/App/App.jsx b/src/App/App.jsx index 9a0452b..10b5aef 100644 --- a/src/App/App.jsx +++ b/src/App/App.jsx @@ -36,10 +36,10 @@ export function App() {
Welcome to your new react app. asdas sd