pta — plain text
The Plain Text Accounting program reads bookkeeping journals that
users are expected to create and maintain with arbitrary text editors and
writes account lists, balances, and cost center assessments to standard
output. All input files are
files, using strings of one or more space characters as field separators.
Blank lines and lines starting with hash characters (‘#’) are
ignored and can be used for comments.
To familiarize themselves with the terminology
pta, new users are invited to read
In the following, terms defined in the glossary are
when first used.
If none of the options
The options are as follows:
- Print account lists. For each account, the account
number, the account title, and the account type are printed, followed by a
table of account entries in chronological order, one per line. From left
to right, the table columns contain the date, the booking identifier, the
contra account, the debit amount, the credit amount, the running total,
and the text string. The account balance can be found in the running total
column of the last line of the table.
If an account contains at least one
subaccount, all entries associated with any subaccount
are omitted from the table. Instead, the list of all entries that are
not associated with any subaccount is followed by one line for each
subaccount, containing only the balance of the subaccount, the running
total of the account, and the title of the subaccount, but omitting
dates, booking ids, contra accounts, and amounts of individual entries
in the subaccount. This is intended to make the account list more
readable and more informative.
- Print the
sheet. Each line in the table represents one account.
From left to right, the columns are account number, account balance
(debit), account balance (credit), and account title. The balance sheet is
followed by a listing of statistical accounts as defined in
- Print the accounts and balances for each cost center.
For each cost center, all related account entries are printed, grouped by
accounts, followed by a balance sheet for the cost center.
- In standard output, use German instead of English terms. There are no
plans to fully internationalize
pta. This options
is only intended to make the output look more consistent with
using the German language for text strings.
- Does not produce any output. This option can be used to only check for
and losses generated by financial investments. This includes both realized
and unrealized profits without distinguishing the two kinds; to see
realized profits and losses only, look at account lists
instead. From left to right, the columns of the tables are the date, the
booking identifier, the individual amount of a profit or revenue (without
a sign) or of a loss or expense (with a minus sign), the relative size of
the amount in percent of the current value of the asset, the current value
of the asset before the respective event, the relative profit or loss from
the event per year, the name of the cost center, and a
If some units of the investment were already owned at the
beginning of the accounting period, the first line of the table contains
the book value of the asset at the beginning of the accounting period
instead of the current value before the event, such that the first line
of the table informs about the unrealized profit accumulated during
earlier accounting periods.
Whenever the journal contains lines quoting the current price
of the asset, a line appears in the profit table giving the unrealized
profit or loss resulting from the price change since the previous change
in the number of units owned, or since the beginning of the accounting
period, whichever is later. Such unrealized profits or losses do not
change the book value of the asset.
The profit table does not contain lines for purchases and
sells because these are considered to be executed at the current price;
by definition, they do not generate profits or losses but only realize
them. There are often lines listing surcharges and fees related to
purchases and sells, though.
In lines listing revenues like interest or
dividends and costs like surcharges and fees, the text string is the
original text string from the respective
The profit table ends with a line summing up the total profit
or loss during the current accounting period. Lines that do not
contribute to this sum because they are related to previous accounting
period rather than to the current one or because they are included in
later lines are marked with double trailing dashes (‘--’).
On this final line, the column for the current value of the asset
contains the average market value of the investment held during the
accounting period, and the two columns for the relative profit or loss
are calculated in relation to this average.
- Print subaccount lists. For each subaccount, the account
naumber, account name, account type, and subaccount name are printed,
followed by a table table of account entries as documented for the
- account definition list, see
- example account list with English account titles
- example account list with German account titles
- main input file, see
- example input file
pta utility exits 0 on success,
and >0 if an error occurs.
pta has the following
- All amounts are expected to be expressed in the same currency. Currency
conversion is not yet supported. Any one currency can be used, but it
cannot be specified which currency that is.
- In the balance sheet, all accounts are listed individually. Grouping of
accounts is not yet supported.
- Currently, the annual financial statement can only be generated in the
form of a balance sheet. Generating an annual financial statement in the
form of a statement on the excess of receipts over expenses is not yet
- Custom business assessments are not yet supported.
- Cost centers can only be regarded individually. Grouping of cost centers
is not yet supported.
- Only a single level of subaccounts is supported. Subaccounts can not yet
- Automatically splitting journal entries that include tax into three
account entries (gross amount, net amount, and tax) is not yet
- Bookkeeping can only be done for one single accounting period at a time,
typically for one year. Comparing and aggregating data of multiple
accounting periods is not yet supported.