Double-entry accounting ledger parser
Clone or download
Latest commit 753a6db Jul 31, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib make stylistic cleanups Jul 18, 2018
t restrict to known units of measure Jun 9, 2018
.gitignore reup peru May 14, 2016
.hgignore add .subgit to hgignore Mar 20, 2018
.peru.yml reup peru, git checkout commit ID Dec 3, 2016
.travis.yml update libxxhash to v0.6.5 Apr 21, 2018
Build.pm6 mv Build.pm Build.pm6 Jul 31, 2018
META6.json bump version to 0.1.0, rename AST to ParseTree Apr 15, 2018
README.md make Ledger May 12, 2018
UNLICENSE Initial import Apr 28, 2016

README.md

TXN::Parser

Double-entry accounting ledger parser

Synopsis

use TXN::Parser;
use TXN::Parser::ParseTree;

# parse ledger from string
my $txn = Q:to/EOF/;
2014-01-01 "I started the year with $1000 in Bankwest"
  Assets:Personal:Bankwest:Cheque    $1000 USD
  Equity:Personal                    $1000 USD
EOF
my Ledger $ledger = TXN::Parser.parse($txn).made;

# parse ledger from file
my $file = 'sample.txn';
my Ledger $ledger = TXN::Parser.parsefile($file).made;

Installation

Dependencies

Test Dependencies

To run the tests:

$ git clone https://github.com/atweiden/txn-parser && cd txn-parser
$ peru --file=.peru.yml --sync-dir="$PWD" sync
$ PERL6LIB=lib prove -r -e perl6

Licensing

This is free and unencumbered public domain software. For more information, see http://unlicense.org/ or the accompanying UNLICENSE file.