Skip to content

AHolubov/scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

scripts

This is a grand collection consisting of one whole script written for personal use.

comment-counter.py

The comment-counter script reads a specified directory and subdirectories looking for for C/C++ source and header files (specifically .cpp and .h), counts the number of efective code lines, comment lines and blank lines. It generates a report formatted as CSV that shows the total lines of code, number of comment lines, effective code lines, blank lines as well as percentage of comment and code lines for each file read as well as the project in total. It is Python 2/3 compatible.

Requires the argparse module.

Usage:

comment-counter.py [-h] [--exclude EXCLUDE] [-v] path

positional arguments:
  path               path to the root project directory

optional arguments:
  -h, --help         show this help message and exit
  --exclude EXCLUDE  directories to be excluded from search
  -v, --verbose      verbose mode

About

Python scripts mostly for personal use

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages