Beancount 速查表
账户名称示例
Assets:US:BofA:Checking
账户类型
Assets +
Liabilities -
Income -
Expenses +
Equity -
商品
CNY, EUR, CAD, AUD
GOOG, AAPL, RBF1005
HOME_MAYST, AIRMILES
HOURS
指令集
基本语法:
YYYY-MM-DD <指令> <参数...>
创建、关闭账户
2001-05-29 open Expenses:Restaurant
2001-05-29 open Assets:Checking CNY,EUR ; 货币限制
2015-04-23 close Assets:Checking
声明货币,添加元信息(可选)
1998-07-22 commodity AAPL
name: "Apple Computer Inc."
记录价格
2015-04-30 price AAPL 125.15 CNY
2015-05-30 price AAPL 130.28 CNY
备注
2013-03-20 note Assets:Checking "Called to ask about rebate"
附加文档
2013-03-20 document Assets:Checking "path/to/statement.pdf"
事务
2015-05-30 * "Some narration about this transaction"
Liabilities:CreditCard -101.23 CNY
Expenses:Restaurant 101.23 CNY
2015-05-30 ! "Cable Co" "Phone Bill" #tag ˆlink
id: "TW378743437" ; Meta-data
Expenses:Home:Phone 87.45 CNY
Assets:Checking ; You may leave one amount out
条目
... 123.45 CNY 简单记录
... 10 GOOG {502.12 CNY} 记录单位成本
... 10 GOOG {{5021.20 CNY}} 记录总成本
... 10 GOOG {502.12 # 9.95 CNY} With both costs
... 1000.00 CNY @ 1.10 CAD With per-unit price
... 10 GOOG {502.12 CNY} @ 1.10 CAD With cost & price
... 10 GOOG {502.12 CNY, 2014-05-12} With date
! ... 123.45 CNY ... With flag
余额断言和补垫
; 断言制定货币的金额为 -634.30 CNY
2015-06-01 balance Liabilities:CreditCard -634.30 CNY
; 自动插入交易以完成以下断言
2015-06-01pad Assets:Checking Equity:Opening-Balances
事件
2015-06-01 event "location" "New York, USA"
2015-06-30 event "address" "123 May Street"
选项
option "title" "My Personal Ledger"
其它
pushtag #trip-to-peru
...
poptag #trip-to-peru
; Comments begin with a semi-colon