{"id":13689202,"url":"https://github.com/casperdcl/ghstat","last_synced_at":"2025-05-07T14:31:50.235Z","repository":{"id":47002716,"uuid":"329614080","full_name":"casperdcl/ghstat","owner":"casperdcl","description":"Plot summaries of lines of code written","archived":false,"fork":false,"pushed_at":"2025-03-31T17:47:28.000Z","size":82,"stargazers_count":11,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"v2","last_synced_at":"2025-04-25T15:41:45.166Z","etag":null,"topics":["actions","author","code-analysis","gist","gistbox","git","github","graph","log","pinned-gist","plot","readme","statistics","stats"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/casperdcl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"casperdcl","custom":"https://cdcl.ml/sponsor"}},"created_at":"2021-01-14T12:49:58.000Z","updated_at":"2024-11-03T14:24:49.000Z","dependencies_parsed_at":"2024-06-17T21:18:57.971Z","dependency_job_id":"13682e1c-9459-4dbd-b171-a99b6b7a020d","html_url":"https://github.com/casperdcl/ghstat","commit_stats":{"total_commits":51,"total_committers":1,"mean_commits":51.0,"dds":0.0,"last_synced_commit":"41bf196c01d42688cbe1ac5ba9202b0dbe068d6c"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casperdcl%2Fghstat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casperdcl%2Fghstat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casperdcl%2Fghstat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casperdcl%2Fghstat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/casperdcl","download_url":"https://codeload.github.com/casperdcl/ghstat/tar.gz/refs/heads/v2","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252895786,"owners_count":21821215,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["actions","author","code-analysis","gist","gistbox","git","github","graph","log","pinned-gist","plot","readme","statistics","stats"],"created_at":"2024-08-02T15:01:37.946Z","updated_at":"2025-05-07T14:31:50.215Z","avatar_url":"https://github.com/casperdcl.png","language":"Python","readme":"# ghstat\n\nAutomatically plot total lines of code (LoC) written.\n\n![](https://gist.githubusercontent.com/casperdcl/7f351ce61f01cfcfb5cfa53097954435/raw/ghstats-5.svg)\n\n![](https://gist.githubusercontent.com/casperdcl/7f351ce61f01cfcfb5cfa53097954435/raw/ghstats-a.png)\n\n\u003cdetails\u003e\u003csummary\u003eFull breakdown\u003c/summary\u003e\u003cimg src=\"https://gist.githubusercontent.com/casperdcl/7f351ce61f01cfcfb5cfa53097954435/raw/ghstats-b-full.png\"/\u003e\u003c/details\u003e\n\n## Usage\n\n### Workflow\n\nRequirements:\n\n- `python3`\n  + e.g. `uses: actions/setup-python@v2`\n- secrets\n  + a [personal access token][PAT] with scopes:\n    + `repo`\n    + `read:user` (optional)\n    + `gist` (optional)\n  + a [gist] ID which will store the generated graphs (optional)\n\n[PAT]: https://github.com/settings/tokens\n[gist]: https://docs.github.com/en/free-pro-team@latest/github/writing-on-github/editing-and-sharing-content-with-gists\n\nExample:\n\n```yaml\nname: ghstat\non:\n  push:\n  schedule:\n    - cron: '0 0 * * *'  # every midnight\njobs:\n  ghstat:\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/setup-python@v2\n    - uses: casperdcl/ghstat@v2\n      with:\n        github-token: ${{ secrets.GH_TOKEN }}\n        gist-id: ${{ secrets.GIST_ID }}\n        # user: casperdcl  # default inferred from github-token\n        # author: 'Casper da Costa-Luis'  # for `git log --author`, default inferred\n        # repos-incl: '' # space separated list (e.g. myuser/arepo myorg/arepo)\n        # repos-skip: '' # space separated list (e.g. myuser/arepo myorg/arepo conda-forge)\n        # lang-names: '' # space separated list (e.g. conf:INI cuh:Cuda)\n```\n\nUsing a `GIST_ID` of `7f351ce61f01cfcfb5cfa53097954435`, the result is visible at https://gist.github.com/casperdcl/7f351ce61f01cfcfb5cfa53097954435.\n\n### Running locally\n\nPython and `${GH_TOKEN}` are required; other env vars are optional.\n\n```bash\npython -m pip install -r requirements.txt\nGH_TOKEN=... \\\n  AUTHOR=... \\\n  GH_USER=... \\\n  REPOS_INCL=... \\\n  REPOS_SKIP=... \\\n  GH_GIST_ID=... \\\n  LANG_NAMES=... \\\n  bash ghstat.sh\n```\n","funding_links":["https://github.com/sponsors/casperdcl","https://cdcl.ml/sponsor"],"categories":["Python","github"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcasperdcl%2Fghstat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcasperdcl%2Fghstat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcasperdcl%2Fghstat/lists"}