GithubHelp home page GithubHelp logo

rtcote / ohcount Goto Github PK

View Code? Open in Web Editor NEW

This project forked from blackducksoftware/ohcount

0.0 2.0 0.0 6.9 MB

The Ohloh source code line counter

Home Page: https://github.com/blackducksoftware/ohcount

License: GNU General Public License v2.0

Ruby 9.26% Shell 1.68% Python 2.48% C 30.50% Ragel 47.93% ActionScript 1.14% CMake 0.13% Makefile 0.08% Objective-C 0.40% Visual Basic 2.02% BlitzMax 0.16% Limbo 0.82% C# 0.69% Gosu 0.13% M4 0.05% Coq 0.07% Common Lisp 1.46% Eiffel 0.07% HTML 0.52% Smalltalk 0.40%

ohcount's Introduction

Ohcount

Ohloh's source code line counter.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License Version 2 as published by the Free Software Foundation.

License

Ohcount is specifically licensed under GPL v2.0, and no later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Overview

Ohcount is a library for counting lines of source code. It was originally developed at Ohloh, and is used to generate the reports at www.openhub.net.

Ohcount supports multiple languages within a single file: for example, a complex HTML document might include regions of both CSS and JavaScript.

Ohcount has two main components: a detector which determines the primary language family used by a particular source file, and a parser which provides a line-by-line breakdown of the contents of a source file.

Ohcount includes a command line tool that allows you to count individual files or whole directory trees. It also allows you to find source code files by language family, or to create a detailed annotation of an individual source file.

Ohcount includes a Ruby binding which allows you to directly access its language detection features from a Ruby application.

System Requirements

Ohcount is supported on Ubuntu 12.04 LTS. Other Linux environments should also work, but your mileage may vary.

Ohcount does not support Windows.

Ohcount targets Ruby 1.9.3. The build script requires a bash shell. You also need a C compiler to build the native extensions.

Source Code

Ohcount source code is available as a Git repository:

git clone git://github.com/blackducksw/ohcount.git

Building Ohcount

You will need ragel 6.8 or higher, bash, pcre, magic, gcc (version 4.8.2 or greater) and SWIG (2.0.11). Once you have them, go to the top directory of ohcount and run

./build

Using Ohcount

Once you've built ohcount, the executable program will be at bin/ohcount. The most basic use is to count lines of code in a directory tree. run:

bin/ohcount

Ohcount support several options. Run ohcount --help for more information.

Building Ruby and Python Libraries

To build the ruby wrapper:

./build ruby

To build the python wrapper, run

python python/setup.py build
python python/setup.py install

The python wrapper is currently unsupported.

ohcount's People

Contributors

raphink avatar amujumdar avatar bytbox avatar oblomov avatar d0k avatar borisfaure avatar bnkr avatar pmoura avatar earl avatar chris-morgan avatar ciaranm avatar haraldkl avatar grubba avatar jasonriedy avatar krajaratnam avatar sylvestre avatar pshiryaev avatar tsee avatar abeaumont avatar dcsobral avatar mernen avatar lefticus avatar jerstlouis avatar mjl- avatar wildmichael avatar peti avatar pfusik avatar samb avatar koraktor avatar arcriley avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.