Count how many lines of code you commit on GitHub! (Count by file extension)
Project description
GitHub Commit Line Stats
Count how many lines of code you commit on GitHub! (Count by file extension)
python -m ghcls --token <YOUR GITHUB TOKEN>
usage: __main__.py [-h] -t TOKEN [-u USER] [-c CACHE] [-o OUTPUT] [-l LANGUAGE]
GitHub Commit Line Stats
options:
-h, --help show this help message and exit
-t, --token TOKEN GitHub Personal Access Token
-u, --user USER GitHub Username (Optional)
-c, --cache CACHE Cache directory for commits
-o, --output OUTPUT Output file for commit stats
-l, --language LANGUAGE
Language detection function (default: importlib.import_module('ghcls').get_language_by_filename)
You can customize your language detector by changing get_language_by_filename, e.g.:
pip install ghcls[linguist]
python -m ghcls --token <YOUR GITHUB TOKEN> -l importlib.import_module('ghcls.extensions.linguist').get_language_by_filename
from ghcls import get_additions_of_user, get_language_by_filename
gh = Github(your_gh_token)
user = gh.get_user(your_username)
totals = get_additions_of_user(user, token, cache, get_language_by_filename)
# You can customize your language detector by changing get_language_by_filename
pathlib.Path(output).write_text(json.dumps(totals, indent=2))
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.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file github_commit_line_stats-1.2.2.tar.gz.
File metadata
- Download URL: github_commit_line_stats-1.2.2.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32d0ded28b1c408ef48986ba8a3f843879e1e62b88b06c0a5ed78ba6be74bb77
|
|
| MD5 |
06a0b979b0e671745301ade67d88cbdd
|
|
| BLAKE2b-256 |
955ca6329fc2a3d7b967a7da43ba37b5ec448a08f38aaebcc1b43113ae478c49
|
File details
Details for the file github_commit_line_stats-1.2.2-py3-none-any.whl.
File metadata
- Download URL: github_commit_line_stats-1.2.2-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4c1fb208a501026324ef323822b1f4f586f1548e5aa2e0b5f577abcc9e6f9ba
|
|
| MD5 |
d87cd04e740ea6a449f6943613065269
|
|
| BLAKE2b-256 |
e1cde7c0e839a6dc2d6d1e4793d585527197baab47dddd99b0bb5a6ed8924cb8
|