egh / ledger-autosync

Synchronize your ledger-cli files with your bank.
GNU General Public License v3.0
273 stars 42 forks source link

(Alternate) PayPal converter uses reverse-chronological order #42

Closed 501st-alpha1 closed 6 years ago

501st-alpha1 commented 6 years ago

The transactions in my downloaded PayPal transaction CSV files are listed in reverse-chronological order, with the newest first. It appears that ledger-autosync processes the transactions one at a time and doesn't adjust the order, because it also prints the newest transaction first. (Due to #26, I don't know if this affects either the original converter or the original file format.)

Since ledger files have their transactions in (approximate) chronological order, could this output be reversed?

Obviously I can reorder them myself in the meantime, so this isn't a high priority.

egh commented 6 years ago

Interesting, mine are in chronological order. I've added a --reverse option to print CSV transactions in reverse in https://github.com/egh/ledger-autosync/commit/19a0f9f44d1ee651df077e56d533f36b97351213

egh commented 6 years ago

Probably a better solution would be to sort by date, but I'd rather avoid date sorting - it's hard to get right, and I don't really want to mess up the order in the CSV unless I have to