penny-0.24.0.0: doc/man/penny-examples.7
.TH penny-examples 7
.SH NAME
penny-examples - more examples of Penny usage
.SH DESCRIPTION
This page contains more examples of the use of
.BR penny (1).
At first you will want to read
.BR penny-basics (1)
as there are also many useful examples there.
.SH SHOWING DIFFERENT FIELDS
Each posting has many characteristics, called
.BR fields .
For example, a posting has an account, and perhaps a payee and a
flag. Only some fields are shown in the
.B postings
report by default;
.BR penny (1)
tells you which ones these are, as well as the additional fields you
can show. To show additional fields, use the --show option. For
instance, showing the line numbers of a posting can be handy if you
want to track the postings down in your ledger:
.EX
penny --account assets:checking postings \\
--show lineNum starter.pny
.EE
This adds the line number to each posting. As you can see if you try
it out, the option does not remove any fields. If you want to start
from a clean slate, try the
.I --hide-all
option.
The width of the report adjusts automatically to accomodate the fields
you want, while fitting them to the width of your screen. Most fields
are simply as wide as they need to be to show their information;
however, the
.I payee
and
.I account
fields will wrap to multiple lines or squeeze themselves smaller by
eliminating letters (respectively) in order to help the report fit in
the width of your screen.
.SH FITERING BASED ON SIBLINGS
Each transaction has at least two postings. The postings in a single
transaction are called
.IR siblings .
When
.I penny
first runs, it splits each transaction into postings. Then it
generally deals with each posting independently. However,
.I penny
"remembers" which siblings each posting has. You can then use a
posting's siblings as criteria when you are building a filter
expression.
For example, you want to see all the activity in your checking
account. First you try this:
.EX
penny --account assets:checking postings starter.pny
.EE
This tells you each time your checking account is debited or
credited--which is quite useful. But maybe you want to know what
expenses you are paying for out of your checking account. The report
above is not too useful for that as the account is always the same:
.IR Assets:Checking .
What you want to see is the sibling postings each time there is
activity in your checking account. Try this:
.EX
penny --s-account assets:checking postings starter.pny
.EE
This works by selecting each posting that has a sibling posting with
the account
.IR Assets:Checking .
All postings are included, even those that are deposits, like
those from
.IR Income:Salary .
If you only want to see sibling postings that are also in an Expenses
account:
.EX
penny --s-account assets:checking \\
--and --account expenses postings starter.pny
.EE
Alternatively, you can see each posting that has a sibling posting
that is in the Assets:Checking account and where the posting itself is
a debit:
.EX
penny --s-account assets:checking \\
--and --debit postings starter.pny
.EE
.SH SEE ALSO
.BR penny (1),
.BR penny-suite (7)