Download the PHP package mitoteam/mt-howmany without Composer
On this page you can find all versions of the php package mitoteam/mt-howmany. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mitoteam/mt-howmany
More information about mitoteam/mt-howmany
Files in mitoteam/mt-howmany
Package mt-howmany
Short Description Command-line utility to count project sources size, files count, lines count
License MIT
Homepage https://github.com/mitoteam/mt-howmany
Informations about the package mt-howmany
mt-howmany
Command-line utility to measure project sources size, files count, lines count, characters count. You can exclude vendor libraries, binary files, generated code and so from scanning.
Our goal was to understand how many code characters, lines and pages were written by our own hands for various projects.
Installation
Just add it as usual composer dependency:
Or you can add dependency manually to your composer.json
.
Usage
Tool installs standard composer binary to vendor/bin/mt-howmany. So you can run it by just calling it from shell:
or under Windows:
It looks for config in current directory. By default it scans currenct directory recursively, but you can set specific paths to scan in config. There are also bunch of options in config.
You can import config from other files with import
option (for example to have some common parts between projects).
Take a look at sample config for details: mt-howmany.example.yml
For each file that is not ignored in config tool calculates lines count, file size and characters count (using symphony/string
to deal with Unicode and multi-byte characters).
After scanning it prints table with gathered data and final total numbers for whole project.
You can add -v
or -vv
arguments to increase output verbosity.
-v
add per-path statistics table (helps to understand what to exclude from scanning to left only code that is trully yours).
-vv
additionally prints complete data for each file to understand even better where numbers are taken from.
--single
option turns on 'single value mode'. Program will print just one value without any other output (if there are no errors). This is useful for CI, automation and so on. Possible option values: CHARS
, LINES
, PAGES
. Example:
Notes, bugreports, proposals and pull requests are always welcomed.
Output Example
- Project Page: https://www.mito-team.com/projects/mt-howmany
- Contacts: [email protected], https://www.mito-team.com
All versions of mt-howmany with dependencies
symfony/console Version >=4.4
symfony/string Version >=5.4
symfony/yaml Version >=4.4