diff --git a/quickref/index.html b/quickref/index.html index dd1747c..769c0ee 100755 --- a/quickref/index.html +++ b/quickref/index.html @@ -9,30 +9,30 @@ -
++
-
+
Some information about the major Plain Text Accounting implementations, drawn from existing docs and informal testing, that I needed to see in one place. Currently, it compares the main journal syntax for Ledger, hledger and Beancount. For more, see the manuals and cheatsheets linked below, or - - + + plaintextaccounting.org @@ -40,125 +40,143 @@ plaintextaccounting.org I hope you find it useful.
-+
First draft, created 2016/03, corrections to: sm on - - + + #hledger or - - + + #ledger or - - + + #beancount , or the - - + + google doc
-+
-
-
-
+
+
+
Quick Reference for the Ledger-Likes
-
-
+
+
+
Journal Format
-
-
+
+
+
Basic example
-
-
+
+
+
Comments
-
-
+
-
-
-
+
+
+
Dates
-
-
+
+
+
Account names
-
-
+
+
+
+Amounts
+
+
-
-
+
+
+
Prices
-
-
-Balance assertions, resets
+
-
-
-
+
+
+
+Balance assignments
+
+
+
+
Directives
-
-
+
+
+
account, open
-
-
+
+
+
close
-
-
+
+
+
commodity
+
+
+market price
+
+
-
-
-
-
-Ledger
+
+
+
+Ledger
+
Beancount
-
+
+
-
+
+
; a comment
-
+
+
; a comment
-
+
+
; a comment
-
+
+
; comment
-
+
+
; comment
-
+
+
; comment
-
+
+
DATE [DESCRIPTION]
-
+
+
DATE [DESCRIPTION]
-
+
+
-
+
+
DATE txn ["DESCRIPTION"]
-
+
+
YYYY-MM-DD
-
+
+
YYYY-MM-DD
-
+
+
YYYY-MM-DD
-
+
+
TOPACCT[:SUBACCT[:...]]
-
+
+
TOPACCT[:SUBACCT[:...]]
-
+
+
TOPACCT[:SUBACCT[:...]]
-
+
+
One of
-
+
+
-
+
+
One of
-
+
+
Digit group separator is
-
+
,
-
+
or
-
+
.
-
+
-
+
+
-
+
+
QUANTITY COMMODITY
-
+
+
DATE [FLAG] [(CODE)] DESCRIPTION
-
+
+
DATE [FLAG] [(CODE)] DESCRIPTION
-
+
+
DATE [txn|FLAG] [["PAYEE"] "DESCRIPTION"]
-
+
+
One of
-
+
+
One of
-
+
+
{LOTUNITPRICE[ / LOTDATE]}
-
+
+
= AMOUNT (after posting amount & price)
-
+
+
= AMOUNT (after posting amount & price)
-
+
+
DATE balance ACCOUNT AMOUNT
-
+
+
= AMOUNT (no preceding posting amount)
-
+
+
-
+
+
-
+
+
-
-
-
-
+
+
-
+
+
+
+
+
-
+
+
account ACCOUNT
-
+
+
[SUBDIRECTIVES]
-
+
+
-
+
+
DATE open ACCOUNT [COMMODITY[,...]] [METHOD]
-
-
-
-
+
+
-
+
+
+
+
+
DATE close ACCOUNT
-
+
+
commodity COMMODITY
-
+
+
-
+
+
DATE commodity COMMODITY
-
+
+
P DATE TIME COMMODITY UNITPRICE
-
+
+
-
+
+
P DATE COMMODITY UNITPRICE
-
+
+
DATE price COMMODITY AMOUNT
-
+
+
diff --git a/quickref/quickref.css b/quickref/quickref.css
index 444c8ad..257923b 100644
--- a/quickref/quickref.css
+++ b/quickref/quickref.css
@@ -4,10 +4,10 @@ tr {
/* TOC */
/* update these class ids on each save */
p { margin:0; }
-p.c36 { visibility:hidden; }
-p.c25 { margin-left:1em; }
-p.c6 { margin-left:3em; }
-p.c15 { margin-left:2em; }
+p.c22 { visibility:hidden; }
+p.c2 { margin-left:1em; }
+p.c18 { margin-left:3em; }
+p.c27 { margin-left:2em; }
/* heading cells */
tr:first-child {
font-weight:bold;
+
-
+
:
Journal Format
@@ -168,7 +186,7 @@ Legend
Things in
-
+
[ ]
are
@@ -183,77 +201,77 @@ Some notes in the Ledger column are common to all.
+
-
-
-
-
-
-
-
-
-
-http://ledger-cli.org/3.0/doc/ledger3.html#Journal-Format
-
-
-
-
-
-
-http://ricostacruz.com/cheatsheets/ledger.html
+
+
-
+
-
+
+
+
+
+http://ledger-cli.org/3.0/doc/ledger3.html#Journal-Format
+
+
+
+
+
+
+http://ricostacruz.com/cheatsheets/ledger.html
+
+
+
-
-
+
-
-
+
+
http://furius.ca/beancount/doc/syntax
-
+
-
-
+
+
http://furius.ca/beancount/doc/cheatsheet
-
-
+
+
-
+
-
Basic example
-
+
-
2016/1/1 set opening balance
@@ -269,13 +287,13 @@ Basic example
-
+
Comments, directives, and/or transactions in any order
-
+
-
2016/1/1 set opening balance
@@ -287,9 +305,9 @@ Comments, directives, and/or transactions in any order
assets:checking
-
+
2016-01-01 open Assets:Checking
@@ -305,21 +323,21 @@ Comments, directives, and/or transactions in any order
Assets:Checking
-
+
All referenced accounts must have an open directive
-
-
+
+
-
+
-
Comments
-
+
-
# comment
% comment
@@ -327,23 +345,23 @@ Comments
* comment and org-mode outline node
-
+
Non-comment lines may end with a comment
Indented comments are attached to the preceding transaction or posting
-
+
-
# comment
* comment and org-mode outline node
-
+
Any unrecognised line is also a comment
@@ -354,68 +372,68 @@ Any unrecognised line is also a comment
-
-
+
+
-
+
-
Basic transactions
-
+
-
ACCOUNT AMOUNT
ACCOUNT [AMOUNT]
-
+
A transaction contains any number of indented postings (usually two), whose amounts must sum to zero
At least two spaces required between account and amount
The final amount is optional
-
+
-
ACCOUNT AMOUNT
ACCOUNT [AMOUNT]
-
+
Same
-
+
ACCOUNT AMOUNT
ACCOUNT [AMOUNT]
-
+
DESCRIPTION must be in double quotes, can be multiline
No need for two spaces between account and amount
-
-
+
+
-
+
-
Dates
-
+
-
YYYY/MM/DD
YYYY.MM.DD
@@ -424,15 +442,15 @@ MM/DD
MM.DD
-
+
Other formats specified with
-
+
--input-date-format
-
+
-
YYYY/MM/DD
YYYY.MM.DD
@@ -441,9 +459,9 @@ MM/DD
MM.DD
-
+
YYYY/MM/DD
YYYY.MM.DD
@@ -452,21 +470,21 @@ YYYY.MM.DD
-
+
Only YYYY-MM-DD with 8 digits is officially supported
-
-
-
+
+
-
+
-
+
Account names
-
+
-
Revenues:Salary
@@ -474,15 +492,15 @@ liabilities:credit card:CITI 1234
other assets:house
-
+
Account names begin with a letter
May contain single spaces
May contain subaccounts separated by :
-
+
-
@@ -490,13 +508,13 @@ TOPACCT[:SUBACCT[:...]]
-
+
Same
-
+
Income:Salary
@@ -504,25 +522,25 @@ Liabilities:CreditCard:CITI-1234
Assets:House
-
+
Top level account must be one of Assets, Liabilities, Equity, Income, Expenses
Each subaccount must be capitalised
Letters, digits and hyphen are allowed (no spaces)
-
+
-
-
-
+
+
-
+
-
+
Amounts
-
+
-
COMMODITY QUANTITY
QUANTITY COMMODITY
@@ -536,30 +554,30 @@ $10.00
-
+
COMMODITY is a symbol, word or phrase; if it contains spaces or numbers, it must be in double quotes
It can be on the left or right, with or without a separating space
QUANTITY is a number with 0 or more decimal places
Decimal point is
-
+
.
-
+
Digits can be grouped into thousands by
-
+
,
-
+
Amount styles influence the standard display style for each commodity
-
+
-
COMMODITY QUANTITY
QUANTITY COMMODITY
@@ -573,36 +591,36 @@ $10.00
12,34,567.89
-
+
Decimal point is
-
+
.
-
+
or
-
+
,
Any digit grouping can be used, not just thousands
-
+
@@ -616,88 +634,88 @@ QUANTITY COMMODITY
-
+
COMMODITY is all capital letters, on the right, and required
-
+
-
+
Decimal point must be
-
+
.
-
+
Digit group separator
-
+
,
-
+
is allowed and ignored
-
-
-
+
+
-
+
-
+
More transaction
-
+
features
-
+
-
[FLAG] ACCOUNT AMOUNT [PRICE] [=BAL]
...
[FLAG] ACCOUNT [AMOUNT [PRICE] [=BAL]]
-
+
FLAG (aka STATE) is empty, ! or * meaning uncleared, pending or cleared
CODE is any string, in parentheses
DESCRIPTION can be a payee name, narration, or both
-
+
-
[FLAG] ACCOUNT AMOUNT [PRICE] [=BAL]
...
[FLAG] ACCOUNT AMOUNT [PRICE] [=BAL]
-
+
[FLAG] ACCOUNT AMOUNT [PRICES]
...
[FLAG] ACCOUNT AMOUNT [PRICES]
-
+
The txn keyword may be replaced by a FLAG
For just a payee, use "PAYEE" ""
-
+
-
-
-
+
+
-
+
-
+
Prices
-
+
-
@ UNITPRICE
@@ TOTALPRICE
@@ -708,14 +726,14 @@ and/or
[LOTDATE]
-
+
A UNITPRICE or TOTALPRICE also records a market price on this date
A LOTDATE is written in square brackets
-
+
-
@ FIXEDUNITPRICE
@@ FIXEDTOTALPRICE
@@ -726,14 +744,14 @@ and/or
-
+
These do not record market prices
The lot price syntax is ignored
-
+
and/or one of
@ UNITPRICE
@@ -743,22 +761,22 @@ and/or one of
-
+
Lot prices are remembered and form distinct commodities, other prices are not
If there is both a lot price and a regular price, the latter records a market price
-
-
-
+
+
-
+
-
+
Balance assertions
-
+
-
2016-03-10
@@ -766,15 +784,15 @@ Balance assertions
Assets:Cash $-20 = $80
-
+
Asserts the balance in this commodity
in this account, excluding subaccounts
at this point in the parse order
-
+
-
@@ -782,105 +800,105 @@ at this point in the parse order
-
+
Asserts the balance in this commodity
in this account, excluding subaccounts
on this day. Same day events are processed in parse order
-
+
2014-08-09 balance Assets:Cash 562.00 USD
2014-08-09 balance Assets:Cash 210.00 CAD
-
+
Asserts the balance in this commodity
in this account, including subaccounts
at the start of this day
-
-
+
+
-
+
-
Balance assignments
-
+
-
2012-03-10 Adjustment
Assets:Cash = $50
Expenses:Misc
-
+
Sets the posting amount so as to make the balance assertion true. (The other amountless posting allows the transaction to balance)
-
+
-
-
+
-
-
-
+
+
-
+
-
+
Directives
-
-
-
-
+
+
+
-
-
-
+
+
-
+
-
+
account, open
-
+
-
account Revenues:Salary
@@ -894,28 +912,28 @@ account Expenses:Food:Chicken
default
-
+
Gives more error checking with
-
+
--strict
-
+
or
-
+
--pedantic
-
+
Optional subdirectives do more stuff
-
+
-
-
+
2014-05-01 open Assets:Cash USD,CAD
@@ -929,47 +947,47 @@ DATE open ACCOUNT [COMMODITY[,...]] [METHOD]
-
+
Every account posted to needs an open directive with prior date
-
-
-
+
+
-
+
-
+
close
-
-
-
-
+
+
+
-
-
-
+
+
-
+
-
+
commodity
-
+
-
commodity EUR
@@ -980,28 +998,28 @@ commodity $
default
-
+
Gives more error checking with
-
+
--strict
-
+
or
-
+
--pedantic
-
+
Optional subdirectives do more stuff
-
+
-
-
+
[METADATA]
@@ -1012,66 +1030,66 @@ DATE commodity COMMODITY
-
+
Attaches metadata to a commodity
-
-
+
+
+
-
market price
-
+
-
P 2004/06/21 02:18:02 AAPL $32.91
P 2004/06/21 02:18:02 AU $400.00
-
+
Used by -V and -X
Also set by transaction prices
-
+
-
P 2015/8/9 GBP $1.55
-
+
Used by -V
-
+
2014-07-09 price USD 1.08 CAD
-
+
Also set by transaction prices