{"id":13861713,"url":"https://github.com/functionreturnfunction/format-table","last_synced_at":"2025-07-14T09:33:06.301Z","repository":{"id":139502447,"uuid":"159707475","full_name":"functionreturnfunction/format-table","owner":"functionreturnfunction","description":"Parse and reformat tabular data in emacs.","archived":false,"fork":false,"pushed_at":"2019-02-02T01:53:39.000Z","size":77,"stargazers_count":8,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-08-05T06:03:53.107Z","etag":null,"topics":["emacs","json","library","sql"],"latest_commit_sha":null,"homepage":null,"language":"Emacs Lisp","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/functionreturnfunction.png","metadata":{"files":{"readme":"README.org","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}},"created_at":"2018-11-29T18:06:51.000Z","updated_at":"2023-12-06T01:21:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"a7d34b61-4c2b-4f63-a591-e799998455f3","html_url":"https://github.com/functionreturnfunction/format-table","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/functionreturnfunction%2Fformat-table","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/functionreturnfunction%2Fformat-table/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/functionreturnfunction%2Fformat-table/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/functionreturnfunction%2Fformat-table/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/functionreturnfunction","download_url":"https://codeload.github.com/functionreturnfunction/format-table/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225968857,"owners_count":17553147,"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":["emacs","json","library","sql"],"created_at":"2024-08-05T06:01:28.625Z","updated_at":"2024-11-22T21:31:01.501Z","avatar_url":"https://github.com/functionreturnfunction.png","language":"Emacs Lisp","readme":"* format-table [[https://travis-ci.org/functionreturnfunction/format-table][https://travis-ci.org/functionreturnfunction/format-table.png?branch=master]] [[https://coveralls.io/github/functionreturnfunction/format-table][https://img.shields.io/coveralls/github/functionreturnfunction/format-table/master.svg]] [[http://melpa.org/#/format-table][https://melpa.org/packages/format-table-badge.svg]]\nEmacs can access many RDBMS systems via their command-line utilities using SQLi/comint, however each utility has its own output format for tables and affected row counts.  This library allows for conversion between the output formats of many common RDBMS systems, as well as org tables and json.\n\n** Usage\n\n#+BEGIN_SRC emacs-lisp\n(format-table string-containing-table input-mode-to-match-string desired-output-mode)\n#+END_SRC\n\nFor instance, to reformat an org-mode table, do the following:\n#+BEGIN_SRC emacs-lisp\n(let ((to-format\n\"\n| Foo | Bar |\n|-----+-----|\n|   1 |   2 |\n|   3 |   4 |\"))\n  (format-table to-format 'org 'mysql))\n#+END_SRC\n\nWhich will render the following output:\n#+BEGIN_SRC\n+-----+-----+\n| Foo | Bar |\n+-----+-----+\n| 1   | 2   |\n| 3   | 4   |\n+-----+-----+\n2 rows in set (0.00 sec)\n#+END_SRC\n\n** Supported Formats\n\nThe following input/output formats are currently supported:\n- ms\n- org\n- mysql\n- postgresql\n- json\n\nNew formats can be added by adding them to `format-table-format-alist' at runtime.\n\n*** JSON note\n\nCurrently only exporting/importing arrays of hashes is supported.  For instance, that previous org table:\n\n#+BEGIN_SRC emacs-lisp\n(let ((to-format\n\"\n| Foo | Bar |\n|-----+-----|\n|   1 |   2 |\n|   3 |   4 |\"))\n  (format-table to-format 'org 'json))\n#+END_SRC\n\nWill render as:\n#+BEGIN_SRC javascript\n[{\"Foo\":\"1\",\"Bar\":\"2\"},{\"Foo\":\"3\",\"Bar\":\"4\"}]\n#+END_SRC\n","funding_links":[],"categories":["Emacs Lisp"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffunctionreturnfunction%2Fformat-table","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffunctionreturnfunction%2Fformat-table","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffunctionreturnfunction%2Fformat-table/lists"}