{"id":24516146,"url":"https://github.com/bradleyhurley/ccount","last_synced_at":"2025-07-01T09:07:16.703Z","repository":{"id":91971173,"uuid":"65546244","full_name":"bradleyhurley/ccount","owner":"bradleyhurley","description":"A Python column count utility","archived":false,"fork":false,"pushed_at":"2018-05-04T19:30:39.000Z","size":3,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-05T22:39:37.977Z","etag":null,"topics":["ccount","click","libmagic","python-utilities"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bradleyhurley.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2016-08-12T10:47:10.000Z","updated_at":"2018-05-04T19:30:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"ea35c121-16c7-4765-9b32-ee33f78ab3c6","html_url":"https://github.com/bradleyhurley/ccount","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bradleyhurley/ccount","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradleyhurley%2Fccount","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradleyhurley%2Fccount/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradleyhurley%2Fccount/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradleyhurley%2Fccount/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bradleyhurley","download_url":"https://codeload.github.com/bradleyhurley/ccount/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradleyhurley%2Fccount/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262933321,"owners_count":23386784,"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":["ccount","click","libmagic","python-utilities"],"created_at":"2025-01-22T01:21:24.820Z","updated_at":"2025-07-01T09:07:16.668Z","avatar_url":"https://github.com/bradleyhurley.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ccount\nA Python utility that will return the number of columns from standard in, text, gzip, or bzip files to standard out using magic to inspect the files MIME Type.\n\n### Magic Dependencies\n\nOn Windows, copy magic1.dll, regex2.dll, and zlib1.dll onto your PATH from the Binaries and Dependencies zipfiles provided by the [File for Windows](http://gnuwin32.sourceforge.net/packages/file.htm) project.  You will need to copy the file `magic` out of `[binary-zip]\\share\\misc`, and pass it's location to `Magic(magic_file=...)`\n\nOn OSX:\n\n- When using Homebrew: `brew install libmagic`\n- When using macports: `port install file`\n\n## Configuration\n* Create virtualenv\n* pip install -r requirements.txt\n\n## Usage\n\u003e python ccount --help\n```\nOptions:\n  --input FILENAME  The file to read as input or '-'for standard in.  Default = '-'\n  --delimiter TEXT  The file delimiter.  Default='|'\n  --help            Show this message and exit.\n```\nYou can also add ccount to your path to run from your terminal.\n\n\u003e ./ccount --help\n```\nOptions:\n  --input FILENAME  The file to read as input or '-'for standard in.  Default = '-'\n  --delimiter TEXT  The file delimiter.  Default='|'\n  --help            Show this message and exit.\n ``` \n\n## Examples\n\n`\u003e cat sample_file | ./ccount`\n\n4\n\n`\u003e python ccount --input sample_file`\n\n4\n## Other\nYou could always use awk to get the same result, but I wanted to work on a simple project and use Click for command line arguments.\n\n`\u003e awk -F '|' '{print NF}' sample_file`\n\n4\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbradleyhurley%2Fccount","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbradleyhurley%2Fccount","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbradleyhurley%2Fccount/lists"}