Skip to content
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

added beancount file format #630

Merged
merged 1 commit into from
Sep 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions languages.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,11 @@
"line_comment": ["REM", "::"],
"extensions": ["bat", "btm", "cmd"]
},
"Bean": {
"line_comment": [";"],
"quotes": [["\\\"", "\\\""]],
"extensions": ["bean", "beancount"]
},
"C": {
"line_comment": ["//"],
"multi_line_comments": [["/*", "*/"]],
Expand Down
27 changes: 27 additions & 0 deletions tests/data/bean.bean
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
; 27 lines 13 code 6 comments 8 blanks

option "operating_currency" "EUR"

2002-01-01 commodity EUR
name: "Euro"
asset-class: "cash"


; open accounts initially
2020-09-01 open Equity:Opening-Balances
2020-09-01 open Assets:Cash EUR
2020-09-01 open Expenses:Food EUR

; put initial money on account
2020-09-01 pad Assets:Cash Equity:Opening-Balances

; verifying starting balance
2020-09-02 balance Assets:Cash 81.7 EUR

; transfering money
2020-09-03 * "transfer of money"
Assets:Cash -17.7 EUR
Expenses:Food

; validating changed balance
2020-09-04 balance Assets:Cash 64 EUR