actual/packages/import-ynab4/index.js

16 lines
349 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, 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();