New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for ledger plain text accounting format #766

Open
colindean opened this Issue Sep 4, 2017 · 1 comment

Comments

Projects
None yet
1 participant
@colindean

colindean commented Sep 4, 2017

I'd like to be able to parse ledger format. Ledger-CLI is an open source accounting tool that started the plaintext accounting ecosystem.

@colindean

This comment has been minimized.

Show comment
Hide comment
@colindean

colindean Sep 4, 2017

I've got a start on it in https://github.com/colindean/rouge/blob/colindean/ledger/lib/rouge/lexers/ledger.rb but I'm really struggling with the state machine. I can't seem to get it to recognize the commodity token that follows the amount in a transaction's line item. Then, I can't get it to start over again processing the next line item in a transaction. I've tried littering with :pop! to no avail.

You can see an (inexhaustive) example here. I've been using Rouge's built-in tester with http://localhost:9292/ledger.

colindean commented Sep 4, 2017

I've got a start on it in https://github.com/colindean/rouge/blob/colindean/ledger/lib/rouge/lexers/ledger.rb but I'm really struggling with the state machine. I can't seem to get it to recognize the commodity token that follows the amount in a transaction's line item. Then, I can't get it to start over again processing the next line item in a transaction. I've tried littering with :pop! to no avail.

You can see an (inexhaustive) example here. I've been using Rouge's built-in tester with http://localhost:9292/ledger.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment