# penny: Extensible double-entry accounting system

[ bsd3, console, finance, library ] [ Propose Tags ]

Penny is a double-entry accounting system. It is inspired by, but incompatible with, John Wiegley's Ledger, which is available at http://ledger-cli.org/. Installing this package with cabal install will install the executable program and the necessary libraries.

• Penny is a double-entry accounting system. It uses traditional accounting terminology, such as the terms "Debit" and "Credit". If you need a refresher on the basics of double-entry accounting, pick up a used accounting textbook from your favorite bookseller (they can be had cheaply, for less than ten U.S. dollars including shipping) or check out http://www.principlesofaccounting.com/, a great free online text.

• Penny is based around Penny.Lincoln, a core library to represent transactions and postings and their components, such as their amounts and whether they are debits and credits. You can use Lincoln all by itself even if you don't use the other components of Penny, which you may find handy if you are a Haskell programmer. I wrote Penny because I wanted a precise library to represent my accounting data so I could analyze it programatically and verify its consistency.

• Penny's command line interface and its reports give you great flexibility to filter and sort postings. Each posting within a transaction may have its own flags assigned (e.g. to indicate whether the posting is cleared) and each posting may have infinite "tags" assigned to it, giving you another way to categorize your postings. For instance, you might have vacation related postings in several different accounts, but you can give them all a "vacation" tag.

• You can easily build a program to process downloads of Open Financial Exchange data from your financial institution. Your program will merge new transactions into your ledger automatically.

• Full Unicode support.

• Penny's reports have color baked in from the beginning. You do not have to use color, which is handy if you are sending output to a file or if, well, you just don't like color.

• Penny's reports automatically adjust themselves to the width of your screen. You can easily specify how much or how little data to see with command line options.

• Penny handles multiple commodities (for example, multiple currencies, stocks and bonds, tracking other assets, etc.) in an easy and transparent way that is consistent with double-entry accounting principles. It embraces the philosophy outlined in this tutorial on multiple commodity accounting: http://www.mscs.dal.ca/~selinger/accounting/tutorial.html.

• Penny stores amounts using only integers. This ensures the accuracy of your data, as using floating point values to represent money is a bad idea. Here is one explanation: http://stackoverflow.com/questions/3730019/why-not-use-double-or-float-to-represent-currency. The use of integer arithmetic also makes Penny simpler internally, as there is no need for arbitrary rounding to compensate for the bizarre and inaccurate results that sometimes arise from the use of floating-point values to represent currencies.

• Freely licensed under the MIT license. If you take this code, improve it, lock it up and make it proprietary, and sell it, AWESOME! I haven't lost anything because I still have my code and, what's more, then maybe I can buy your product and not have to maintain this one any more!

• Tested using QuickCheck. The tests are available in the Git repository that also contains the main library. Not everything is tested, but the tests that exist so far have already rooted out some strange corner-case bugs.

• Written in Haskell. Yes, I think Haskell is the best tool ever, but its compiler is not as commonly installed as compilers for C or C++, and non-Haskellers will probably find Penny to be more difficult to install than Ledger, as the latter is written in C++.

• Handling commodities requires that you set up multiple accounts; some might find this cumbersome.

• Young and not well tested yet.

• Runs only on Unix-like operating systems.

• Full Penny functionality is available without a Haskell compiler; you could even use a pre-compiled binary. However, Penny does not read configuration files at runtime; instead, to change the default settings, you will need to have GHC installed so that you can compile a custom binary.

• Can be slow and memory hungry with large data sets. I have a ledger file with about 28,000 lines. On my least capable machine (which has an Intel Core 2 Duo at 1.6 GHz) this takes about 1.4 seconds to parse. Not horrible but not instantaneous either. Generating a report about all these transactions can take about seven seconds and a little less than 300 MB of memory. I have eliminated all the obvious slowness from the code and attempted a rewrite of the parser, which made no difference; other ideas to speed up Penny with large data sets would involve substantial changes and this is not at the top of my list because the program is currently usable with relatively recent hardware.

