fdavies93 / seneca

CLI tool to convert Wise transactions into Beancount format with multi-currency
4 stars 0 forks source link

[feature] Option to sort the transactions by date (asc) #2

Closed johnmee closed 8 months ago

johnmee commented 8 months ago

The transactions are not generated in a predictable order.

Whilst I understand that date order is not a beancount requirement, it might be nice to have, perhaps as an option, or by default, to output the transactions in ascending date order.

Expected:

2022-06-10 * "Bill Buckle"
    Income:Unassigned -500.0 AUD
    Assets:Wise 500.0 AUD

2023-03-16 * "Bill Buckle"
    Income:Unassigned -3000.0 AUD
    Assets:Wise 3000.0 AUD

2023-09-27 * "TransferWise"
    Income:Unassigned -0.07 AUD
    Assets:Wise 0.07 AUD

2023-11-15 * "CROSSLINKS"
    Assets:Wise -35.0 GBP @@ 35.0 GBP
    Expenses:Unassigned 35.0 GBP

Observed:

2023-11-15 * "CROSSLINKS"
    Assets:Wise -35.0 GBP @@ 35.0 GBP
    Expenses:Unassigned 35.0 GBP

2023-09-27 * "TransferWise"
    Income:Unassigned -0.07 AUD
    Assets:Wise 0.07 AUD

2022-06-10 * "Bill Buckle"
    Income:Unassigned -500.0 AUD
    Assets:Wise 500.0 AUD

2023-03-16 * "Bill Buckle"
    Income:Unassigned -3000.0 AUD
    Assets:Wise 3000.0 AUD
fdavies93 commented 8 months ago

I will add this as an option when I have a bit more free time (perhaps in around a week).

fdavies93 commented 8 months ago

Updated the program and the README with a simple switch for this. At the moment this sorts from the beancount output string directly and as such doesn't support other fields. This might change, but it's likely I'll keep asc and desc by date as the default flags and add some other syntax for sorting by e.g. transaction note or source account.