Crates.io | git-repo-language-trends |
lib.rs | git-repo-language-trends |
version | 0.4.0 |
source | src |
created_at | 2021-01-23 20:08:21.450073 |
updated_at | 2021-02-01 19:38:02.472429 |
description | Prints tabulated data about programming language usage over time in a git repository. |
homepage | https://github.com/Enselic/git-repo-language-trends |
repository | https://github.com/Enselic/git-repo-language-trends |
max_upload_size | |
id | 345781 |
size | 49,868 |
Prints tabulated data about programming language usage over time in a git repository.
Copy-paste the output into your favourite spreadsheet software to easily make a graph. Stacked area chart is recommended.
Simply pass the file extensions of the languages you want the trend for.
% cd ~/src/your-project
% git-repo-language-trends .cpp .rs
.cpp .rs
2021-01-23 0 121
2021-01-22 120 107
2021-01-19 243 66
Then copy-paste the output into your favourite spreadsheet software and make a graph.
You can download pre-built binaries for Linux, Mac and Windows for the latest release here.
If you have Rust and Cargo installed, all you need to do to fetch, build and
install the self-contained git-repo-language-trends
crate is:
cargo install git-repo-language-trends
You can of course also clone this repo and then simply cargo build
it if you have Rust and Cargo installed on your system.
This program is fast. It counts ~5 000 000 lines / second on a high-end 2018
laptop on a large repository (with --disable-progress-bar
). (For smaller
repositories, the number is lower.)
This is because the inner loop uses the Rust libgit2
bindings. A regular shell script on a
fast 2018 laptop that uses git show $COMMIT:$FILE
in the inner loop counts
only ~20 000 lines / second.