Welcome, Guest! Log In | Create Account

Ohcount

6 Billion Lines and Counting!

Ohcount is the source code line counter that powers Ohloh. Ohcount supports over 70 popular programming languages, and has been used to count over 6 billion lines of code by 300,000 developers!

Ohcount does more more than just count lines of code. It can also detect popular open source licenses such as GPL within a large directory of source code. It can also detect code that targets a particular programming API, such as Win32 or KDE.

Ohcount is supported on Mac OS X 10.4+ and Ubuntu Linux 8.04+, and should work well with most POSIX operating systems. Ohcount does not support Windows.

Get Ohcount

Download ohcount from Ohloh.net at https://sourceforge.net/projects/ohcount/files/ohcount-3.0.0.tar.gz/download.

To build it for your architecture, you will need ragel 6.3 or higher, bash, pcre, gcc, gperf and SWIG to build ohcount. Once you have them, go to the top directory of ohcount and type:

> bash build

or

> ./build

Try it out on your favorite source tree:

ohcount ~/myproject/src

Source Code

The most recent development source code for Ohcount is also available from from our Git repository at

git://ohcount.git.sourceforge.net/gitroot/ohcount/ohcount.

Contribute

You can contribute to Ohcount in many ways:

  • Source Code: If you would like to enhance Ohcount with additional features or improvements, read the HowToSubmitPatches page. Accepted contributions will be used on the live Ohloh website. One useful change would be for someone to convert our build system from a custom bash script to one that uses the standard autoconf/make/make install process.
  • Add support for a new language: If you'd like Ohcount to support a language you use, create a create a new new ticket and then attach the patch which implements the language. See our HowToSubmitPatches page for advice. Feel free to just create the ticket, but you might wait a long time before someone picks up the torch and implements your language.
  • Wiki: This website is a Trac wiki, and we invite all users to create new pages or improve the existing content.

You must log in to the Ohloh Labs Trac website to submit patches or make changes. Anyone can register. The Ohloh Labs Trac website is unrelated to the Ohloh web site, and you cannot use your Ohloh account credentials to log in to the Ohloh Labs Trac website.

Contact Us

General discussion and support questions are handled in the Ohloh forums.

You can join us on IRC at irc.freenode.net in #ohloh.

You can also send us private email to Ohloh at mailto:info@….

See the growing list of Ohcount contributors!