74 lines
1.1 KiB
Plaintext
74 lines
1.1 KiB
Plaintext
# hledger journal "other"/legacy syntax -*- ledger -*-
|
|
# keep synced with hledger.m4.md
|
|
|
|
# `apply account` set a default parent account
|
|
<
|
|
apply account per
|
|
|
|
2022-01-01
|
|
expenses:food 1 ; parsed as per:expenses:food
|
|
assets:cash ; parsed as per:assets:cash
|
|
|
|
end apply account
|
|
$ hledger -f- check
|
|
|
|
# `D AMT` set a default commodity and its format
|
|
<
|
|
D $0.0
|
|
$ hledger -f- check
|
|
|
|
# star comment line
|
|
<
|
|
*
|
|
$ hledger -f- check
|
|
|
|
# `=` An automated transaction
|
|
<
|
|
= expenses:food
|
|
(budget:food) *-1
|
|
|
|
$ hledger -f- check
|
|
|
|
# `Y`/`year` set the year for year-less dates
|
|
<
|
|
Y 1111
|
|
1/1
|
|
year 2222
|
|
2/2
|
|
apply year 3333
|
|
3/3
|
|
$ hledger -f- print
|
|
1111-01-01
|
|
|
|
2222-02-02
|
|
|
|
3333-03-03
|
|
|
|
>=
|
|
|
|
# ignored directives
|
|
<
|
|
apply fixed CAD $0.90
|
|
end apply fixed
|
|
apply tag tag1:val1
|
|
end apply tag
|
|
assert 1
|
|
bucket Assets:Checking
|
|
A Assets:Checking
|
|
C $1 = USD 1
|
|
capture Expenses:Deductible:Medical Medical
|
|
check 1
|
|
define var_name=$100
|
|
expr 1
|
|
N USD
|
|
tag Receipt
|
|
check value =~ /pattern/
|
|
assert value != "foobar"
|
|
value some_func
|
|
python
|
|
import os
|
|
eval foo
|
|
--command-line-flag
|
|
|
|
$ hledger -f- check
|