fpdb (see the free software forum) has parsers for all the major sites and many of the minor ones. It is written in python and available under the GPL. Most of these parsers work for all the poker games, not just holdem. The parsed HH is availble in a Hand object, which is then be further analysed to get the information needed for calculating the various stats.