{"id":16722184,"url":"https://github.com/tkluck/text-csv-flatten","last_synced_at":"2025-03-15T13:21:18.064Z","repository":{"id":147863965,"uuid":"50795002","full_name":"tkluck/Text-CSV-Flatten","owner":"tkluck","description":"Transform hierarchical data (nested arrays/hashes) to comma-separated value (csv) output according to a compact, readable, user-specified pattern","archived":false,"fork":false,"pushed_at":"2016-03-16T17:25:23.000Z","size":20,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-22T03:32:58.383Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Perl","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/tkluck.png","metadata":{"files":{"readme":"README","changelog":"Changes","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-01-31T21:01:14.000Z","updated_at":"2016-05-31T02:05:32.000Z","dependencies_parsed_at":"2023-05-27T18:15:31.956Z","dependency_job_id":null,"html_url":"https://github.com/tkluck/Text-CSV-Flatten","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkluck%2FText-CSV-Flatten","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkluck%2FText-CSV-Flatten/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkluck%2FText-CSV-Flatten/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkluck%2FText-CSV-Flatten/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tkluck","download_url":"https://codeload.github.com/tkluck/Text-CSV-Flatten/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243733335,"owners_count":20339026,"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":[],"created_at":"2024-10-12T22:33:57.059Z","updated_at":"2025-03-15T13:21:18.057Z","avatar_url":"https://github.com/tkluck.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"Text-CSV-Flatten version 0.04\n=============================\n\nThis module transforms hierarchical data (nested arrays/hashes) to\ncomma-separated value (csv) output according to a compact, readable,\nuser-specified pattern.\n\nFor example, the pattern '.\u003cindex\u003e.*' transforms a data structure\nof the form\n\n    [{ a =\u003e 1, b =\u003e 2 }, { a =\u003e 3, b =\u003e 4 }]\n\nto the CSV output\n\n    a,b,index\n    1,2,0\n    3,4,1\n\nThe pattern '.*.*' applied to the same data gives the output\n\n    0_a,0_b,1_a,1_b\n    1,2,3,4\n\nThe pattern '.*.\u003ckey\u003e' gives the output\n\n    0,1,key\n    1,3,a\n    2,4,b\n\nIt is hoped that the pattern specification is sufficiently powerful for this\nmodule to replace a lot of simple boiler-plate data transformations.\n\nPATTERN SPECIFICATION\n---------------------\n\nThe dot-separated components represent the following:\n\n- `\u003cname\u003e` represents that the keys at that position should be put in a column\n  named name in the csv output. The values belonging to those keys become rows;\n- `*` represents that the keys at that position in the pattern should be\n  interpreted as column names; their values should be the values for that\n  column, all beloning to the same row;\n- `{column_name}` or `{column_name_1,column_name_2,...}` is similar to `*`, but\n  instead of capturing all the keys at that level of the hierarchy, it only\n  captures the named columns.\n- anything else represents a literal key name.\n- If your pattern does not contain `*` or `{...}`, you need to pass an\n  additional `column_name =\u003e` parameter to the constructor to specify the name\n  for the single column where the value will go.\n\nFor the purposes of this description, an array should be seen as a collection\nof index =\u003e value pairs.\n\nIt is possible to specify several dot-separated paths in a single pattern,\nseparated by spaces. In that case, all the paths need to have the same primary\nkey (that is, the same set of names in `\u003c...\u003e`). Rows will be formed by joining\nthe columns resulting from the different paths.\n\nINSTALLATION\n------------\n\nTo install this module type the following:\n\n   perl Makefile.PL\n   make\n   make test\n   make install\n\nDEPENDENCIES\n------------\n\nThis module requires these other modules and libraries:\n\n  JSON\n  Text::CSV\n\nCOPYRIGHT AND LICENCE\n---------------------\n\nCopyright (C) 2016 by Timo Kluck\n\nThis library is free software; you can redistribute it and/or modify\nit under the same terms as Perl itself, either Perl version 5.22.1 or,\nat your option, any later version of Perl 5 you may have available.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftkluck%2Ftext-csv-flatten","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftkluck%2Ftext-csv-flatten","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftkluck%2Ftext-csv-flatten/lists"}