Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

github_commit_line_stats-1.2.2.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

github_commit_line_stats-1.2.2-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file github_commit_line_stats-1.2.2.tar.gz.

File metadata

File hashes

Hashes for github_commit_line_stats-1.2.2.tar.gz
Algorithm Hash digest
SHA256 32d0ded28b1c408ef48986ba8a3f843879e1e62b88b06c0a5ed78ba6be74bb77
MD5 06a0b979b0e671745301ade67d88cbdd
BLAKE2b-256 955ca6329fc2a3d7b967a7da43ba37b5ec448a08f38aaebcc1b43113ae478c49

See more details on using hashes here.

File details

Details for the file github_commit_line_stats-1.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for github_commit_line_stats-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b4c1fb208a501026324ef323822b1f4f586f1548e5aa2e0b5f577abcc9e6f9ba
MD5 d87cd04e740ea6a449f6943613065269
BLAKE2b-256 e1cde7c0e839a6dc2d6d1e4793d585527197baab47dddd99b0bb5a6ed8924cb8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page