Ledger Format Cheat Sheet

From WikiOD

Here is the cheatsheat of Ledger Format and basic guide on how to use Ledger Format

2015/01/01 Pay rent
  Assets:Savings     -$300
  Expenses:Rent

First line[edit | edit source]

2015/01/01 *       Pay rent       ; tagname:
^          ^       ^
Date       Flag    Description    ^ comment/tag

Balance assertion[edit | edit source]

2015/01/01 Pay rent
  Assets:Savings     -$300 = $1200  ; assert there's $1200 left after
  Expenses:Rent

Flags:

* cleared
! pending

Accounts[edit | edit source]

Only relevant with --strict or --pedantic

account Expenses:Food
    note This account is all about the chicken!
    alias food
    payee ^(KFC|Popeyes)$
    check commodity == "$"
    assert commodity == "$"
    eval print("Hello!")
    default

Others[edit | edit source]

D $1,000.00     ; set default commodity

alias Cash = Assets:Cash

Y2015           ; set default year (you can use 01/25 as date after)

Prefix all transactions with an account[edit | edit source]

account Home
include home.journal
end

Credit:rstacruz