Skip to content

Instantly share code, notes, and snippets.

@tylermenezes
Created July 14, 2014 04:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tylermenezes/31feb9d2779bbd83950e to your computer and use it in GitHub Desktop.
Save tylermenezes/31feb9d2779bbd83950e to your computer and use it in GitHub Desktop.
Exports checked Wave transactions as a CSV
$.makeArray($('.financial-transaction-item').map(function(x, e){
if (!$(e).find('.financial-transaction-checkbox input').is(':checked')) return;
var is_negative = $(e).is('.expense');
return {
date: $(e).find('.financial-transaction-date input').val(),
description: $(e).find('.financial-transaction-description input').val(),
amount: parseFloat($(e).find('.financial-transaction-amount .js-amount-readonly').attr('title').replace(',', '')) * (is_negative? -1 : 1),
raw_amount: $(e).find('.financial-transaction-amount .js-amount-readonly').attr('title'),
elem: e
};}).map(function(x,e){ return e.date+',"'+e.description+'",'+e.amount; })).join("\n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment