{"id":25506563,"url":"https://github.com/blackducksoftware/ohcount4j","last_synced_at":"2025-06-29T09:38:40.972Z","repository":{"id":49811693,"uuid":"47845308","full_name":"blackducksoftware/ohcount4j","owner":"blackducksoftware","description":"Line counting and language identification tool","archived":false,"fork":false,"pushed_at":"2023-04-26T19:21:24.000Z","size":924,"stargazers_count":18,"open_issues_count":7,"forks_count":8,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-10T12:17:29.671Z","etag":null,"topics":["java","line-counter","ohcount","ohloh","ragel","tool"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blackducksoftware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-12-11T18:56:07.000Z","updated_at":"2023-01-12T08:40:39.000Z","dependencies_parsed_at":"2025-04-10T11:52:12.196Z","dependency_job_id":"bf5d8845-2e59-44c5-86a5-8a47ff6e975e","html_url":"https://github.com/blackducksoftware/ohcount4j","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/blackducksoftware/ohcount4j","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blackducksoftware%2Fohcount4j","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blackducksoftware%2Fohcount4j/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blackducksoftware%2Fohcount4j/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blackducksoftware%2Fohcount4j/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blackducksoftware","download_url":"https://codeload.github.com/blackducksoftware/ohcount4j/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blackducksoftware%2Fohcount4j/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262572319,"owners_count":23330743,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java","line-counter","ohcount","ohloh","ragel","tool"],"created_at":"2025-02-19T06:58:29.472Z","updated_at":"2025-06-29T09:38:40.916Z","avatar_url":"https://github.com/blackducksoftware.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/blackducksoftware/ohcount4j.svg?branch=master)](https://travis-ci.org/blackducksoftware/ohcount4j) [![Coverage Status](https://coveralls.io/repos/github/blackducksoftware/ohcount4j/badge.svg?branch=master)](https://coveralls.io/github/blackducksoftware/ohcount4j?branch=master) [ ![Download](https://api.bintray.com/packages/bds/oss/ohcount4j/images/download.svg) ](https://bintray.com/bds/oss/ohcount4j/_latestVersion)\n[![Black Duck Security Risk](https://copilot.blackducksoftware.com/github/groups/blackducksoftware/locations/ohcount4j/public/results/branches/master/badge-risk.svg)](https://copilot.blackducksoftware.com/github/groups/blackducksoftware/locations/ohcount4j/public/results/branches/master)\n\n# Note\n\nOhcount4j has been archived, is available in read-only mode, and will no longer be accepting pull requests. [Ohcount](https://github.com/blackducksoftware/ohcount) is still an active projects and is accepting pull requests.\n\n# Overview\n\nOhcount4j is a ragel/java application for inspecting source by detecting languages and counting lines of code.  For example,\n```\n./ohcount4j src/test/src-code\n\nOhcount4j Line Count Summary\n\nLanguage                  Files       Code    Comment  Comment %      Blank      Total\n------------------------  -----  ---------  ---------  ---------  ---------  ---------\nHaXe                          1         32         62      66.0%          7        101\nOpenGL Shading Language       1         25         12      32.4%          6         43\nCOBOL                         1         13          1       7.1%          2         16\nBlitzMax                      1          9         12      57.1%         11         32\nChaiScript                    1          8          7      46.7%          2         17\nHTML                          1          8          1      11.1%          2         11\nC                             1          4         10      71.4%          4         18\nCSS                           1          1          0       0.0%          0          1\n------------------------  -----  ---------  ---------  ---------  ---------  ---------\nTotal                         7        100        105      51.2%         34        239\n```\n\n## Parameters\nThe following describes the parameter options for ohcount4j:\n```\n[file] : target\n-a    : show annotated source code\n-d    : show detected file types only\n-h    : display this message\n-l    : show supported languages\n-s    : show line count summary (default)\n```\n\n## Supported Platforms\nThe currently supported platforms are:\n* Ubuntu 14.04 LTS\n* Mac OS X 10.9.x (Dev environment)\n\n## Licensing\n\nOhcount4j is licensed under [Apache 2](http://www.apache.org/licenses/LICENSE-2.0).  See LICENSE in the root directory for details.\n\n## Supported Languages\n\n```\n./ohcount4j -l\n\nOhcount4j supported languages\n\n----------------------------------\n  Name              Nice name\n----------------------------------\n  actionscript      ActionScript\n  ada               Ada\n  aspx_csharp       ASP.NET (C#)\n  aspx_vb           ASP.NET (VB)\n  assembly          Assembly\n  augeas            Augeas\n  autoconf          Autoconf\n  automake          Automake\n  awk               Awk\n  bat               Windows Batch\n  bfpp              Brainfuck++\n  binary            Binary\n  blitzmax          BlitzMax\n  boo               Boo\n  brainfuck         Brainfuck\n  c                 C\n  chaiscript        ChaiScript\n  classic_basic     Classic BASIC\n  clearsilver       ClearSilver\n  clojure           Clojure\n  cobol             COBOL\n  coffeescript      CoffeeScript\n  coldfusion        ColdFusion\n  cpp               C++\n  cmake             CMake\n  csharp            C#\n  coq               Coq\n  css               CSS\n  cuda              CUDA\n  d                 D\n  dylan             Dylan\n  dcl               DCL\n  ebuild            Ebuild\n  ec                eC\n  ecmascript        ECMAScript\n  eiffel            Eiffel\n  elixir            Elixir\n  emacslisp         Emacs Lisp\n  erlang            Erlang\n  factor            Factor\n  exheres           Exheres\n  forth             Forth\n  fortranfixed      Fortran (Fixed-Format)\n  fortranfree       Fortran (Free-Format)\n  fsharp            F#\n  genie             Genie\n  glsl              OpenGL Shading Language\n  golang            Go\n  groovy            Groovy\n  haml              Haml\n  haxe              HaXe\n  html              HTML\n  haskell           Haskell\n  idl_pvwave        IDL/PV-WAVE/GDL\n  jam               Jam\n  java              Java\n  javascript        JavaScript\n  jsp               JSP\n  kotlin            Kotlin\n  limbo             Limbo\n  lisp              Lisp\n  logtalk           Logtalk\n  lua               Lua\n  make              Make\n  mathematica       Mathematica\n  matlab            Matlab\n  metapost          MetaPost\n  metafont          MetaFont\n  modula2           Modula 2\n  modula3           Modula 3\n  objective_c       Objective-C\n  ocaml             OCaml\n  octave            Octave\n  pascal            Pascal\n  perl              Perl\n  php               Php\n  puppet            Puppet\n  prolog            Prolog\n  python            Python\n  r                 R\n  rebol             REBOL\n  rexx              Rexx\n  ruby              Ruby\n  scala             Scala\n  swift             Swift\n  scheme            Scheme\n  shell             Shell\n  smalltalk         Smalltalk\n  sql               SQL\n  structured_basic  Structured Basic\n  tcl               Tcl\n  tex               TeX/LaTeX\n  unknown           Unknown\n  vb                VisualBasic\n  vbscript          VBScript\n  vimscript         Vimscript\n  xml               XML\n  xmlschema         XML Schema\n  xslt              XSL Transformation\n```\n\n# Prerequisite Software\n\n1. Install **Eclipse**\n2. Install **ragel** (minimum: 6.8, recommended 6.9).  For example, to install on Mac OS X via [homebrew](https://github.com/Homebrew/homebrew/blob/master/Library/Formula/ragel.rb):\n\n     `brew install ragel`\n3. Install **TestNG** plugin in Eclipse (see below)\n\n# Build Configuration Steps\n\n1. Checkout ohcount4j project\n\n    `cd git-clone-dir`\n\n    `git clone https://github.com/blackducksoftware/ohcount4j.git`\n\n2. Before importing the ohcount4j project into Eclipse, run the gradle build to create the generated ragel files used by the project.  The gradle script supports the ability to run specifics task for cleaning, regenerating the source, and running tests.  See the build.gradle file for details.\n\n    `./gradlew clean build`\n\n3. Create a workspace (Eclipse will require you do this when you start)\n\n4. Install [TestNG plugin](http://testng.org/doc/download.html)\n  * Go to Help -\u003e Install New Software -\u003e Add\n  * Click **Add**\n  * Enter Name -\u003e TestNG, Location -\u003e http://beust.com/eclipse\n  * Click **Next**\n  * Check TestNG and follow the instructions\n\n5. Import this ohcount4j project in Eclipse\n  * Click File -\u003e Import\n  * Choose Gradle -\u003e Gradle Project\n  * Click **Next**\n  * Select root dir, e.g. *git-clone-dir/ohcount4j*\n  * Click **Build Model**\n  * In Projects: section, you should see ohlcount4j (*git-clone-dir/ohcount4j*) checked.\n  * Click **Finish** (do not check Copy Projects into workspace)\n\n# Project Layout\n\n```\nscanners - ragel scanner definitions. Because it produces Java,\n           name of the file should match scanner class name and it should\n           have net.ohloh.ohcount4j.scanner package definition on top.  \n           Also, the extension should be .java.rl.\n           See ExampleScanner.java.rl.\nsrc - source directory\ntest - test source directory\nsrc/generated/java - generated scanner sources\n           generateScanSources target invokes ragel command on each file in scanners directory\n           and output goes into src/generated/java/com/blackducksoftware/ohcount4j/scan\nlib - libraries\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblackducksoftware%2Fohcount4j","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblackducksoftware%2Fohcount4j","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblackducksoftware%2Fohcount4j/lists"}