Created
July 14, 2014 04:35
-
-
Save tylermenezes/31feb9d2779bbd83950e to your computer and use it in GitHub Desktop.
Exports checked Wave transactions as a CSV
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.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