Koku bindings for node.js
This simple module uses node-applescript to allow easy input and output of data from the Mac OS X finance application Koku. If you use Koku, this wrapper might help you write your own financial information importer (in the absence of first party DirectConnect functionality for your bank) or other utility.
First of all:
npm install koku
var Koku = ;var kokuInstance = ; // Asynchronous// Document list// returns array of KokuDocument objectskokuInstancedocuments;// Account list// returns array of KokuAccount objectskokuInstancedocuments0accounts;// Tags// returns array of KokuTag objectskokuInstancedocuments0tags;// Transactions for accountkokuInstancedocuments0; // Asynchronous// returns array of KokuTransaction objectskokuInstancedocuments0transactions;
...more documentation to come soon.
For the moment, the
KokuAccount.loadTransactions() method is very slow - and as a result will not execute automatically. I'm looking into performance improvements, and refactoring the method, but the issue seems to just be that Apple events are slow.
Koku() constructor and the
KokuAccount.loadTransactions() methods are asynchronous. The former will most likely execute in under ~250msec depending on the size of your Koku library and how many documents you've got open.
KokuTransaction objects are designed to mirror as closely as possible their equivalents in the Koku AppleScript dictionary.