-m
or -b
).Before running the script, ensure that you have the following:
python3 --version
)git --version
)Download the script. Then, save it in your working directory under scripts/Get_Authors.py.
python3 scripts/Get_Authors.py -m 2023-05 test .mailmap
test
: The path to the folder containing the repository or repositories..mailmap
: The path to the .mailmap file to be used.-m YYYY-MM
(optional): Counts authors within a specific month (e.g., 2023-05)-b YYYY-MM-DD YYYY-MM-DD
(optional): An alternative to -m YYYY-MM
, it specifies a custom date range-u
(optional): Avoids counting subfolders (subfolders are scanned by default)Authors of the repositories test between 01 May 2023 and 31 May 2023:
Commits Author
42 Alice <alice@example.com>
36 Bob <bob@example.com> (NOT IN MAILMAP)
...
Total Authors = 12
(NOT IN MAILMAP)
'.The script runs cloc
with a custom configuration that uses a rules.def file to apply Fluid Attacks' language definitions and excludes the following non-code languages:
Documentation: Markdown
Styling: CSS, SASS, LESS, Stylus
Format/config files: JSON, XML, XAML
Python (version 3 recommended; check by running python3 --version
)
cloc installed and accessible in your system path
python3 scripts/Count_LoC.py /path/to/project
Excluded: Markdown,CSS,SASS,LESS,Stylus,JSON,XML,XAML
Using special FLUID Configuration
The above message means that the script has successfully excluded non-code files and applied the standard used by Fluid Attacks.