actual/packages/import-ynab5/index.js

16 lines
353 B
JavaScript
Raw Normal View History

2022-04-29 02:44:38 +00:00
#!/usr/bin/env node
const fs = require('fs');
const { init, shutdown } = require('@actual-app/api');
const { findBudgets, importYNAB5 } = require('./importer');
async function run() {
let filepath = process.argv[2];
let data = JSON.parse(fs.readFileSync(filepath, 'utf8'));
await init();
await importYNAB5(data);
await shutdown();
}
run();