{"id":19221422,"url":"https://github.com/reflexe/convert_table_to_json","last_synced_at":"2025-05-13T02:14:54.611Z","repository":{"id":60677300,"uuid":"72204738","full_name":"Reflexe/convert_table_to_json","owner":"Reflexe","description":"Convert text tables to JSON document","archived":false,"fork":false,"pushed_at":"2017-10-16T19:53:33.000Z","size":10,"stargazers_count":7,"open_issues_count":1,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-13T02:14:48.159Z","etag":null,"topics":["command","json","json-document","python","tables","text","text-processing"],"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/Reflexe.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}},"created_at":"2016-10-28T12:16:48.000Z","updated_at":"2022-10-03T01:09:28.000Z","dependencies_parsed_at":"2022-10-03T02:40:16.831Z","dependency_job_id":null,"html_url":"https://github.com/Reflexe/convert_table_to_json","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Reflexe%2Fconvert_table_to_json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Reflexe%2Fconvert_table_to_json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Reflexe%2Fconvert_table_to_json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Reflexe%2Fconvert_table_to_json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Reflexe","download_url":"https://codeload.github.com/Reflexe/convert_table_to_json/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253856666,"owners_count":21974582,"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":["command","json","json-document","python","tables","text","text-processing"],"created_at":"2024-11-09T14:42:20.177Z","updated_at":"2025-05-13T02:14:54.583Z","avatar_url":"https://github.com/Reflexe.png","language":"Python","readme":"## Table To Json\nConvert text tables to a json document.\n\n## Usage\n```$ ./convert_to_json.py (index=[name],...) (file,...) --delim=delim[:min[-max]],...```\n\n* *index*:  the table column index to print, begins from 0. Can be combined with '=' to \n            define a name for this index. If equal to '\\*', all indexes will be accepted\n            (you can combine '\\*' with regular indexes).\n\n* *file*:   one or more file names to read from. The default is stdin.\n\n* *delim*:  One or more string delimiter of the table seperated by comma (,). Can be combined be ':' and\n            a minimum delimiter repeat count, and (optional) '-' and maximum delimiter repeat count. The default minimum\n            number is 1, the default maximum number is infinite. \n\n## Examples\nParse a CSV [file](https://github.com/Reflexe/convert_table_to_json/blob/master/Data/example.csv):\n```\n$ ./convert_to_json.py '0=Name,1=UserName,3=Phone' Data/names.csv --delim='\\,'\n[{\"Phone\": \"1234\", \"UserName\": \"Jim1\", \"Name\": \"Jimmy\"}, {\"Phone\": \"0000\", \"UserName\": \"TheHacker^\", \"Name\": \"John\"}, {\"Phone\": \"1111\", \"UserName\": \"r00x\", \"Name\": \"Jack\"}]\n```\nParse the linux `ss` command output and get the currently open tcp sessions:\n```\n$ ss --tcp | ./convert_to_json.py '0=State,3=LocalAddressPort,4=RemoteAddrPort'\n[{\"State\": \"ESTAB\", \"LocalAddressPort\": \"10.0.0.2:42554\", \"RemoteAddrPort\": \"x.x.x.x:https\"}]\n```\n\n### Have fun! :smile:\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freflexe%2Fconvert_table_to_json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freflexe%2Fconvert_table_to_json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freflexe%2Fconvert_table_to_json/lists"}