start converting the quickref to separate files
An experimental plan for easier maintenance. There will be one linear quickref-NAME.md file per ledger-like, with similar headings and content across all quickref files. A script will take the sections and tabulate them nicely to give a layout like the current page. And perhaps there'll be some javascript to show/hide each format.
This commit is contained in:
4
Makefile
4
Makefile
@@ -1,9 +1,9 @@
|
||||
all: html
|
||||
|
||||
# generate html from all md files
|
||||
html: $(patsubst %.md,%.html,$(wildcard *.md)) Makefile
|
||||
html: $(patsubst %.md,%.html,$(wildcard *.md quickref/*.md)) Makefile
|
||||
|
||||
PANDOC = pandoc
|
||||
PANDOC=pandoc -f markdown+autolink_bare_uris
|
||||
|
||||
# generate html from a md file
|
||||
%.html: %.md index.tmpl
|
||||
|
||||
142
quickref/quickref-beancount.html
Normal file
142
quickref/quickref-beancount.html
Normal file
@@ -0,0 +1,142 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
||||
<!-- Basic Page Needs
|
||||
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
|
||||
<meta charset="utf-8">
|
||||
<title>Plain Text Accounting, a guide to Ledger and friends</title>
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
|
||||
<!-- Mobile Specific Metas
|
||||
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<!-- FONT
|
||||
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
|
||||
<link href="//fonts.googleapis.com/css?family=Raleway:400,300,600" rel="stylesheet" type="text/css">
|
||||
|
||||
<!-- CSS
|
||||
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
|
||||
<link rel="stylesheet" href="css/normalize.css">
|
||||
<link rel="stylesheet" href="css/skeleton.css">
|
||||
<link rel="stylesheet" href="css/site.css">
|
||||
|
||||
<!-- Favicon
|
||||
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
|
||||
<link rel="icon" type="image/png" href="images/favicon.png">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Primary Page Layout
|
||||
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
|
||||
<div class="container">
|
||||
|
||||
<h1 id="beancount">Beancount</h1>
|
||||
<p><a href="http://furius.ca/beancount/doc/syntax" class="uri">http://furius.ca/beancount/doc/syntax</a><br />
|
||||
<a href="http://furius.ca/beancount/doc/cheatsheet" class="uri">http://furius.ca/beancount/doc/cheatsheet</a></p>
|
||||
<h2 id="basic-example">Basic example</h2>
|
||||
<pre><code>; a comment
|
||||
|
||||
2016-01-01 open Assets:Checking
|
||||
2016-01-01 open Equity:Opening-Balances
|
||||
2016-01-01 open Expenses:Groceries
|
||||
|
||||
2016-01-01 txn "set opening balance"
|
||||
Assets:Checking 500.00 USD
|
||||
Equity:Opening-Balances
|
||||
|
||||
2016-01-05 txn "farmer's market"
|
||||
Expenses:Groceries 50 USD
|
||||
Assets:Checking</code></pre>
|
||||
<p>All referenced accounts must have an open directive.</p>
|
||||
<h2 id="comments">Comments</h2>
|
||||
<pre><code>; comment</code></pre>
|
||||
<p>Any unrecognised line is also a comment</p>
|
||||
<h2 id="basic-transactions">Basic transactions</h2>
|
||||
<pre><code>DATE txn [["PAYEE"] "DESCRIPTION"]
|
||||
ACCOUNT AMOUNT
|
||||
ACCOUNT [AMOUNT]</code></pre>
|
||||
<p>DESCRIPTION must be in double quotes, can be multiline. No need for two spaces between account and amount.</p>
|
||||
<h2 id="dates">Dates</h2>
|
||||
<pre><code>YYYY-MM-DD
|
||||
YYYY/MM/DD
|
||||
YYYY.MM.DD</code></pre>
|
||||
<p>Only YYYY-MM-DD with 8 digits is officially supported.</p>
|
||||
<h2 id="account-names">Account names</h2>
|
||||
<pre><code>TOPACCT[:SUBACCT[:...]]
|
||||
|
||||
Income:Salary
|
||||
Liabilities:CreditCard:CITI-1234
|
||||
Assets:House</code></pre>
|
||||
<p>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).</p>
|
||||
<h2 id="amounts">Amounts</h2>
|
||||
<pre><code>QUANTITY COMMODITY
|
||||
|
||||
10USD
|
||||
1000.0001 USD</code></pre>
|
||||
<p>COMMODITY is all capital letters, on the right, and required . Decimal point is . (period). Digit group separator , (comma) is allowed and ignored.</p>
|
||||
<h2 id="more-transaction-features">More transaction features</h2>
|
||||
<pre><code>DATE [txn|FLAG] [["PAYEE"] "DESCRIPTION"]
|
||||
[FLAG] ACCOUNT AMOUNT [PRICE]
|
||||
...
|
||||
[FLAG] ACCOUNT AMOUNT [PRICE]</code></pre>
|
||||
<p>The txn keyword may be replaced by a FLAG. For just a payee, use <code>"PAYEE" ""</code>.</p>
|
||||
<h2 id="prices">Prices</h2>
|
||||
<p><code>{LOTUNITPRICE[ / LOTDATE]}</code> and/or one of <code>@ UNITPRICE</code>, <code>@@ TOTALPRICE</code>.</p>
|
||||
<p>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.</p>
|
||||
<h2 id="balance-assertions">Balance assertions</h2>
|
||||
<pre><code>DATE balance ACCOUNT AMOUNT
|
||||
|
||||
2014-08-09 balance Assets:Cash 562.00 USD
|
||||
2014-08-09 balance Assets:Cash 210.00 CAD</code></pre>
|
||||
<p>Asserts the balance in this commodity, in this account, including subaccounts, at the start of this day.</p>
|
||||
<h2 id="balance-assignments">Balance assignments</h2>
|
||||
<h2 id="directives">Directives</h2>
|
||||
<pre><code>[DATE] KEYWORD ARGS...
|
||||
[SUBDIRECTIVES]
|
||||
|
||||
DATE balance
|
||||
DATE close
|
||||
DATE commodity
|
||||
DATE document
|
||||
DATE event
|
||||
DATE note
|
||||
DATE open
|
||||
DATE pad
|
||||
DATE price
|
||||
DATE txn
|
||||
include
|
||||
option
|
||||
plugin
|
||||
poptag
|
||||
pushtag</code></pre>
|
||||
<h2 id="account-open">account, open</h2>
|
||||
<pre><code>DATE open ACCOUNT [COMMODITY[,...]] [METHOD]
|
||||
|
||||
2014-05-01 open Assets:Cash USD,CAD</code></pre>
|
||||
<p>Every account posted to needs an open directive with prior date.</p>
|
||||
<h2 id="close">close</h2>
|
||||
<pre><code>DATE close ACCOUNT</code></pre>
|
||||
<h2 id="commodity">commodity</h2>
|
||||
<pre><code>DATE commodity COMMODITY
|
||||
[METADATA]
|
||||
|
||||
1867-01-01 commodity CAD
|
||||
name: "Canadian Dollar"
|
||||
asset-class: "cash"</code></pre>
|
||||
<p>Attaches metadata to a commodity.</p>
|
||||
<h2 id="market-price">market price</h2>
|
||||
<pre><code>DATE price COMMODITY AMOUNT
|
||||
|
||||
2014-07-09 price USD 1.08 CAD</code></pre>
|
||||
<p>Also set by transaction prices.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- End Document
|
||||
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
|
||||
</body>
|
||||
</html>
|
||||
153
quickref/quickref-beancount.md
Normal file
153
quickref/quickref-beancount.md
Normal file
@@ -0,0 +1,153 @@
|
||||
# Beancount
|
||||
|
||||
http://furius.ca/beancount/doc/syntax
|
||||
http://furius.ca/beancount/doc/cheatsheet
|
||||
|
||||
## Basic example
|
||||
|
||||
; a comment
|
||||
|
||||
2016-01-01 open Assets:Checking
|
||||
2016-01-01 open Equity:Opening-Balances
|
||||
2016-01-01 open Expenses:Groceries
|
||||
|
||||
2016-01-01 txn "set opening balance"
|
||||
Assets:Checking 500.00 USD
|
||||
Equity:Opening-Balances
|
||||
|
||||
2016-01-05 txn "farmer's market"
|
||||
Expenses:Groceries 50 USD
|
||||
Assets:Checking
|
||||
|
||||
All referenced accounts must have an open directive.
|
||||
|
||||
## Comments
|
||||
|
||||
; comment
|
||||
|
||||
Any unrecognised line is also a comment
|
||||
|
||||
## Basic transactions
|
||||
|
||||
DATE txn [["PAYEE"] "DESCRIPTION"]
|
||||
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
|
||||
YYYY.MM.DD
|
||||
|
||||
Only YYYY-MM-DD with 8 digits is officially supported.
|
||||
|
||||
## Account names
|
||||
|
||||
TOPACCT[:SUBACCT[:...]]
|
||||
|
||||
Income:Salary
|
||||
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
|
||||
|
||||
QUANTITY COMMODITY
|
||||
|
||||
10USD
|
||||
1000.0001 USD
|
||||
|
||||
COMMODITY is all capital letters, on the right, and required .
|
||||
Decimal point is . (period).
|
||||
Digit group separator , (comma) is allowed and ignored.
|
||||
|
||||
## More transaction features
|
||||
|
||||
DATE [txn|FLAG] [["PAYEE"] "DESCRIPTION"]
|
||||
[FLAG] ACCOUNT AMOUNT [PRICE]
|
||||
...
|
||||
[FLAG] ACCOUNT AMOUNT [PRICE]
|
||||
|
||||
The txn keyword may be replaced by a FLAG.
|
||||
For just a payee, use `"PAYEE" ""`.
|
||||
|
||||
## Prices
|
||||
|
||||
`{LOTUNITPRICE[ / LOTDATE]}`
|
||||
and/or one of
|
||||
`@ UNITPRICE`,
|
||||
`@@ TOTALPRICE`.
|
||||
|
||||
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
|
||||
|
||||
DATE balance ACCOUNT AMOUNT
|
||||
|
||||
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
|
||||
|
||||
## Directives
|
||||
|
||||
[DATE] KEYWORD ARGS...
|
||||
[SUBDIRECTIVES]
|
||||
|
||||
DATE balance
|
||||
DATE close
|
||||
DATE commodity
|
||||
DATE document
|
||||
DATE event
|
||||
DATE note
|
||||
DATE open
|
||||
DATE pad
|
||||
DATE price
|
||||
DATE txn
|
||||
include
|
||||
option
|
||||
plugin
|
||||
poptag
|
||||
pushtag
|
||||
|
||||
## account, open
|
||||
|
||||
DATE open ACCOUNT [COMMODITY[,...]] [METHOD]
|
||||
|
||||
2014-05-01 open Assets:Cash USD,CAD
|
||||
|
||||
Every account posted to needs an open directive with prior date.
|
||||
|
||||
## close
|
||||
|
||||
DATE close ACCOUNT
|
||||
|
||||
## commodity
|
||||
|
||||
DATE commodity COMMODITY
|
||||
[METADATA]
|
||||
|
||||
1867-01-01 commodity CAD
|
||||
name: "Canadian Dollar"
|
||||
asset-class: "cash"
|
||||
|
||||
Attaches metadata to a commodity.
|
||||
|
||||
## market price
|
||||
|
||||
DATE price COMMODITY AMOUNT
|
||||
|
||||
2014-07-09 price USD 1.08 CAD
|
||||
|
||||
Also set by transaction prices.
|
||||
117
quickref/quickref-hledger.html
Normal file
117
quickref/quickref-hledger.html
Normal file
@@ -0,0 +1,117 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
||||
<!-- Basic Page Needs
|
||||
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
|
||||
<meta charset="utf-8">
|
||||
<title>Plain Text Accounting, a guide to Ledger and friends</title>
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
|
||||
<!-- Mobile Specific Metas
|
||||
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<!-- FONT
|
||||
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
|
||||
<link href="//fonts.googleapis.com/css?family=Raleway:400,300,600" rel="stylesheet" type="text/css">
|
||||
|
||||
<!-- CSS
|
||||
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
|
||||
<link rel="stylesheet" href="css/normalize.css">
|
||||
<link rel="stylesheet" href="css/skeleton.css">
|
||||
<link rel="stylesheet" href="css/site.css">
|
||||
|
||||
<!-- Favicon
|
||||
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
|
||||
<link rel="icon" type="image/png" href="images/favicon.png">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Primary Page Layout
|
||||
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
|
||||
<div class="container">
|
||||
|
||||
<h1 id="hledger">hledger</h1>
|
||||
<p><a href="http://hledger.org/journal.html" class="uri">http://hledger.org/journal.html</a></p>
|
||||
<h2 id="basic-example">Basic example</h2>
|
||||
<pre><code>; a comment
|
||||
|
||||
2016/1/1 set opening balance
|
||||
assets:checking $500.00
|
||||
equity:opening balances
|
||||
|
||||
2016/1/5 farmer's market
|
||||
expenses:groceries $50.00
|
||||
assets:checking</code></pre>
|
||||
<h2 id="comments">Comments</h2>
|
||||
<pre><code>; comment
|
||||
# comment
|
||||
* comment and org-mode outline node</code></pre>
|
||||
<h2 id="basic-transactions">Basic transactions</h2>
|
||||
<pre><code>DATE [DESCRIPTION]
|
||||
ACCOUNT AMOUNT
|
||||
ACCOUNT [AMOUNT]</code></pre>
|
||||
<p>Non-comment lines may end with a comment. Indented comments are attached to the preceding transaction or posting.</p>
|
||||
<h2 id="dates">Dates</h2>
|
||||
<pre><code>YYYY-MM-DD
|
||||
YYYY/MM/DD
|
||||
YYYY.MM.DD
|
||||
MM-DD
|
||||
MM/DD
|
||||
MM.DD</code></pre>
|
||||
<h2 id="account-names">Account names</h2>
|
||||
<pre><code>TOPACCT[:SUBACCT[:...]]
|
||||
|
||||
Revenues:Salary
|
||||
liabilities:credit card:CITI 1234
|
||||
other assets:house</code></pre>
|
||||
<p>Account names begin with a letter. May contain single spaces. May contain subaccounts separated by : (colon).</p>
|
||||
<h2 id="amounts">Amounts</h2>
|
||||
<p>One of <code>COMMODITY QUANTITY</code>, <code>QUANTITY COMMODITY</code>, <code>QUANTITY</code>.</p>
|
||||
<pre><code>10
|
||||
$10.00
|
||||
1,000.0001 USD
|
||||
10 "prepaid classes"
|
||||
1.000.000,01
|
||||
12,34,567.89</code></pre>
|
||||
<p>Decimal point is . or , (period or comma). Digit group separator is , or . (the one not used for decimal point). Any digit grouping can be used, not just thousands.</p>
|
||||
<h2 id="more-transaction-features">More transaction features</h2>
|
||||
<pre><code>DATE [FLAG] [(CODE)] DESCRIPTION
|
||||
[FLAG] ACCOUNT AMOUNT [PRICE] [=BAL]
|
||||
...
|
||||
[FLAG] ACCOUNT AMOUNT [PRICE] [=BAL]</code></pre>
|
||||
<h2 id="prices">Prices</h2>
|
||||
<p>One of <code>@ FIXEDUNITPRICE</code> <code>@@ FIXEDTOTALPRICE</code> and/or <code>{=FIXEDLOTUNITPRICE}</code>.</p>
|
||||
<p>These do not record market prices. The lot price syntax is ignored.</p>
|
||||
<h2 id="balance-assertions">Balance assertions</h2>
|
||||
<p><code>= AMOUNT</code> after posting amount & price.</p>
|
||||
<p>Asserts the balance in this commodity, in this account, excluding subaccounts, on this day. Same day events are processed in parse order.</p>
|
||||
<h2 id="balance-assignments">Balance assignments</h2>
|
||||
<h2 id="directives">Directives</h2>
|
||||
<pre><code>KEYWORD ARGS...
|
||||
|
||||
account (alias for apply)
|
||||
alias
|
||||
apply
|
||||
comment
|
||||
D
|
||||
end
|
||||
include</code></pre>
|
||||
<h2 id="account-open">account, open</h2>
|
||||
<h2 id="close">close</h2>
|
||||
<h2 id="commodity">commodity</h2>
|
||||
<h2 id="market-price">market price</h2>
|
||||
<pre><code>P DATE [TIME] COMMODITY UNITPRICE
|
||||
|
||||
P 2015/8/9 GBP $1.55</code></pre>
|
||||
<p>Used by -V. A time is ignored.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- End Document
|
||||
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
|
||||
</body>
|
||||
</html>
|
||||
124
quickref/quickref-hledger.md
Normal file
124
quickref/quickref-hledger.md
Normal file
@@ -0,0 +1,124 @@
|
||||
# hledger
|
||||
|
||||
http://hledger.org/journal.html
|
||||
|
||||
## Basic example
|
||||
|
||||
; a comment
|
||||
|
||||
2016/1/1 set opening balance
|
||||
assets:checking $500.00
|
||||
equity:opening balances
|
||||
|
||||
2016/1/5 farmer's market
|
||||
expenses:groceries $50.00
|
||||
assets:checking
|
||||
|
||||
## Comments
|
||||
|
||||
; comment
|
||||
# comment
|
||||
* comment and org-mode outline node
|
||||
|
||||
## Basic transactions
|
||||
|
||||
DATE [DESCRIPTION]
|
||||
ACCOUNT AMOUNT
|
||||
ACCOUNT [AMOUNT]
|
||||
|
||||
Non-comment lines may end with a comment.
|
||||
Indented comments are attached to the preceding transaction or posting.
|
||||
|
||||
## Dates
|
||||
|
||||
YYYY-MM-DD
|
||||
YYYY/MM/DD
|
||||
YYYY.MM.DD
|
||||
MM-DD
|
||||
MM/DD
|
||||
MM.DD
|
||||
|
||||
## Account names
|
||||
|
||||
TOPACCT[:SUBACCT[:...]]
|
||||
|
||||
Revenues:Salary
|
||||
liabilities:credit card:CITI 1234
|
||||
other assets:house
|
||||
|
||||
Account names begin with a letter.
|
||||
May contain single spaces.
|
||||
May contain subaccounts separated by : (colon).
|
||||
|
||||
## Amounts
|
||||
|
||||
One of
|
||||
`COMMODITY QUANTITY`,
|
||||
`QUANTITY COMMODITY`,
|
||||
`QUANTITY`.
|
||||
|
||||
10
|
||||
$10.00
|
||||
1,000.0001 USD
|
||||
10 "prepaid classes"
|
||||
1.000.000,01
|
||||
12,34,567.89
|
||||
|
||||
Decimal point is . or , (period or comma).
|
||||
Digit group separator is , or . (the one not used for decimal point).
|
||||
Any digit grouping can be used, not just thousands.
|
||||
|
||||
## More transaction features
|
||||
|
||||
DATE [FLAG] [(CODE)] DESCRIPTION
|
||||
[FLAG] ACCOUNT AMOUNT [PRICE] [=BAL]
|
||||
...
|
||||
[FLAG] ACCOUNT AMOUNT [PRICE] [=BAL]
|
||||
|
||||
## Prices
|
||||
|
||||
One of
|
||||
`@ FIXEDUNITPRICE`
|
||||
`@@ FIXEDTOTALPRICE`
|
||||
and/or
|
||||
`{=FIXEDLOTUNITPRICE}`.
|
||||
|
||||
These do not record market prices.
|
||||
The lot price syntax is ignored.
|
||||
|
||||
## Balance assertions
|
||||
|
||||
`= AMOUNT` after posting amount & price.
|
||||
|
||||
Asserts the balance in this commodity,
|
||||
in this account, excluding subaccounts,
|
||||
on this day. Same day events are processed in parse order.
|
||||
|
||||
## Balance assignments
|
||||
|
||||
## Directives
|
||||
|
||||
KEYWORD ARGS...
|
||||
|
||||
account (alias for apply)
|
||||
alias
|
||||
apply
|
||||
comment
|
||||
D
|
||||
end
|
||||
include
|
||||
|
||||
## account, open
|
||||
|
||||
## close
|
||||
|
||||
## commodity
|
||||
|
||||
## market price
|
||||
|
||||
P DATE [TIME] COMMODITY UNITPRICE
|
||||
|
||||
P 2015/8/9 GBP $1.55
|
||||
|
||||
Used by -V.
|
||||
A time is ignored.
|
||||
174
quickref/quickref-ledger.html
Normal file
174
quickref/quickref-ledger.html
Normal file
@@ -0,0 +1,174 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
||||
<!-- Basic Page Needs
|
||||
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
|
||||
<meta charset="utf-8">
|
||||
<title>Plain Text Accounting, a guide to Ledger and friends</title>
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
|
||||
<!-- Mobile Specific Metas
|
||||
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<!-- FONT
|
||||
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
|
||||
<link href="//fonts.googleapis.com/css?family=Raleway:400,300,600" rel="stylesheet" type="text/css">
|
||||
|
||||
<!-- CSS
|
||||
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
|
||||
<link rel="stylesheet" href="css/normalize.css">
|
||||
<link rel="stylesheet" href="css/skeleton.css">
|
||||
<link rel="stylesheet" href="css/site.css">
|
||||
|
||||
<!-- Favicon
|
||||
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
|
||||
<link rel="icon" type="image/png" href="images/favicon.png">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Primary Page Layout
|
||||
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
|
||||
<div class="container">
|
||||
|
||||
<h1 id="ledger">Ledger</h1>
|
||||
<p><a href="http://ledger-cli.org/3.0/doc/ledger3.html#Journal-Format" class="uri">http://ledger-cli.org/3.0/doc/ledger3.html#Journal-Format</a><br />
|
||||
<a href="http://ricostacruz.com/cheatsheets/ledger.html" class="uri">http://ricostacruz.com/cheatsheets/ledger.html</a></p>
|
||||
<h2 id="basic-example">Basic example</h2>
|
||||
<pre><code>; a comment
|
||||
|
||||
2016/1/1 set opening balance
|
||||
assets:checking $500.00
|
||||
equity:opening balances
|
||||
|
||||
2016/1/5 farmer's market
|
||||
expenses:groceries $50.00
|
||||
Assets:checking</code></pre>
|
||||
<p>Comments, directives, and/or transactions in any order.</p>
|
||||
<h2 id="comments">Comments</h2>
|
||||
<pre><code>; comment
|
||||
# comment
|
||||
% comment
|
||||
| comment
|
||||
* comment and org-mode outline node</code></pre>
|
||||
<p>Non-comment lines may end with a comment. Indented comments are attached to the preceding transaction or posting.</p>
|
||||
<h2 id="basic-transactions">Basic transactions</h2>
|
||||
<pre><code>DATE [DESCRIPTION]
|
||||
ACCOUNT AMOUNT
|
||||
ACCOUNT [AMOUNT]</code></pre>
|
||||
<p>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. One amount may be omitted.</p>
|
||||
<h2 id="dates">Dates</h2>
|
||||
<pre><code>YYYY-MM-DD
|
||||
YYYY/MM/DD
|
||||
YYYY.MM.DD
|
||||
MM-DD
|
||||
MM/DD
|
||||
MM.DD</code></pre>
|
||||
<p>Other formats allowed if specified with <code>--input-date-format</code>.</p>
|
||||
<h2 id="account-names">Account names</h2>
|
||||
<pre><code>TOPACCT[:SUBACCT[:...]]
|
||||
|
||||
Revenues:Salary
|
||||
liabilities:credit card:CITI 1234
|
||||
other assets:house</code></pre>
|
||||
<p>Account names begin with a letter. May contain single spaces. May contain subaccounts separated by : (colon).</p>
|
||||
<h2 id="amounts">Amounts</h2>
|
||||
<p>One of <code>COMMODITY QUANTITY</code>, <code>QUANTITY COMMODITY</code>, <code>QUANTITY</code>.</p>
|
||||
<pre><code>10
|
||||
$10.00
|
||||
1,000.0001 USD
|
||||
10 "prepaid classes"</code></pre>
|
||||
<p>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 . (period). Digits can be grouped into thousands by , (comma). Amount styles influence the standard display style for each commodity.</p>
|
||||
<h2 id="more-transaction-features">More transaction features</h2>
|
||||
<pre><code>DATE [FLAG] [(CODE)] DESCRIPTION
|
||||
[FLAG] ACCOUNT AMOUNT [PRICE] [=BAL]
|
||||
...
|
||||
[FLAG] ACCOUNT [AMOUNT [PRICE] [=BAL]]</code></pre>
|
||||
<p>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</p>
|
||||
<h2 id="prices">Prices</h2>
|
||||
<p>One of <code>@ UNITPRICE</code>, <code>@@ TOTALPRICE</code> and/or one of <code>{LOTUNITPRICE}</code>, <code>{=FIXEDLOTUNITPRICE}</code> and/or <code>[LOTDATE]</code>.</p>
|
||||
<p>A UNITPRICE or TOTALPRICE also records a market price on this date. A LOTDATE is written in square brackets.</p>
|
||||
<h2 id="balance-assertions">Balance assertions</h2>
|
||||
<p><code>= AMOUNT</code> after posting amount & price.</p>
|
||||
<pre><code>2016-03-10
|
||||
Expenses:Food $20
|
||||
Assets:Cash $-20 = $80</code></pre>
|
||||
<p>Asserts the balance in this commodity, in this account, excluding subaccounts, at this point in the parse order.</p>
|
||||
<h2 id="balance-assignments">Balance assignments</h2>
|
||||
<p><code>= AMOUNT</code> with no preceding/inferred posting amount.</p>
|
||||
<pre><code>2012-03-10 Adjustment
|
||||
Assets:Cash = $50
|
||||
Expenses:Misc </code></pre>
|
||||
<p>Sets the posting amount so as to make the balance assertion true. (The other amountless posting allows the transaction to balance).</p>
|
||||
<h2 id="directives">Directives</h2>
|
||||
<pre><code>KEYWORD ARGS...
|
||||
[SUBDIRECTIVES]
|
||||
|
||||
account
|
||||
|
||||
alias
|
||||
apply
|
||||
assert
|
||||
bucket
|
||||
capture
|
||||
check
|
||||
comment
|
||||
commodity
|
||||
define
|
||||
end
|
||||
expr
|
||||
fixed
|
||||
include
|
||||
P
|
||||
|
||||
payee
|
||||
tag
|
||||
test
|
||||
year
|
||||
|
||||
Timeclock directives:
|
||||
i
|
||||
o
|
||||
b
|
||||
h</code></pre>
|
||||
<h2 id="account-open">account, open</h2>
|
||||
<pre><code>account ACCOUNT
|
||||
[SUBDIRECTIVES]
|
||||
|
||||
account Revenues:Salary
|
||||
account Expenses:Food:Chicken
|
||||
note chicken food expenses
|
||||
alias food
|
||||
payee ^(KFC|Popeyes)$
|
||||
check commodity == "$"
|
||||
assert commodity == "$"
|
||||
eval print("Hello!")
|
||||
default</code></pre>
|
||||
<p>Gives more error checking with --strict or --pedantic. Optional subdirectives do more stuff.</p>
|
||||
<h2 id="close">close</h2>
|
||||
<h2 id="commodity">commodity</h2>
|
||||
<pre><code>commodity COMMODITY
|
||||
|
||||
commodity EUR
|
||||
commodity $
|
||||
note American Dollars
|
||||
format $1,000.00
|
||||
nomarket
|
||||
default</code></pre>
|
||||
<p>Gives more error checking with --strict or --pedantic. Optional subdirectives do more stuff.</p>
|
||||
<h2 id="market-price">market price</h2>
|
||||
<pre><code>P DATE TIME COMMODITY UNITPRICE
|
||||
|
||||
P 2004/06/21 02:18:02 AAPL $32.91
|
||||
P 2004/06/21 02:18:02 AU $400.00</code></pre>
|
||||
<p>Used by -V and -X. Also set by transaction prices.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- End Document
|
||||
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
|
||||
</body>
|
||||
</html>
|
||||
205
quickref/quickref-ledger.md
Normal file
205
quickref/quickref-ledger.md
Normal file
@@ -0,0 +1,205 @@
|
||||
# Ledger
|
||||
|
||||
http://ledger-cli.org/3.0/doc/ledger3.html#Journal-Format
|
||||
http://ricostacruz.com/cheatsheets/ledger.html
|
||||
|
||||
## Basic example
|
||||
|
||||
; a comment
|
||||
|
||||
2016/1/1 set opening balance
|
||||
assets:checking $500.00
|
||||
equity:opening balances
|
||||
|
||||
2016/1/5 farmer's market
|
||||
expenses:groceries $50.00
|
||||
Assets:checking
|
||||
|
||||
Comments, directives, and/or transactions in any order.
|
||||
|
||||
## Comments
|
||||
|
||||
; comment
|
||||
# comment
|
||||
% comment
|
||||
| comment
|
||||
* comment and org-mode outline node
|
||||
|
||||
Non-comment lines may end with a comment.
|
||||
Indented comments are attached to the preceding transaction or posting.
|
||||
|
||||
## Basic transactions
|
||||
|
||||
DATE [DESCRIPTION]
|
||||
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.
|
||||
One amount may be omitted.
|
||||
|
||||
## Dates
|
||||
|
||||
YYYY-MM-DD
|
||||
YYYY/MM/DD
|
||||
YYYY.MM.DD
|
||||
MM-DD
|
||||
MM/DD
|
||||
MM.DD
|
||||
|
||||
Other formats allowed if specified with `--input-date-format`.
|
||||
|
||||
## Account names
|
||||
|
||||
TOPACCT[:SUBACCT[:...]]
|
||||
|
||||
Revenues:Salary
|
||||
liabilities:credit card:CITI 1234
|
||||
other assets:house
|
||||
|
||||
Account names begin with a letter.
|
||||
May contain single spaces.
|
||||
May contain subaccounts separated by : (colon).
|
||||
|
||||
## Amounts
|
||||
|
||||
One of
|
||||
`COMMODITY QUANTITY`,
|
||||
`QUANTITY COMMODITY`,
|
||||
`QUANTITY`.
|
||||
|
||||
10
|
||||
$10.00
|
||||
1,000.0001 USD
|
||||
10 "prepaid classes"
|
||||
|
||||
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 . (period).
|
||||
Digits can be grouped into thousands by , (comma).
|
||||
Amount styles influence the standard display style for each commodity.
|
||||
|
||||
## More transaction features
|
||||
|
||||
DATE [FLAG] [(CODE)] DESCRIPTION
|
||||
[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
|
||||
|
||||
## Prices
|
||||
|
||||
One of
|
||||
`@ UNITPRICE`,
|
||||
`@@ TOTALPRICE`
|
||||
and/or one of
|
||||
`{LOTUNITPRICE}`,
|
||||
`{=FIXEDLOTUNITPRICE}`
|
||||
and/or
|
||||
`[LOTDATE]`.
|
||||
|
||||
A UNITPRICE or TOTALPRICE also records a market price on this date.
|
||||
A LOTDATE is written in square brackets.
|
||||
|
||||
## Balance assertions
|
||||
|
||||
`= AMOUNT` after posting amount & price.
|
||||
|
||||
2016-03-10
|
||||
Expenses:Food $20
|
||||
Assets:Cash $-20 = $80
|
||||
|
||||
Asserts the balance in this commodity,
|
||||
in this account, excluding subaccounts,
|
||||
at this point in the parse order.
|
||||
|
||||
## Balance assignments
|
||||
|
||||
`= AMOUNT` with no preceding/inferred posting amount.
|
||||
|
||||
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
|
||||
|
||||
KEYWORD ARGS...
|
||||
[SUBDIRECTIVES]
|
||||
|
||||
account
|
||||
|
||||
alias
|
||||
apply
|
||||
assert
|
||||
bucket
|
||||
capture
|
||||
check
|
||||
comment
|
||||
commodity
|
||||
define
|
||||
end
|
||||
expr
|
||||
fixed
|
||||
include
|
||||
P
|
||||
|
||||
payee
|
||||
tag
|
||||
test
|
||||
year
|
||||
|
||||
Timeclock directives:
|
||||
i
|
||||
o
|
||||
b
|
||||
h
|
||||
|
||||
## account, open
|
||||
|
||||
account ACCOUNT
|
||||
[SUBDIRECTIVES]
|
||||
|
||||
account Revenues:Salary
|
||||
account Expenses:Food:Chicken
|
||||
note chicken food expenses
|
||||
alias food
|
||||
payee ^(KFC|Popeyes)$
|
||||
check commodity == "$"
|
||||
assert commodity == "$"
|
||||
eval print("Hello!")
|
||||
default
|
||||
|
||||
Gives more error checking with --strict or --pedantic.
|
||||
Optional subdirectives do more stuff.
|
||||
|
||||
## close
|
||||
|
||||
## commodity
|
||||
|
||||
commodity COMMODITY
|
||||
|
||||
commodity EUR
|
||||
commodity $
|
||||
note American Dollars
|
||||
format $1,000.00
|
||||
nomarket
|
||||
default
|
||||
|
||||
Gives more error checking with --strict or --pedantic.
|
||||
Optional subdirectives do more stuff.
|
||||
|
||||
## market price
|
||||
|
||||
P DATE TIME COMMODITY UNITPRICE
|
||||
|
||||
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.
|
||||
Reference in New Issue
Block a user