count source lines of code (SLOC) using pygments
Project description
pygount
Pygount is a command line tool to scan folders for source code files and count the number of source code lines in it. It is similar to tools like sloccount and cloc but uses the pygments package to analyze the source code and consequently can analyze any programming language supported by pygments.
The name is a combination of pygments and count.
Download and installation
Pygount is available from https://pypi.python.org/pypi/pygount and can be installed running:
$ pip install pygount
Usage
Simply run and specify the folder to analyze recursively, for example:
$ pygount ~/development/sometool
If you omit the folder, the current folder of your shell is used as starting point.
There are a couple of command line options, to find out more, run:
$ pygount --help
Jenkins
Pygount can produce output that can be processed by the SLOCCount plug-in for Jenkins continuous integration server.
For example:
pygount --format=cloc-xml --out cloc.xml --suffix=py --verbose
Then add a post-build action “Publish SLOCCount analysis results” and set “SLOCCount report” to “cloc.xml”.
Revision history
Version 0.0.1, 2016-07-05
Initial public release.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.