actual/packages/import-ynab4/index.js
2022-04-28 22:44:38 -04:00

15 lines
349 B
JavaScript
Executable file

#!/usr/bin/env node
const fs = require('fs');
const { init, shutdown } = require('@actual-app/api');
const { findBudgets, importBuffer } = require('./importer');
async function run() {
let filepath = process.argv[2];
let buffer = fs.readFileSync(filepath);
await init();
await importBuffer(filepath, buffer);
await shutdown();
}
run();