;---------------------------------------------------------------------- ; ledger2beancount conversion notes: ; ; - Automated or periodic transaction skipped ; - Unsupported directive `i` skipped ; - Unsupported directive `o` skipped ; - Unsupported directive `I` skipped ; - Unsupported directive `O` skipped ; - Unsupported directive `b` skipped ; - Unsupported directive `h` skipped ; - Unsupported directive `C` skipped ; - Unsupported directive `D` skipped ; - Unsupported directive `N` skipped ; - Unsupported directive `eval` skipped ; - Directive `define` with function is not supported: myfunc_seven(s, d, t) ; - Unsupported directive `value` skipped ; - Directive `define` not supported by beancount: replacing foo with 200 USD ; - Directive `define` not supported by beancount: replacing my_var with $5 ; - Directive `define` not supported by beancount: replacing hundred with $100 ; - Directive `define` not supported by beancount: replacing twenty with $20 ; - Directive `define` not supported by beancount: replacing thousand with $1000 ; - Collision for commodity USD: $, USD ;---------------------------------------------------------------------- ; Beancount: 2.1.0 ; SPDX-FileCopyrightText: © 2018 Martin Michlmayr ; ; SPDX-License-Identifier: GPL-3.0-or-later 1970-01-01 open Assets:Another:Alias 1970-01-01 open Assets:Checking 1970-01-01 open Assets:GG 1970-01-01 open Assets:Savings 1970-01-01 open Assets:Test 1970-01-01 open Assets:Test1:Test2:AA 1970-01-01 open Assets:Test1:Test2:Another:Alias 1970-01-01 open Assets:Test1:Test2:BB 1970-01-01 open Assets:Test1:Test2:CC:DD 1970-01-01 open Assets:Test1:Test2:EE:FF 1970-01-01 open Assets:Test1:Test2:XXX:AA 1970-01-01 open Assets:What:A:Long:Name 1970-01-01 open Equity:Opening-Balance 1970-01-01 commodity EUR 1970-01-01 commodity USD ; = expr true ; Assets:Foo 50.00 USD ; Assets:Bar -50.00 USD ; = /^(?:Income:|Expenses:(?:Business|Rent$|Furnishings|Taxes|Insurance))/ ; (Liabilities:Huququ'llah) 0.19 ; ~ Yearly ; Expenses:Auto:Repair $500.00 ; Assets ; payee KFC ; alias KENTUCKY FRIED CHICKEN ; uuid 2a2e21d434356f886c84371eebac6e44f1337fda ; payee McD ; payee Burger King ; setting year 2014 ; (no space) 2014-10-02 * "Transaction without year" Assets:Test 10.00 EUR Equity:Opening-Balance -10.00 EUR 2014-10-02 * "Transaction without year, with aux date" aux-date: 2014-10-01 Assets:Test 10.00 EUR Equity:Opening-Balance -10.00 EUR ; setting year 2015 2015-10-02 * "Transaction without year" Assets:Test 10.00 EUR Equity:Opening-Balance -10.00 EUR 2015-10-02 * "Transaction without year, with aux date" aux-date: 2015-10-01 Assets:Test 10.00 EUR Equity:Opening-Balance -10.00 EUR ; setting year 2016 2016-10-02 * "Transaction without year" Assets:Test 10.00 EUR Equity:Opening-Balance -10.00 EUR 2016-10-02 * "Transaction without year, with aux date" aux-date: 2016-10-01 Assets:Test 10.00 EUR Equity:Opening-Balance -10.00 EUR 2018-03-25 * "Transaction with year" Assets:Test 10.00 EUR Equity:Opening-Balance -10.00 EUR ; setting year 2018 2018-10-02 * "Transaction without year" Assets:Test 10.00 EUR Equity:Opening-Balance -10.00 EUR 2018-10-02 * "Transaction without year, with aux date" aux-date: 2018-10-01 Assets:Test 10.00 EUR Equity:Opening-Balance -10.00 EUR 2015-03-25 * "Transaction with year" Assets:Test 10.00 EUR Equity:Opening-Balance -10.00 EUR ; apply year can be nested 2013-04-13 txn "Test apply year - 2013" Assets:Test 10.00 EUR Equity:Opening-Balance -10.00 EUR 2015-04-13 txn "Test apply year - 2015" Assets:Test 10.00 EUR Equity:Opening-Balance -10.00 EUR 2014-04-13 txn "Test apply year - 2014" Assets:Test 10.00 EUR Equity:Opening-Balance -10.00 EUR 2013-04-13 txn "Test apply year - 2013" Assets:Test 10.00 EUR Equity:Opening-Balance -10.00 EUR 2016-04-13 txn "Test year after apply year - should be back to last year directive: 2016" Assets:Test 10.00 EUR Equity:Opening-Balance -10.00 EUR include "include1.beancount" include "include2.beancount" include "include3.beancount" ; Test apply account and apply tag pushtag #foo pushtag #bar 2018-03-29 * "Test apply" test: "martin" ^2018-02-02-brussels-fosdem Assets:Test1:Test2:AA 10.00 EUR Assets:Test1:Test2:BB 2018-03-29 * "Test apply" test: "martin" ^2018-02-02-brussels-fosdem Assets:Test1:Test2:CC:DD 10.00 EUR Assets:Test1:Test2:EE:FF poptag #bar poptag #foo ; Test apply account and alias 2018-03-29 * "Test apply" Assets:Test1:Test2:AA 10.00 EUR Assets:What:A:Long:Name 2018-03-29 * "Test apply" Assets:Test1:Test2:XXX:AA 10.00 EUR Assets:Test1:Test2:Another:Alias 2018-03-29 * "Test apply" Assets:GG 10.00 EUR Assets:Test1:Test2:Another:Alias 2018-03-29 * "Test apply" Assets:GG 10.00 EUR Assets:Another:Alias 2018-03-29 * "Bucket" Assets:Test 10.00 EUR Assets:Checking 2018-03-29 * "Bucket" Assets:Test 10.00 EUR Assets:Savings ; timeclock ; i 2018-03-29 14:10:20 B ; o 2018-03-29 14:50:00 ; I 2018-03-29 14:55:40 B ; O 2018-03-29 15:10:10 ; b 2018-03-29 14:10:20 ; h 2018-03-29 14:10:20 ; commodity conversion ; C 1.00 Mb = 1024 Kb ; Default Commodity ; D 1000.00 EUR ; Ignore pricing information ; N EUR ; import os ; python ; def print_type(val): ; print(type(val), val) ; ; eval print_type(true) ; python ; def option_pyfirst(context): ; print("In --pyfirst (from %s)" % context) ; ; def option_pysecond(context, val): ; print("In --pysecond=%s (from %s)" % (val, context)) 2019-04-28 * "Transactions can follow python without empty line" Assets:Test 10.00 EUR Equity:Opening-Balance -10.00 EUR ; define myfunc_seven(s, d, t) = 7 EUR ;; The 'value' directive sets the valuation used for all commodities used in ;; the rest of the daat stream. This is the fallback, if nothing more ;; specific is found. ; value myfunc_seven 2020-06-27 txn "Using define" Assets:Test 200 USD Equity:Opening-Balance 2020-06-27 txn "Using define" Assets:Test 5*4 USD Equity:Opening-Balance 2020-06-27 txn "Using define" Assets:Test 100*4 USD Equity:Opening-Balance 2020-06-27 txn "Using multiple define" Assets:Test 100*4 +20 USD Equity:Opening-Balance 2020-06-27 txn "Using multiple define" Assets:Test 1000 +100*4 +20 USD Equity:Opening-Balance