{"id":25737208,"url":"https://github.com/echo2echo/count-lines-of-code","last_synced_at":"2026-05-07T16:15:07.538Z","repository":{"id":269218712,"uuid":"367182472","full_name":"echo2echo/Count-Lines-of-Code","owner":"echo2echo","description":"Perl Script to Count Lines of Code of Perl, PHP and HTML Files. This script counts all supported files in a directory and each subdirectory.","archived":false,"fork":false,"pushed_at":"2025-02-08T05:47:49.000Z","size":76,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-08T06:26:26.047Z","etag":null,"topics":["blank","cloc","code","comments","count","count-lines","html","lines","perl","php"],"latest_commit_sha":null,"homepage":"","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/echo2echo.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":"2021-05-13T21:49:27.000Z","updated_at":"2025-02-08T05:47:52.000Z","dependencies_parsed_at":"2024-12-21T21:23:12.173Z","dependency_job_id":"2f2519ca-52bb-4a4c-92df-45e78da33221","html_url":"https://github.com/echo2echo/Count-Lines-of-Code","commit_stats":null,"previous_names":["echo2echo/count-lines-of-code"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/echo2echo%2FCount-Lines-of-Code","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/echo2echo%2FCount-Lines-of-Code/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/echo2echo%2FCount-Lines-of-Code/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/echo2echo%2FCount-Lines-of-Code/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/echo2echo","download_url":"https://codeload.github.com/echo2echo/Count-Lines-of-Code/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240807519,"owners_count":19860762,"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":["blank","cloc","code","comments","count","count-lines","html","lines","perl","php"],"created_at":"2025-02-26T06:35:17.928Z","updated_at":"2026-05-07T16:15:07.534Z","avatar_url":"https://github.com/echo2echo.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Count-Lines-of-Code\n\nPerl Script to Count Lines of Code of Perl, PHP and HTML Files on Linux. \n\nPlace script in directory with files and subdirectories to count\n\nGrant permission to run script:\n\n\t$ chmod 755 count_lines_of_code.pl\n\nFor script usage type the following without arguments.\n\n\t$ ./count_lines_of_code.pl \n\nor\n\n    $ perldoc count_lines_of_code.pl\n \nFor example, to count lines of all the Perl files in a directory and each subdirectory:\n\n\t$ ./count_lines_of_code.pl --type=Perl\n\t\nFor example, to count lines of all PHP files in a directory and each subdirectory:\n\n\t$ ./count_lines_of_code.pl --type=PHP\n\nThere is now support for counting .shtml and .htm files along with vanilla .html files.  Use flag --type=HTML for each variation\n\t\nFor example, to count lines of all HTML files in a directory and each subdirectory:\n\n\t$ ./count_lines_of_code.pl --type=HTML\n\t\nTo count lines of code of a webpage, run something like the following in the same directory as the count_lines_of_code.pl script:\n\t\n\t$ wget -cO - http://website.net \u003e filename.html\n\nThen run the script...\n\n\t$ ./count_lines_of_code.pl --type=HTML\n\t\nTo get a count for a single HTML file try a variation of the following...\n\t\n\t$ ./count_lines_of_code.pl --type=HTML | grep -A 4 \"filename.html\"\n\nOr for a single Perl file...\n\n\t$ ./count_lines_of_code.pl --type=Perl | grep -A 5 \"filename.pl\"\n\nFiles to be counted require read permission.  If there is a permission error you could try running script with sudo, something like the following...\n\t\n\t$ sudo ./count_lines_of_code.pl --type=Perl | grep -A 5 \"filename.pl\"\n\nTo omit/skip counting the lines of code of the script itself in the summary of results when counting perl lines try something like below...\n\n--omit usage\n\n  \t$ ./count_lines_of_code.pl --type=Perl --omit=count_lines_of_code.pl\n\n\n*** --omit flag is still a work in progress.  As a temporary work around, place the count_lines_of_code.pl script in a directory with a least one other perl file to be counted.  ***\n \t\nUntil the --omit flag is fixed you will need at least 1 other perl file in the same directory as you are using the script in.  Maybe create a small file of .pl type with the command below. Yes, the --omit flag has a bug.\n\t\n  \t$ echo \"Fill text for script functionality\" \u003e omit.pl\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fecho2echo%2Fcount-lines-of-code","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fecho2echo%2Fcount-lines-of-code","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fecho2echo%2Fcount-lines-of-code/lists"}