{"id":23683915,"url":"https://github.com/copyleaks/token-counter","last_synced_at":"2025-10-13T15:38:52.547Z","repository":{"id":241287012,"uuid":"806120431","full_name":"Copyleaks/token-counter","owner":"Copyleaks","description":"Simple script to forecast credits usage for source code scans on Copyleaks","archived":false,"fork":false,"pushed_at":"2024-09-19T14:03:05.000Z","size":12,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-13T15:38:51.833Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Copyleaks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2024-05-26T12:39:45.000Z","updated_at":"2025-04-17T23:49:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"2f9382dc-7b04-4514-be46-9b919960d738","html_url":"https://github.com/Copyleaks/token-counter","commit_stats":null,"previous_names":["copyleaks/token-counter"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Copyleaks/token-counter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Copyleaks%2Ftoken-counter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Copyleaks%2Ftoken-counter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Copyleaks%2Ftoken-counter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Copyleaks%2Ftoken-counter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Copyleaks","download_url":"https://codeload.github.com/Copyleaks/token-counter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Copyleaks%2Ftoken-counter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279015934,"owners_count":26085777,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-12-29T20:29:56.106Z","updated_at":"2025-10-13T15:38:52.531Z","avatar_url":"https://github.com/Copyleaks.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Token Counter\nToken Counter is a python script written by Copyleaks, to forecast credits usage for source code scans on the Copyleaks platform.\n\n## Help\n```bash\npython3 main.py -h\n\noutput:\nusage: main.py [-h] --directory DIRECTORY\n\noptions:\n  -h, --help            show this help message and exit\n  --directory DIRECTORY, -d DIRECTORY\n                        Directory to scan for source code files\n```\n\n## Usage\n```bash\npython3 main.py -d CODE_DIRECTORY\n```\n\n## Example\n```bash\npython3 main.py -d CODE_DIRECTORY\n```\n\n\u003cb\u003eoutput\u003c/b\u003e:\n\n```bash\n74 files found\n*.py:\n        Files: 36\n        Tokens: 36,960\n        Average Token count: 1,027\n\n*.cs:\n        Files: 21\n        Tokens: 9,301\n        Average Token count: 443\n\n*.java:\n        Files: 2\n        Tokens: 6,189\n        Average Token count: 3,095\n\n*.js:\n        Files: 5\n        Tokens: 937\n        Average Token count: 188\n\n*.css:\n        Files: 1\n        Tokens: 125\n        Average Token count: 125\n\n*.php:\n        Files: 2\n        Tokens: 576\n        Average Token count: 288\n\n*.rb:\n        Files: 2\n        Tokens: 247\n        Average Token count: 124\n\n*.scala:\n        Files: 2\n        Tokens: 664\n        Average Token count: 332\n\n*.swift:\n        Files: 2\n        Tokens: 1,157\n        Average Token count: 579\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcopyleaks%2Ftoken-counter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcopyleaks%2Ftoken-counter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcopyleaks%2Ftoken-counter/lists"}