{"id":20705147,"url":"https://github.com/xepozz/clk-parser","last_synced_at":"2026-05-20T16:39:32.569Z","repository":{"id":234964438,"uuid":"789851060","full_name":"xepozz/clk-parser","owner":"xepozz","description":"Parses *.clk buffers and presents table name, columns and values as separated entities.","archived":false,"fork":false,"pushed_at":"2024-04-21T18:26:38.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-28T10:11:09.525Z","etag":null,"topics":["clickhouse","clk","kittenhouse","parser","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/xepozz.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":"2024-04-21T18:13:53.000Z","updated_at":"2024-04-21T18:25:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"5b032baf-8032-497e-8069-b0c237a34ad9","html_url":"https://github.com/xepozz/clk-parser","commit_stats":null,"previous_names":["xepozz/clk-parser"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/xepozz/clk-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xepozz%2Fclk-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xepozz%2Fclk-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xepozz%2Fclk-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xepozz%2Fclk-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xepozz","download_url":"https://codeload.github.com/xepozz/clk-parser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xepozz%2Fclk-parser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33267100,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-20T15:12:43.734Z","status":"ssl_error","status_checked_at":"2026-05-20T15:12:42.300Z","response_time":356,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["clickhouse","clk","kittenhouse","parser","php"],"created_at":"2024-11-17T01:16:22.114Z","updated_at":"2026-05-20T16:39:32.528Z","avatar_url":"https://github.com/xepozz.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# KittenHouse *.clk files Parser\n\n[![Latest Stable Version](https://poser.pugx.org/xepozz/clk-parser/v/stable.svg)](https://packagist.org/packages/xepozz/clk-parser)\n[![Total Downloads](https://poser.pugx.org/xepozz/clk-parser/downloads.svg)](https://packagist.org/packages/xepozz/clk-parser)\n[![phpunit](https://github.com/xepozz/clk-parser/workflows/PHPUnit/badge.svg)](https://github.com/xepozz/clk-parser/actions)\n[![codecov](https://codecov.io/gh/xepozz/clk-parser/branch/master/graph/badge.svg?token=UREXAOUHTJ)](https://codecov.io/gh/xepozz/clk-parser)\n[![type-coverage](https://shepherd.dev/github/xepozz/clk-parser/coverage.svg)](https://shepherd.dev/github/xepozz/clk-parser)\n\nParses `*.clk` buffers and presents table name, columns and values as separated entities.\n\n## Installation\n\n```shell\ncomposer req xepozz/clk-parser\n```\n\n## Usage\n\n```php\n$parser = new \\Xepozz\\ClkParser\\Parser();\n$result = $parser-\u003eparseContent(file_get_contents('/path/to/file.clk'));\n\n$result-\u003etable // access table name\n$result-\u003ecolumns // access array of column names\n$result-\u003evalues // access iterable values in a pair of column names: [column =\u003e value, ...] \n```\n\n## Example\n\n```php\n$parser = new \\Xepozz\\ClkParser\\Parser();\n\n$result = $parser-\u003eparseContent(\u003c\u003c\u003cTEXT\n# started at 15-Apr-24 08:06:25 # schema.table_name(date,email,event,params)9F9C34E2\n(1111,'email','Startup',[1,2,3]),(2222,'email','Click',[])4CDA8189\n(-1111,'','Shutdown',[-1,'string',3,''])4CDA8189\nTEXT\n);\n```\n\nResult is an object of type `\\Xepozz\\ClkParser\\Result`:\n\n```php\necho $result-\u003etable; \n// schema.table_name\n\nvar_dump($result-\u003ecolumns); \n/**\narray(4) {\n  [0]=\u003e\n  string(4) \"date\"\n  [1]=\u003e\n  string(5) \"email\"\n  [2]=\u003e\n  string(5) \"event\"\n  [3]=\u003e\n  string(6) \"params\"\n}\n*/\n\nvar_dump(iterator_to_array($result-\u003evalues));\n/**\narray(3) {\n  [0]=\u003e\n  array(4) {\n    [\"date\"]=\u003e\n    string(4) \"1111\"\n    [\"email\"]=\u003e\n    string(7) \"'email'\"\n    [\"event\"]=\u003e\n    string(9) \"'Startup'\"\n    [\"params\"]=\u003e\n    string(7) \"[1,2,3]\"\n  }\n  [1]=\u003e\n  array(4) {\n    [\"date\"]=\u003e\n    string(4) \"2222\"\n    [\"email\"]=\u003e\n    string(7) \"'email'\"\n    [\"event\"]=\u003e\n    string(7) \"'Click'\"\n    [\"params\"]=\u003e\n    string(2) \"[]\"\n  }\n  [2]=\u003e\n  array(4) {\n    [\"date\"]=\u003e\n    string(5) \"-1111\"\n    [\"email\"]=\u003e\n    string(2) \"''\"\n    [\"event\"]=\u003e\n    string(10) \"'Shutdown'\"\n    [\"params\"]=\u003e\n    string(18) \"[-1,'string',3,'']\"\n  }\n}\n*/\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxepozz%2Fclk-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxepozz%2Fclk-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxepozz%2Fclk-parser/lists"}