{"id":18689695,"url":"https://github.com/mrseanryan/loc-counter","last_synced_at":"2025-06-20T18:38:53.906Z","repository":{"id":96809914,"uuid":"162978804","full_name":"mrseanryan/loc-counter","owner":"mrseanryan","description":":memo: Counts how many lines of code (LOC/SLOC) are in a code base, by programming language.","archived":false,"fork":false,"pushed_at":"2023-10-27T15:26:03.000Z","size":10,"stargazers_count":4,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T05:53:48.429Z","etag":null,"topics":["code-analysis","code-summarization","loc","sloc","static-analysis"],"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/mrseanryan.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}},"created_at":"2018-12-24T10:24:08.000Z","updated_at":"2022-08-21T14:48:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"6f6ed71e-5d3b-4451-884e-0b29b7a43785","html_url":"https://github.com/mrseanryan/loc-counter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mrseanryan/loc-counter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrseanryan%2Floc-counter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrseanryan%2Floc-counter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrseanryan%2Floc-counter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrseanryan%2Floc-counter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrseanryan","download_url":"https://codeload.github.com/mrseanryan/loc-counter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrseanryan%2Floc-counter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260999159,"owners_count":23095260,"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":["code-analysis","code-summarization","loc","sloc","static-analysis"],"created_at":"2024-11-07T10:44:47.142Z","updated_at":"2025-06-20T18:38:48.886Z","avatar_url":"https://github.com/mrseanryan.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# :memo: loc (Lines Of Code) counter\n\nCounts how many lines of code (LOC/SLOC)* are in a code base, by programming language.\n\nThe programming languages are determined via the file extensions.\n\n\n\\* LOC = Lines Of Code\n\\* SLOC = Source Lines Of Code\n\n## Dependencies\n\n- Python 3.x\n\n## Installation\n\n- Download the [python script](./loc_counter.py) (or download or clone this whole repo)\n\n- Save the script in a suitable location, such as `/scripts`\n\n## Usage\n\n```\ncd /my_source_code\n\n./scripts/loc_counter.py\n```\n\n### Example output\n\n```\nType                    Files   Lines\nPython                  1       377\n\n                        Files   Lines\nIdentified Code         1       377\n\nSkipped                 2       75\nSkipped extensions:             md\n\n\nTotal                   3       452\n```\n\n### Detailed Usage\n\nThis script scans the current directory and reports several\nstatistics of interest to code spelunkers:\n\n- total number of directories that contain code\n- total number of files in all directories.\n- total number of files in each of the following programming\n  languages: \n  - SQL, .NET, C#, PowerShell, JavaScript, CSS, SCSS, JSON, ASP.NET, TypeScript.\n  Also other languages including:\n  - Awk, C, C++, HTML, IDL, Java, Perl, PHP, Java, Python, TCL, VB6.\n\nThe programming language is determined via the file extension(s).\n\nThe script automatically ignores any file in typical 'not source code' directories, such as `node_modules` or `.git`.\n\n#### options\n\nThe -w or --where argument tells the program that for each type of\ncode it is to list all the directories that contain that type of code.\n\nThe -e or --exclude argument excludes certain sub-directories from the\nsearch.  The exclude argument can be used several times on the same\nline like this:\n\nThe -l or --language option says to only find one language, and not\nall of them.\n\nThe -p or --pretty option allows the user to select HTML or LaTeX\ntable output format instead of plain text.\n\n`\nloc_counter.py -e HTML -e DoxyFiles\n`\n\n## origin\n\nThis is an updated version of `what.py` by George V. Neville-Neil.\n\nThe original version is here: http://www.codespelunking.org/downloads/what.py\n\n## License\n\nSee the [original license](LICENSE) or the same text in the source file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrseanryan%2Floc-counter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrseanryan%2Floc-counter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrseanryan%2Floc-counter/lists"}