这是用户在 2024-12-31 16:19 为 https://docs.google.com/document/u/0/d/1M4GwF6BkcXyVVvj4yXBJMX7YFXpxlxo95W6CpU3uWVc/mobilebasic?tab=... 保存的双语快照页面,由 沉浸式翻译 提供双语支持。了解如何保存?
Beancount - Syntax Cheat Sheet
Beancount - 语法小抄

Beancount Syntax Cheat Sheet
Beancount 语法小抄

Example Account Name:                       Assets:US:BofA:Checking
账户名称示例:Assets:US:BofA:Checking

Account Types  账户类型

Assets  资产

Liabilities  负债

Income  收入

Expenses  开支

Equity  公平

+

-

-

+

-

Commodities  商品

All in CAPS:  全部用大写字母表示:

USD, EUR, CAD, AUD  美元、欧元、加元、澳元

GOOG, AAPL, RBF1005  GOOG、AAPL、RBF1005

HOME_MAYST, AIRMILES
HOURS  小时

Directives  指令

General syntax:  一般语法:

YYYY-MM-DD <directive> <arguments...>
YYYY-MM-DD <指令> <参数...>

Opening & Closing Accounts
开设和关闭账户

2001-05-29 open Expenses:Restaurant
2001-05-29 开放 费用:餐厅

2001-05-29 open Assets:Checking     USD,EUR  ; Currency constraints
2001-05-29 打开 资产:检查美元、欧元 货币限制

2015-04-23 close Assets:Checking
2015-04-23 关闭 资产:检查

Declaring Commodities  申报商品

This is optional; use this only if you want to attach metadata by currency.
这是可选项;只有当您想按货币附加元数据时才使用。

1998-07-22 commodity AAPL
1998-07-22 商品 AAPL

 name: "Apple
Computer Inc."
名称:"苹果电脑公司"

Prices  价格

Use many times to fill historical price database:
多次使用可填充历史价格数据库:

2015-04-30 price AAPL   125.15 USD
2015-04-30 价格 AAPL 125.15 美元

2015-05-30 price AAPL   130.28 USD
2015-05-30 价格 AAPL 130.28 美元

Notes  说明

2013-03-20 note Assets:Checking "Called to ask about rebate"
2013-03-20 备注 Assets:Checking "致电询问回扣事宜"

Documents  文件

2013-03-20 document Assets:Checking "path/to/statement.pdf"
2013-03-20 文档资产:检查 "path/to/statement.pdf"

Transactions  交易

2015-05-30 * "Some narration about this transaction"
2015-05-30 * "关于此次交易的一些叙述"

 Liabilities:CreditCard   -101.23 USD
负债:信用卡 -101.23 美元

 Expenses:Restaurant       101.23 USD
支出:餐厅 101.23 美元

2015-05-30 ! "Cable Co" "Phone Bill" #tag ˆlink
2015-05-30 !"有线电视公司" "电话费" #标签 ˆ链接

  id: "TW378743437"               ; Meta-data
id:"TW378743437";元数据

 Expenses:Home:Phone  87.45 USD
支出:家庭:电话 87.45 美元

 Assets:Checking                
; You may leave one amount out
资产:支票;您可以省略一个金额

Postings  张贴

  ...    123.45 USD                             Simple
... 123.45 USD 简单

 ...        10 GOOG
{502.12 USD}               With per-unit cost
... 10 goog {502.12 usd}单位成本

  ...        10 GOOG {{5021.20 USD}}            With total cost
... 10 goog {{5021.20 美元}}。总费用

  ...        10 GOOG {502.12 # 9.95 USD}        With both costs
... 10 GOOG {502.12 # 9.95 USD}两种费用

 ...   1000.00 USD  
@ 1.10 CAD                With per-unit price
... 1000.00 美元 @ 1.10 加元(含单价

 ...        10 GOOG {502.12 USD} @ 1.10 CAD    
With cost & price
... 10 GOOG {502.12 USD} @ 1.10 CAD@ 1.10 加元 含成本和价格

 ...        10 GOOG {502.12 USD,
 2014-05-12}   With date 
... 10 GOOG {502.12 USD, 2014-05-12}有日期

 
! ...   123.45 USD ...                        With flag
!... 123.45 USD ...带国旗

Balance Assertions and Padding
平衡断言和填充

Asserts the amount for only the given currency:
仅按给定货币确定金额:

2015-06-01 balance Liabilities:CreditCard  -634.30 USD
2015-06-01 余额 负债:信用卡 -634.30 美元

Automatic insertion of transaction to fulfill the following assertion:
自动插入交易,以实现以下断言:

YYYY-MM-DD pad Assets:Checking Equity:Opening-Balances
资产:支票权益:期初余额

Events  活动

YYYY-MM-DD event "location" "New York, USA"
YYYY-MM-DD 事件 "地点""美国纽约"

YYYY-MM-DD event "address" "123 May Street"
YYYY-MM-DD 事件 "地址""梅街 123 号"

Options   选项

option "title" "My Personal Ledger"
选项 "title""我的个人账户"

See this doc for the full list of supported options.
有关支持选项的完整列表,请参阅本文档。

Other  其他

pushtag #trip-to-peru

...

poptag  #trip-to-peru  poptag #trip-to-peru

; Comments begin with a semi-colon
注释以分号开头