{"id":20144006,"url":"https://github.com/ashkan0201/ashcount","last_synced_at":"2025-08-30T10:42:50.955Z","repository":{"id":198301415,"uuid":"700540315","full_name":"ashkan0201/ashcount","owner":"ashkan0201","description":"A set of things that can be done with files. For example, finding the number of lines in a file Find the number of words Find the net code count of a Python file And ...","archived":false,"fork":false,"pushed_at":"2023-10-19T11:35:07.000Z","size":2799,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-17T00:23:54.871Z","etag":null,"topics":["documentation","python3","testing"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ashkan0201.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":"2023-10-04T19:27:28.000Z","updated_at":"2025-02-20T13:35:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"dfc769b3-5204-4f98-9929-4f1689c3cfa7","html_url":"https://github.com/ashkan0201/ashcount","commit_stats":null,"previous_names":["ashkan0201/ashcount"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ashkan0201/ashcount","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashkan0201%2Fashcount","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashkan0201%2Fashcount/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashkan0201%2Fashcount/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashkan0201%2Fashcount/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ashkan0201","download_url":"https://codeload.github.com/ashkan0201/ashcount/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashkan0201%2Fashcount/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272839670,"owners_count":25001862,"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-08-30T02:00:09.474Z","response_time":77,"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":["documentation","python3","testing"],"created_at":"2024-11-13T22:08:25.302Z","updated_at":"2025-08-30T10:42:50.900Z","avatar_url":"https://github.com/ashkan0201.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# ashcount\n\n**This package helps you to get some information from the files.**\n\n- Find the number of lines in a file\n- Find the number of original lines in a file\n- Find the word count of a file\n- Find the number of codes in a Python file\n- Find the net code count of a Python file\n- Find the number of comments in a Python file\n\nYou can find the above items using this package.\n\n## How to use modules\nIt is very easy to use modules, now we will give some examples.\nThe output will be a number in all modes.\n\n```bash\npip install ashcount\n```\n\nFirst, we import the `ashcount` from `ashcount`\n```python\nfrom ashcount import ashcount\n```\n\nThe files you use for it must have their addresses to avoid problems!\n```python\nTxt_file_address = 'example.txt'\nPython_file_address = 'example.py'\n```\n\nFor example, to find the number of `lines` in a `txt` file.\n```python\nprint(ashcount.counter.line_counter(path=Txt_file_address))\n```\n\nTo get the number of `main lines` of a `txt` file.\n\nIn this section, we do not consider `lines` that are empty or only have extra spaces.\n```python\nprint(ashcount.counter.counting_main_lines(path=Txt_file_address))\n```\n\nTo find the number of `words` in a `txt` file.\n```python\nprint(ashcount.counter.word_count(path=Txt_file_address))\n```\n\nFor the part where you want to work with `Python` files, you must import `ashcount` from `ashcount`.\n```python\nfrom ashcount import ashcount\n```\n\nAnd also to find the number of `codes` in a `python` file.\n```python\nprint(ashcount.py_counter.python_line_count(path=Python_file_address))\n```\n\nTo find the net number of `codes` in a `Python` file.\n\nIn this section, we do not consider `comments` and `lines` that do not have any code, and we will give you the net number of a code.\n```python\nprint(ashcount.py_counter.pure_python_code(path=Python_file_address))\n```\n\nAnd finally, to find the number of `comments` in a `Python` file.\n```python\nprint(ashcount.py_counter.python_comment_count(path=Python_file_address))\n```\n\n## Ways of communication\n\nContact me in case of problems.\n\n- ashkan02011@gmail.com\n- [github](https://github.com/ashkan0201)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashkan0201%2Fashcount","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fashkan0201%2Fashcount","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashkan0201%2Fashcount/lists"}