Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 101 lines (68 sloc) 2.795 kB
ae92e3f @robinluckey Change README to use Github flavored Markdown
robinluckey authored
1 Ohcount
2 =======
75b5f73 [CHANGE] Add more info to the README, mostly copied from the original
andy authored
3
912757a @robinluckey README updates and corrections
robinluckey authored
4 Ohloh's source code line counter.
75b5f73 [CHANGE] Add more info to the README, mostly copied from the original
andy authored
5
6 This program is free software; you can redistribute it and/or modify
9a33fdb @robinluckey [FIX] Ruby binding memory performance improvement
robinluckey authored
7 it under the terms of the GNU General Public License Version 2 as
75b5f73 [CHANGE] Add more info to the README, mostly copied from the original
andy authored
8 published by the Free Software Foundation.
9
ae92e3f @robinluckey Change README to use Github flavored Markdown
robinluckey authored
10 License
11 -------
12
9a33fdb @robinluckey [FIX] Ruby binding memory performance improvement
robinluckey authored
13 Ohcount is specifically licensed under GPL v2.0, and no later version.
75b5f73 [CHANGE] Add more info to the README, mostly copied from the original
andy authored
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program. If not, see <http://www.gnu.org/licenses/>.
22
ae92e3f @robinluckey Change README to use Github flavored Markdown
robinluckey authored
23 Overview
24 --------
75b5f73 [CHANGE] Add more info to the README, mostly copied from the original
andy authored
25
26 Ohcount is a library for counting lines of source code.
27 It was originally developed at Ohloh, and is used to generate
68f0d0c @PeterDP Update README for compatibility with Ubuntu 14.04
PeterDP authored
28 the reports at www.openhub.net.
75b5f73 [CHANGE] Add more info to the README, mostly copied from the original
andy authored
29
30 Ohcount supports multiple languages within a single file: for example,
31 a complex HTML document might include regions of both CSS and JavaScript.
32
33 Ohcount has two main components: a detector which determines the primary
34 language family used by a particular source file, and a parser which
35 provides a line-by-line breakdown of the contents of a source file.
36
37 Ohcount includes a command line tool that allows you to count individual
38 files or whole directory trees. It also allows you to find source code
39 files by language family, or to create a detailed annotation of an
40 individual source file.
41
42 Ohcount includes a Ruby binding which allows you to directly access its
43 language detection features from a Ruby application.
44
ae92e3f @robinluckey Change README to use Github flavored Markdown
robinluckey authored
45 System Requirements
46 -------------------
75b5f73 [CHANGE] Add more info to the README, mostly copied from the original
andy authored
47
68f0d0c @PeterDP Update README for compatibility with Ubuntu 14.04
PeterDP authored
48 Ohcount is supported on Ubuntu 12.04 LTS. Other Linux
75b5f73 [CHANGE] Add more info to the README, mostly copied from the original
andy authored
49 environments should also work, but your mileage may vary.
50
51 Ohcount does not support Windows.
52
dea2dee @nnsathish Update README for ruby 1.9.3 upgrade
nnsathish authored
53 Ohcount targets Ruby 1.9.3. The build script requires a bash shell. You
75b5f73 [CHANGE] Add more info to the README, mostly copied from the original
andy authored
54 also need a C compiler to build the native extensions.
55
ae92e3f @robinluckey Change README to use Github flavored Markdown
robinluckey authored
56 Source Code
57 -----------
75b5f73 [CHANGE] Add more info to the README, mostly copied from the original
andy authored
58
59 Ohcount source code is available as a Git repository:
60
912757a @robinluckey README updates and corrections
robinluckey authored
61 git clone git://github.com/blackducksw/ohcount.git
75b5f73 [CHANGE] Add more info to the README, mostly copied from the original
andy authored
62
ae92e3f @robinluckey Change README to use Github flavored Markdown
robinluckey authored
63 Building Ohcount
64 ----------------
75b5f73 [CHANGE] Add more info to the README, mostly copied from the original
andy authored
65
68f0d0c @PeterDP Update README for compatibility with Ubuntu 14.04
PeterDP authored
66 You will need ragel 6.8 or higher, bash, pcre, magic, gcc (version 4.8.2 or greater)
dea2dee @nnsathish Update README for ruby 1.9.3 upgrade
nnsathish authored
67 and SWIG (2.0.11). Once you have them, go to the top directory of ohcount and run
75b5f73 [CHANGE] Add more info to the README, mostly copied from the original
andy authored
68
912757a @robinluckey README updates and corrections
robinluckey authored
69 ```
70 ./build
71 ```
75b5f73 [CHANGE] Add more info to the README, mostly copied from the original
andy authored
72
ae92e3f @robinluckey Change README to use Github flavored Markdown
robinluckey authored
73 Using Ohcount
74 -------------
6316a85 [NEW] add simple README
Andy Verprauskus authored
75
912757a @robinluckey README updates and corrections
robinluckey authored
76 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:
160ff23 [NEW] add new gestalts; from me and Robin
andy authored
77
912757a @robinluckey README updates and corrections
robinluckey authored
78 ```
79 bin/ohcount
80 ```
6316a85 [NEW] add simple README
Andy Verprauskus authored
81
912757a @robinluckey README updates and corrections
robinluckey authored
82 Ohcount support several options. Run `ohcount --help` for more information.
160ff23 [NEW] add new gestalts; from me and Robin
andy authored
83
ae92e3f @robinluckey Change README to use Github flavored Markdown
robinluckey authored
84 Building Ruby and Python Libraries
85 ----------------------------------
edf2d30 Change README to mention build process for ruby and python
root authored
86
912757a @robinluckey README updates and corrections
robinluckey authored
87 To build the ruby wrapper:
88
89 ```
90 ./build ruby
91 ```
edf2d30 Change README to mention build process for ruby and python
root authored
92
912757a @robinluckey README updates and corrections
robinluckey authored
93 To build the python wrapper, run
160ff23 [NEW] add new gestalts; from me and Robin
andy authored
94
912757a @robinluckey README updates and corrections
robinluckey authored
95 ```
96 python python/setup.py build
97 python python/setup.py install
98 ```
79c779a @bytbox made README formatting consistent
bytbox authored
99
912757a @robinluckey README updates and corrections
robinluckey authored
100 The python wrapper is currently unsupported.
Something went wrong with that request. Please try again.