-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
141 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ bin | |
pkg | ||
dist | ||
html-book | ||
src-book |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/bash | ||
|
||
rm -rf src-book | ||
mkdir src-book | ||
|
||
pushd src | ||
for SRCFILE in $(find . -name "*.md") | ||
do | ||
mdexec -template='```sh | ||
{{.Output}}```' $SRCFILE > ../src-book/$SRCFILE | ||
done | ||
popd | ||
|
||
mdbook build |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Balance | ||
|
||
Run `ledger -f ledger.dat bal` to see a balance report. | ||
|
||
`$ ledger -f ledger.dat bal` | ||
|
||
## Net Worth | ||
|
||
You can show specific accounts by applying a filter, which is case senstive. | ||
For example, let's get our net worth, | ||
run `ledger -f ledger.dat bal Assets Liabilities` | ||
|
||
`$ ledger -f ledger.dat bal Assets Liabilities` | ||
|
||
## By Period | ||
|
||
We can see our balances segmented by a time period. For example, let's see all | ||
our expenses for each month, | ||
run `ledger -f ledger.dat --period Monthly bal Expenses` | ||
|
||
`$ ledger -f ledger.dat --period Monthly bal Expenses` | ||
|
||
## Account Depth | ||
|
||
That's a lot of accounts, let's trim it down to see it summed up to the second | ||
level. Run `ledger -f ledger.dat --period Monthly --depth 2 bal Expenses` | ||
|
||
`$ ledger -f ledger.dat --period Monthly --depth 2 bal Expenses` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Equity | ||
|
||
Some users like to keep ledger files for each year. To aid in creating a new | ||
starting balance for the next file, we can use the `ledger equity` command to | ||
generate the required transaction to have the correct starting balances. | ||
|
||
Let's start 2021, using all transactions upto the end of 2020. As the end date | ||
on the command line is not included, we can use 2021/01/01 as the end date. | ||
|
||
Run `ledger -f ledger.dat equity -e "2021/01/01"` | ||
|
||
`$ ledger -f ledger.dat equity -e "2021/01/01"` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Import | ||
|
||
We can import transactions in CSV format, and product ledger transactions. | ||
Transactions are classified using best-likely match based on payee descriptions. | ||
Matches do not need to be exact matches, it's based on probablility determined | ||
by learning from existing transactions. The more existing transactions in your | ||
ledger file, the better the matches will be. | ||
|
||
## Example | ||
|
||
Example transactions from your credit card csv download. | ||
|
||
`$ cat transactions.csv` | ||
|
||
Let's run our import, making sure to specify the correct date-format to match | ||
the CSV file. | ||
|
||
Run `ledger -f ledger.dat --date-format "01/02/06" import MasterCard transactions.csv` | ||
|
||
`$ ledger -f ledger.dat --date-format "01/02/06" import MasterCard transactions.csv` | ||
|
||
These are not written to our ledger file, just displayed. Once we are satisfied | ||
with the transactions we can write them to our ledger file by | ||
running `ledger -f ledger.dat --date-format "01/02/06" import MasterCard transactions.csv >> ledger.dat` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
|
||
You can print your ledger file in a consistent format. Useful if you want all | ||
transactions to be in a consistent format and your file to always be ordered by | ||
date. | ||
|
||
Run `ledger -f ledger.dat print` | ||
|
||
`$ ledger -f ledger.dat print` | ||
|
||
You can also use this if your splitting off transactions into separate files by | ||
date range, or account. | ||
|
||
All 2020 transactions for example `ledger -f ledger.dat -b "2020/01/01" -e "2021/01/01" print` | ||
|
||
`$ ledger -f ledger.dat -b "2020/01/01" -e "2021/01/01" print` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Register | ||
|
||
Run `ledger -f ledger.dat reg` to see all transactions in register format. | ||
Since we aren't specifying a specific account, we will get all postings for | ||
all transactions and the running total will sum to zero, as all transactions | ||
balance. | ||
|
||
`$ ledger -f ledger.dat reg` | ||
|
||
## Payee | ||
|
||
Let's see how much money we've spend at the "Grocery Store" each month. Also, | ||
to keep from seeing every posting, we are going to specify that we only want to | ||
see postings in the "Expenses" accounts. This will allow us to easily see a | ||
running total in the last column. | ||
|
||
Run `ledger -f ledger.dat reg --payee "Grocery Store" --period Monthly Expenses` | ||
|
||
`$ ledger -f ledger.dat reg --payee "Grocery Store" --period Monthly Expenses` | ||
|
||
## Accounts | ||
|
||
Let's track down all the times we used our Credit Card. | ||
|
||
Run `ledger -f ledger.dat reg MasterCard` | ||
|
||
`$ ledger -f ledger.dat reg MasterCard` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Stats | ||
|
||
A nice little summary of various ledger stats is avaible. | ||
|
||
Run `ledger -f ledger.dat stats` | ||
|
||
`$ ledger -f ledger.dat stats` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Transaction Date,Description,Amount | ||
02/12/21,Dominoes Pizza HOUSTON TX,12.34 | ||
02/23/21,Dominoes Pizza PEARLAND TX,14.34 | ||
02/02/21,Half Price Books AUSTIN TX,5.24 |