Okane is a plain text accounting software developed with Rust, influenced by ledger-cli.
This tool supports various commands:
balance
to get the current balance of the accounts.register
to get the history of the accounts.accounts
to list all accounts in the file.format
to format given Ledger file into organized format.import
to convert various source including CSV, ISO Camt053 XML into Ledger format.primitive
to hold commands that are not so useful but good for debugging.Note balance
, register
are still work-in-progress, and the UX would change drastically.
Disclaimer: This software is still in early phase, subject to any kind of change.
Follows syntax page for the supported syntax.
Up until now no binary release is provided, so you need to run cargo install
to install the tool.
$ cargo install okane
Similar to Ledger, you can use similar commands.
$ okane accounts /path/to/file.ledger
$ okane balance /path/to/file.ledger
$ okane registry /path/to/file.ledger [optional account]
$ okane format ~/ledger/account.ledger
This command currently prints the formatted output into standard output. In future in-place format would be provided, also to emit diffs to be used as Git hook.
First you need to write YAML file to control import behavior. We'll assume those are placed under ~/ledger/
.
The format of YAML is (sorry) not documented, but you can see tests/testdata
directory as example configurations.
Then run the okane import
command with logging and redirecting to /dev/null
. This way you can dry-run and check its output.
$ RUST_LOG=info okane import --config ~/ledger/import.yml ~/ledger/input_file.csv > /dev/null
After iterating over the logs and modifying YAML file, you can redirect the standard output to the ledger file.
$ RUST_LOG=info okane import --config ~/ledger/import.yml ~/ledger/input_file.csv >> ~/ledger/output_path.ledger
Tips: You probably don't want to handle all the entries, rather should aim to cover 80-90% of entries initially.
This tool is licensed under MIT lisence.