{"html_url": "https://github.com/simonw/sqlite-utils/issues/578#issuecomment-1648323482", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/578", "id": 1648323482, "node_id": "IC_kwDOCGYnMM5iP2ua", "user": {"value": 9599, "label": "simonw"}, "created_at": "2023-07-24T17:31:56Z", "updated_at": "2023-07-24T17:31:56Z", "author_association": "OWNER", "body": "The main blocker here is coming up with a design. The challenge is cleanly integrating it with the existing format options:\r\n\r\nhttps://github.com/simonw/sqlite-utils/blob/8bee14588687b66c54c7a3dfae5de2f9cc7cac3f/docs/cli-reference.rst#L114-L132\r\n\r\nI'd like to avoid breaking backwards compatibility.\r\n\r\nThe most obvious solution is to add a `--format x` option. This is slightly confusing as `--fmt` already exists.\r\n\r\nOr... `--fmt` could be enhanced to handle plugins too - and the existing set of formats (from the `tabulate` integration) could be refactored to use the new hook.\r\n\r\nIf I ever do release `sqlite-utils 4` I'm tempted to move that tabulate stuff into a plugin.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1818838294, "label": "Plugin hook for adding new output formats"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/578#issuecomment-1648324312", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/578", "id": 1648324312, "node_id": "IC_kwDOCGYnMM5iP27Y", "user": {"value": 9599, "label": "simonw"}, "created_at": "2023-07-24T17:32:21Z", "updated_at": "2023-07-24T17:32:21Z", "author_association": "OWNER", "body": "I'm currently leaning very slightly towards `--format geojson` - and explaining in the docs that `--format` is for formats added by plugins.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1818838294, "label": "Plugin hook for adding new output formats"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/578#issuecomment-1648325682", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/578", "id": 1648325682, "node_id": "IC_kwDOCGYnMM5iP3Qy", "user": {"value": 9599, "label": "simonw"}, "created_at": "2023-07-24T17:33:10Z", "updated_at": "2023-07-24T17:33:10Z", "author_association": "OWNER", "body": "A related feature would be support for plugins to add new ways of _ingesting_ data - currently `sqlite-utils insert` works against JSON, newline-JSON, CSV and TSV.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1818838294, "label": "Plugin hook for adding new output formats"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/578#issuecomment-1648339661", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/578", "id": 1648339661, "node_id": "IC_kwDOCGYnMM5iP6rN", "user": {"value": 25778, "label": "eyeseast"}, "created_at": "2023-07-24T17:44:30Z", "updated_at": "2023-07-24T17:44:30Z", "author_association": "CONTRIBUTOR", "body": "> A related feature would be support for plugins to add new ways of ingesting data - currently sqlite-utils insert works against JSON, newline-JSON, CSV and TSV.\r\n\r\nThis is my goal, to have one plugin that handles input and output symmetrically. I'd like to be able to do something like this:\r\n\r\n```sh\r\nsqlite-utils insert data.db table file.geojson --format geojson\r\n# ... explore and manipulate in Datasette\r\nsqlite-utils query data.db ... --format geojson > output.geojson\r\n```\r\n\r\nThis would work especially well with [datasette-query-files](https://github.com/eyeseast/datasette-query-files), since I already have the queries I need saved in standalone SQL files.\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1818838294, "label": "Plugin hook for adding new output formats"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/578#issuecomment-1668113177", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/578", "id": 1668113177, "node_id": "IC_kwDOCGYnMM5jbWMZ", "user": {"value": 25778, "label": "eyeseast"}, "created_at": "2023-08-07T15:41:49Z", "updated_at": "2023-08-07T15:41:49Z", "author_association": "CONTRIBUTOR", "body": "I wonder if this should be two hooks: input and output. The current `--csv` (and `--tsv`) options apply to both. Haven't looked at how it's implemented. Or maybe it's one hook that returns a format for reading and for writing.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1818838294, "label": "Plugin hook for adding new output formats"}, "performed_via_github_app": null}