Unfortunately running "cabal install" will not install the documentation, so you will need to find the downloaded archive (usually in "$HOME.cabalpackageshackage.haskell.orgpenny") and unpack it to see the documentation. You will want to start by reading the README file, which will point you to additional documentation and how to install it if you wish. [Skip to Readme] Versions [faq] 0.24.0.0, 0.26.0.0, 0.28.0.0, 0.30.0.0, 0.30.0.2, 0.32.0.0, 0.32.0.2, 0.32.0.4, 0.32.0.6, 0.32.0.8, 0.32.0.10 action-permutations (==0.0.0.0), anonymous-sums (==0.2.*), base (==4.6.*), bytestring (>=0.10.0.2), cereal (>=0.3.5.2), containers (>=0.4.2.1), either (>=3.4.1), matchers (==0.14.*), multiarg (==0.24.*), ofx (==0.4.*), old-locale (>=1.0.0.5), parsec (>=3.1.3), penny, prednote (==0.18.*), pretty-show (>=1.5), QuickCheck (>=2.5), rainbow (==0.6.*), random (>=1.0.1.1), random-shuffle (==0.0.4), semigroups (>=0.9.2), split (>=0.2.2), text (>=0.11.3.1), time (>=1.4.0.1), transformers (>=0.3.0.0) [details] BSD-3-Clause 2012-2014 Omari Norman. Omari Norman omari@smileystation.com Console, Finance http://www.github.com/massysett/penny omari@smileystation.com head: git clone git://github.com/massysett/penny.git by OmariNorman at Fri Feb 14 02:23:55 UTC 2014 NixOS:0.32.0.10 penny-reconcile, penny-reprint, penny-diff, penny-selloff, penny, penny-gibberish 6383 total (341 in the last 30 days) (no votes yet) [estimated by Bayesian average] λ λ λ Docs available Successful builds reported ## Flags NameDescriptionDefaultType build-gibberish Build the penny-gibberish executable DisabledAutomatic build-penny Build the penny executable EnabledAutomatic build-selloff Build the penny-selloff executable EnabledAutomatic build-diff Build the penny-diff executable EnabledAutomatic build-reprint Build the penny-reprint executable EnabledAutomatic build-reconcile Build the penny-reconcile executable EnabledAutomatic debug turns on some debugging options DisabledAutomatic test enables QuickCheck tests DisabledAutomatic incabal enables imports that only Cabal makes available EnabledAutomatic Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info ## Downloads #### Maintainer's Corner For package maintainers and hackage trustees ## Readme for penny-0.32.0.0 [back to package description] Welcome to Penny, double-entry accounting. Penny's web pages are at: http://massysett.github.com/penny http://hackage.haskell.org/package/penny http://github.com/massysett/penny Versions that contain at least one odd number are development versions. They are not posted to Hackage. I try to keep the master branch in compilable shape. However, development versions may not pass all tests, and in particular they may have out of date or incomplete documentation. Releases consist of code of reasonable quality. All of the groups in their release numbers are even. Penny is licensed under the MIT license, see the LICENSE file. To install the latest release, "cabal install penny" should work. To also build test executables, run "cabal install -ftest penny". That will give you two additional executables: penny-test, which when run will test a bunch of QuickCheck properties, and penny-gibberish, which prints a random, but valid, ledger file. To install the manual pages and the documentation, run "sh install-docs". It will install the manual pages to$PREFIX/share/man and the other documentation to $PREFIX/share/doc/penny. By default$PREFIX is /usr/local; you can change this by editing the install-docs file and changing the "PREFIX" variable.

To remove the manual pages and the documentation, run "sh install-docs remove."

The first thing you will want to look at is the manual page penny-basics(7). Then you will want to examine the starter.pny file in the examples directory, which will show you how to write a ledger file. penny-suite(7) will then direct you to other documentation that may interest you.

Though I do use this program to maintain all my financial records, it is still relatively new and no one but me has tested it. Use at your own risk.

## Dependencies

cabal install will take care of all Haskell dependencies for you; however, there are also at least two C libraries you will need to install as Penny depends on other Haskell libraries that use these C libraries. You will need to make sure you have the "development" package installed if you use many Linux distributions; a few distributors, such as Arch, Slackware, and Gentoo, generally don't ship separate "development" packages so that won't apply to you. The C libraries are:

• pcre - http://www.pcre.org/ - on Debian GNU/Linux systems this package is called libpcre3-dev

• curses - on GNU systems this is known as ncurses, http://www.gnu.org/software/ncurses/ Perhaps other, non-GNU curses implementations will work as well; I do not know. On Debian GNU/Linux systems, install libncurses5-dev.