Archived
1
0
Fork
You've already forked ynab-ledger
0
Convert exported YNAB4 data to ledger-cli
This repository has been archived on 2024年04月05日. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
  • PHP 100%
Alan Pearce 058a156b6d Add Readme
2015年04月12日 10:03:26 +01:00
src Align accounts and amounts 2015年04月07日 16:46:44 +01:00
.gitignore Initial commit (Scaffolding) 2015年04月05日 15:58:57 +01:00
composer.json Initial commit (Scaffolding) 2015年04月05日 15:58:57 +01:00
composer.lock Initial commit (Scaffolding) 2015年04月05日 15:58:57 +01:00
LICENSE Add project name to license file 2015年04月12日 10:03:12 +01:00
main.php Initial commit (Scaffolding) 2015年04月05日 15:58:57 +01:00
README.md Add Readme 2015年04月12日 10:03:26 +01:00

Introduction

This is just a hacky import script that reads YNAB exports (budget and register) and produces ledger output to stdout.

What it does

It transforms the budget into a set of virtual transactions at the first of the month (or the day of the opening balance, for the first month) balanced against the Assets account. Categorised transactions are exported with a non-balanced virtual posting to reduce the category amount. It guesses whether an account should be an asset or a liability by its starting balance (anything positive denotes an asset), or by the presence of "credit" in the account name. Memos are transformed into comments, either on the transaction or, for split transactions, on each posting.

Status

It mostly works and has served its purpose for me. It doesn’t work so well with off-budget accounts, although transferring into them seems fine, if they have any income it will not be categorised correctly.

I don’t expect to develop this further, unless there is specific need. I haven’t tested it with currencies other than the British Pound. Let me know if something doesn’t work (ideally with some test data) and I’ll try to fix it.

If you want to fix it yourself, go ahead. I’ll merge any pull request that looks reasonable and works with my own data.

Usage

composer install
./main.php convert /path/to/budget.csv /path/to/register.csv > new-ledger-file.dat

License

The project is licensed under the BSD 3-Clause License.