{"html_url": "https://github.com/simonw/datasette/issues/904#issuecomment-712524699", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/904", "id": 712524699, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMjUyNDY5OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T01:04:12Z", "updated_at": "2020-10-20T01:04:12Z", "author_association": "OWNER", "body": "Documentation is https://docs.datasette.io/en/latest/writing_plugins.html#building-urls-within-plugins and https://docs.datasette.io/en/latest/internals.html#internals-datasette-urls", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 663228985, "label": "datasette.urls.table() / .instance() / .database() methods for constructing URLs, also exposed to templates"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1025#issuecomment-712525557", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1025", "id": 712525557, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMjUyNTU1Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T01:07:02Z", "updated_at": "2020-10-20T01:07:02Z", "author_association": "OWNER", "body": "I fixed the `queries.html` one. I'm not going to fix these two:\r\n```\r\ndatasette/templates/error.html: home\r\ndatasette/templates/patterns.html: home /\r\n```\r\nBecause the `error.html` one does not get passed a context (which makes sense since an error has occurred) and the pattern portfolio doesn't need to link to anywhere in particular.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 722724086, "label": "Fix last remaining links to \"/\" that do not respect base_url"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1033#issuecomment-712529413", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1033", "id": 712529413, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMjUyOTQxMw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T01:21:12Z", "updated_at": "2020-10-20T01:21:12Z", "author_association": "OWNER", "body": "Also refs #1023", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725099777, "label": "datasette.urls.static_plugins(...) method"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1025#issuecomment-712579674", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1025", "id": 712579674, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMjU3OTY3NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T04:24:10Z", "updated_at": "2020-10-20T04:24:10Z", "author_association": "OWNER", "body": "Changed my mind, `error.html` needs access to `urls` in order to link to its CSS file. Passing it after all (it already got passed `ds.config(\"base_url\")` so `ds` was available previously).", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 722724086, "label": "Fix last remaining links to \"/\" that do not respect base_url"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1034#issuecomment-712580976", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1034", "id": 712580976, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMjU4MDk3Ng==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T04:29:23Z", "updated_at": "2020-10-20T04:29:23Z", "author_association": "OWNER", "body": "Most obvious option is base64. Any other potential solutions I'm missing?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725184645, "label": "Better way of representing binary data in .csv output"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1034#issuecomment-712581994", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1034", "id": 712581994, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMjU4MTk5NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T04:33:28Z", "updated_at": "2020-10-20T04:33:28Z", "author_association": "OWNER", "body": "The [datasette-render-binary](https://github.com/simonw/datasette-render-binary) plugin does this, which I really like - but without the different coloured fonts I'm not sure how readable it would be as just plain text:\r\n\r\n![image](https://user-images.githubusercontent.com/9599/96540435-9c125f00-1252-11eb-85aa-5fc8d0e63728.png)\r\n\r\nReally the goal here is to find the most human-friendly option, so that people looking at the output have a vague idea what's going on. That's why I'm not leaping at the chance to use base64.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725184645, "label": "Better way of representing binary data in .csv output"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1034#issuecomment-712582699", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1034", "id": 712582699, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMjU4MjY5OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T04:36:04Z", "updated_at": "2020-10-20T04:36:14Z", "author_association": "OWNER", "body": "Asked for ideas on Twitter: https://twitter.com/simonw/status/1318409558805467136", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725184645, "label": "Better way of representing binary data in .csv output"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/782#issuecomment-712585921", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/782", "id": 712585921, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMjU4NTkyMQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T04:48:01Z", "updated_at": "2020-10-20T04:48:01Z", "author_association": "OWNER", "body": "I'll update `datasette-json-preview` with that now.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 627794879, "label": "Redesign default .json format"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/782#issuecomment-712590398", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/782", "id": 712590398, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMjU5MDM5OA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T05:03:46Z", "updated_at": "2020-10-20T05:04:09Z", "author_association": "OWNER", "body": "OK, https://latest-with-plugins.datasette.io/ is running that now - e.g. https://latest-with-plugins.datasette.io/fixtures/roadside_attractions.json-preview or https://latest-with-plugins.datasette.io/fixtures/compound_three_primary_keys.json-preview\r\n\r\n```json\r\n{\r\n \"rows\": [\r\n {\r\n \"pk\": 1,\r\n \"name\": \"The Mystery Spot\",\r\n \"address\": \"465 Mystery Spot Road, Santa Cruz, CA 95065\",\r\n \"latitude\": 37.0167,\r\n \"longitude\": -122.0024\r\n },\r\n {\r\n \"pk\": 2,\r\n \"name\": \"Winchester Mystery House\",\r\n \"address\": \"525 South Winchester Boulevard, San Jose, CA 95128\",\r\n \"latitude\": 37.3184,\r\n \"longitude\": -121.9511\r\n },\r\n {\r\n \"pk\": 3,\r\n \"name\": \"Burlingame Museum of PEZ Memorabilia\",\r\n \"address\": \"214 California Drive, Burlingame, CA 94010\",\r\n \"latitude\": 37.5793,\r\n \"longitude\": -122.3442\r\n },\r\n {\r\n \"pk\": 4,\r\n \"name\": \"Bigfoot Discovery Museum\",\r\n \"address\": \"5497 Highway 9, Felton, CA 95018\",\r\n \"latitude\": 37.0414,\r\n \"longitude\": -122.0725\r\n }\r\n ],\r\n \"total\": 4,\r\n \"next_url\": null\r\n}\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 627794879, "label": "Redesign default .json format"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1025#issuecomment-712593790", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1025", "id": 712593790, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMjU5Mzc5MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T05:12:36Z", "updated_at": "2020-10-20T05:12:36Z", "author_association": "OWNER", "body": "I'm going to leave the cookies code setting cookies to default to the `\"/\"` top level.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 722724086, "label": "Fix last remaining links to \"/\" that do not respect base_url"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/865#issuecomment-712597762", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/865", "id": 712597762, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMjU5Nzc2Mg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T05:22:59Z", "updated_at": "2020-10-20T05:22:59Z", "author_association": "OWNER", "body": "OK, this is definitely working now.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 644582921, "label": "base_url doesn't seem to work when adding criteria and clicking \"apply\""}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/838#issuecomment-712604364", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/838", "id": 712604364, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMjYwNDM2NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T05:39:15Z", "updated_at": "2020-10-20T05:39:15Z", "author_association": "OWNER", "body": "OK, I've made a ton of improvements to how the `base_url` setting works - see tickets linked from #1023. I've just pushed out an alpha release with those changes in it: https://github.com/simonw/datasette/releases/tag/0.51a0\r\n\r\n@tsibley @tballison @ChristopherWilks I'd really appreciate your help testing this alpha! \r\n\r\nYou can install it with:\r\n\r\n pip install datasette==0.51a0\r\n\r\nIt should work with just `ProxyPass`, without needing the `ProxyPassReverse` setting.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 637395097, "label": "Incorrect URLs when served behind a proxy with base_url set"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1023#issuecomment-712604541", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1023", "id": 712604541, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMjYwNDU0MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T05:39:44Z", "updated_at": "2020-10-20T05:39:44Z", "author_association": "OWNER", "body": "Here's the alpha with most of this work ready for people to preview: https://github.com/simonw/datasette/releases/tag/0.51a0", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 722673818, "label": "Fix issues relating to base_url"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1026#issuecomment-712607227", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1026", "id": 712607227, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMjYwNzIyNw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T05:46:44Z", "updated_at": "2020-10-20T05:46:44Z", "author_association": "OWNER", "body": "We have a solution for this now: `datasette.urls` from #1033 can be used by plugins to assemble the correct URLs to pass to `.get()` and friends.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 722738988, "label": "How should datasette.client interact with base_url"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1023#issuecomment-712607608", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1023", "id": 712607608, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMjYwNzYwOA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T05:47:42Z", "updated_at": "2020-10-20T05:47:42Z", "author_association": "OWNER", "body": "Requested alpha testers in https://github.com/simonw/datasette/issues/838#issuecomment-712604364", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 722673818, "label": "Fix issues relating to base_url"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/991#issuecomment-712855389", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/991", "id": 712855389, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMjg1NTM4OQ==", "user": {"value": 24740, "label": "furilo"}, "created_at": "2020-10-20T13:36:41Z", "updated_at": "2020-10-20T13:36:41Z", "author_association": "NONE", "body": "Here is one quick sketch (done in Figma :P) for an idea: a possible filter to switch between showing all tables from all databases, or grouping tables by database. \r\n\r\n(the switch is interactive) \r\n\r\nAll tables: https://www.figma.com/proto/BjFrMroEtmVx6EeRjvSrox/Datasette-test?node-id=1%3A2&viewport=536%2C348%2C0.5&scaling=min-zoom\r\n\r\nGrouped: https://www.figma.com/proto/BjFrMroEtmVx6EeRjvSrox/Datasette-test?node-id=3%3A974&viewport=536%2C348%2C0.5&scaling=min-zoom\r\n\r\nWhen only 1 database: https://www.figma.com/proto/BjFrMroEtmVx6EeRjvSrox/Datasette-test?node-id=1%3A162&viewport=536%2C348%2C0.5&scaling=min-zoom\r\n\r\nIs this is useful, I can send some more suggestions/sketches. \r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 714377268, "label": "Redesign application homepage"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1026#issuecomment-712959034", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1026", "id": 712959034, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMjk1OTAzNA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T16:03:33Z", "updated_at": "2020-10-20T16:03:55Z", "author_association": "OWNER", "body": "Reconsidering this: I think the `.get()` etc methods should automatically add the `base_url` prefix for you, since these APIs are only intended to make internal calls.\r\n\r\nThe clincher on this is when I went to add a section to the `datasette.client` documentation recommending you use `datasette.urls.path()` for every call to them that you make.\r\n\r\nBut there's a problem: to handle table name escaping users are likely to want to use `datasette.urls.table()` anyway, like this:\r\n\r\n response = await datasette.client.get(datasette.urls.table(\"db\", \"table\") + \".json\")\r\n\r\nThis risks adding the `base_url` prefix twice. Maybe the `.table()` method could return a string-like object that is marked as already having the `base_url` prefix added, so the `client.get()` method knows not to add it again.\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 722738988, "label": "How should datasette.client interact with base_url"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1026#issuecomment-712962517", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1026", "id": 712962517, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMjk2MjUxNw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T16:09:12Z", "updated_at": "2020-10-20T16:09:12Z", "author_association": "OWNER", "body": "That `datasette.urls.table(\"db\", \"table\") + \".json\"` example is bad because if the table name contains a `.` it should be `?_format=json` instead.\r\n\r\nMaybe `.table()` should have a `format=\"json\"` option that knows how to do this.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 722738988, "label": "How should datasette.client interact with base_url"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1035#issuecomment-712963959", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1035", "id": 712963959, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMjk2Mzk1OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T16:11:25Z", "updated_at": "2020-10-20T16:11:25Z", "author_association": "OWNER", "body": "Relevant code:\r\n\r\nhttps://github.com/simonw/datasette/blob/091441a4449beae559a8c0d007376dc85d3aa624/datasette/utils/__init__.py#L681-L696\r\n\r\nOnly used here:\r\n\r\nhttps://github.com/simonw/datasette/blob/091441a4449beae559a8c0d007376dc85d3aa624/datasette/views/base.py#L498-L502", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725743755, "label": "datasette.urls.table(..., format=\"json\") argument"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1035#issuecomment-712965574", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1035", "id": 712965574, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMjk2NTU3NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T16:13:57Z", "updated_at": "2020-10-20T16:13:57Z", "author_association": "OWNER", "body": "That `renderers[key] = path_with_format(` is in a base class which can be used for both arbitrary queries, canned queries and the table view. I think that's OK, but it means that the `format=\"json\"` argument on `datasette.urls.table()` won't be used by Datasette internally, it will just be available for plugins.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725743755, "label": "datasette.urls.table(..., format=\"json\") argument"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1035#issuecomment-712976314", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1035", "id": 712976314, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMjk3NjMxNA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T16:21:42Z", "updated_at": "2020-10-20T16:21:42Z", "author_association": "OWNER", "body": "Makes me question if `datasette.urls` should grow functionality equivalent to the other path and querystring manipulation methods in `datasette.utils`:\r\n\r\nhttps://github.com/simonw/datasette/blob/66120a7a1cb592e8a21164cf537f62a4d7ab1dfc/datasette/utils/__init__.py#L216-L279", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725743755, "label": "datasette.urls.table(..., format=\"json\") argument"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/782#issuecomment-712986115", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/782", "id": 712986115, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMjk4NjExNQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T16:28:46Z", "updated_at": "2020-10-20T16:29:51Z", "author_association": "OWNER", "body": "I think this all comes down to how the `?_extras=` mechanism works (see #262), as first hinted at in a30c5b220c15360d575e94b0e67f3255e120b916 (see commit message) when I added this long-forgotten undocumented feature: https://latest.datasette.io/fixtures/attraction_characteristic/2.json?_extras=foreign_key_tables\r\n\r\nExtras need to be able to execute additional SQL, since that would solve the problem we have now where the expensive \"suggested facets\" code runs on all `.json` output even when its results are not being shown.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 627794879, "label": "Redesign default .json format"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/262#issuecomment-712988146", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/262", "id": 712988146, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMjk4ODE0Ng==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T16:32:02Z", "updated_at": "2023-01-17T01:54:13Z", "author_association": "OWNER", "body": "Just realized I added an undocumented `?_extras=` option to the row view years ago and forgot about it - it's not even documented. Added in a30c5b220c15360d575e94b0e67f3255e120b916 - https://latest.datasette.io/fixtures/attraction_characteristic/2.json?_extras=foreign_key_tables\r\n\r\nThat will need to be made consistent with the new mechanism. I think `?_extra=a&_extra=b` is more consistent with other Datasette features (like `?_facet=col1&_facet=col2`) but potentially quite verbose.\r\n\r\nSo I could support `?_extra=a,b,c` as an alternative allowed syntax, or I could allow `?_extra=single` and `?_extras=comma,separated`.\r\n\r\nI think I prefer allowing commas in `?_extra=`.\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 323658641, "label": "Add ?_extra= mechanism for requesting extra properties in JSON"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/262#issuecomment-713170284", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/262", "id": 713170284, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMzE3MDI4NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T22:13:01Z", "updated_at": "2020-10-20T22:13:01Z", "author_association": "OWNER", "body": "In the documentation for `?_extra=` I think I'll emphasize the comma-separated version of it. Also: there will be `?_extra=` values which act as aliases for collection combinations - e.g. `?_extra=full` will toggle everything.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 323658641, "label": "Add ?_extra= mechanism for requesting extra properties in JSON"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/262#issuecomment-713170979", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/262", "id": 713170979, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMzE3MDk3OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T22:14:37Z", "updated_at": "2020-10-20T22:14:37Z", "author_association": "OWNER", "body": "I think it's worth having a plugin hook for this - it can be same hook that is used internally. Maybe `register_extra` - it lets you return one or more `extra` implementations, each with a name and an async function that gets called.\r\n\r\nThings like suggested facets will become `register_extra` hooks. Maybe actual facets too?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 323658641, "label": "Add ?_extra= mechanism for requesting extra properties in JSON"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/741#issuecomment-713171742", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/741", "id": 713171742, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMzE3MTc0Mg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T22:16:25Z", "updated_at": "2020-10-20T22:16:25Z", "author_association": "OWNER", "body": "See also #992 which will rename `--config` to `--setting`.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 607223136, "label": "Replace \"datasette publish --extra-options\" with \"--setting\""}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1034#issuecomment-713172901", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1034", "id": 713172901, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMzE3MjkwMQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T22:19:10Z", "updated_at": "2020-10-20T22:20:28Z", "author_association": "OWNER", "body": "I could go with the same format as `datasette-render-binary` but using `0x00` as the format for the hex bytes.\r\n\r\n 0x15 0x1C 0x02 0xC7 JFIF 0x00 0x01\r\n\r\nProblem with this is that it's ambiguous: if the ASCII characters `0x15` occur in the text they will be indistinguishable from those hex bytes.\r\n\r\nBut since representing binary data in CSV fundamentally doesn't make sense I'm not sure if that really matters.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725184645, "label": "Better way of representing binary data in .csv output"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1034#issuecomment-713174341", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1034", "id": 713174341, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMzE3NDM0MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T22:22:53Z", "updated_at": "2020-10-20T22:23:14Z", "author_association": "OWNER", "body": "An even easier option: do what the Datasette UI does and output `` for that CSV cell, as seen on https://latest.datasette.io/fixtures/binary_data", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725184645, "label": "Better way of representing binary data in .csv output"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1034#issuecomment-713174690", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1034", "id": 713174690, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMzE3NDY5MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T22:23:50Z", "updated_at": "2020-10-20T22:23:50Z", "author_association": "OWNER", "body": "Or... default to `` and support a `?_base64=1` option which outputs in base64 instead.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725184645, "label": "Better way of representing binary data in .csv output"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1034#issuecomment-713175741", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1034", "id": 713175741, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMzE3NTc0MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T22:26:45Z", "updated_at": "2020-10-20T22:26:45Z", "author_association": "OWNER", "body": "> New idea: since binary in CSV doesn't make sense anyway, emulate Datasette's HTML UI default and output this:\r\n> \r\n> id,title,data\r\n> 1,Some title,\r\n> 2,Other title,\r\n> \r\n> Then allow users to add ?_base64=1 to the URL to get base64 instead\r\n> https://twitter.com/simonw/status/1318679950635888641", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725184645, "label": "Better way of representing binary data in .csv output"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1034#issuecomment-713176082", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1034", "id": 713176082, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMzE3NjA4Mg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T22:27:33Z", "updated_at": "2020-10-20T22:27:33Z", "author_association": "OWNER", "body": "This feels good to me - it's consistent with how other features in Datasette work, and it means users who need the binary data in CSV (for whatever reason) can get it if they want to.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725184645, "label": "Better way of representing binary data in .csv output"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1036#issuecomment-713183306", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1036", "id": 713183306, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMzE4MzMwNg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T22:48:10Z", "updated_at": "2020-10-20T22:48:10Z", "author_association": "OWNER", "body": "Twitter thread: https://twitter.com/dancow/status/1318681053347840005", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725996507, "label": "Make it possible to download BLOB data from the Datasette UI"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1036#issuecomment-713184374", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1036", "id": 713184374, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMzE4NDM3NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T22:51:22Z", "updated_at": "2020-10-20T22:51:22Z", "author_association": "OWNER", "body": "From https://hackerone.com/reports/126197:\r\n\r\n> archive.uber.com mirrors pypi. When downloading `.tar.gz` files from archive.uber.com, the MIME type is `application/octet-stream`. Injecting `` into the start of the `.tar.gz` causes an XSS in Internet Explorer due to MIME sniffing.\r\n\r\nSo you do have to be careful not to open accidental XSS holes with `application/octet-stream` thanks to (presumably older) versions of IE.\r\n\r\nFrom that thread it looks like the solution is to add a `X-Content-Type-Options: nosniff` header.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725996507, "label": "Make it possible to download BLOB data from the Datasette UI"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1036#issuecomment-713185173", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1036", "id": 713185173, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMzE4NTE3Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T22:53:41Z", "updated_at": "2020-10-20T22:53:41Z", "author_association": "OWNER", "body": "https://security.stackexchange.com/questions/12896/does-x-content-type-options-really-prevent-content-sniffing-attacks says:\r\n\r\n> In Tangled Web Michal Zalewski says:\r\n> \r\n> > Refrain from using Content-Type: application/octet-stream and use application/binary instead, especially for unknown document types. Refrain from returning Content-Type: text/plain.\r\n> > \r\n> > For example, any code-hosting platform must exercise caution when returning executables or source archives as application/octet-stream, because there is a risk they may be misinterpreted as HTML and displayed inline.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725996507, "label": "Make it possible to download BLOB data from the Datasette UI"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1036#issuecomment-713185871", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1036", "id": 713185871, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMzE4NTg3MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T22:55:36Z", "updated_at": "2020-10-20T22:55:36Z", "author_association": "OWNER", "body": "I can also use a `Content-Disposition` header to force a download. I'm reasonably confident that the combination of `Content-Disposition` and `X-Content-Type-Options: nosniff` and `application/binary` will let me allow users to download the contents of arbitrary BLOB columns without any XSS risk.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725996507, "label": "Make it possible to download BLOB data from the Datasette UI"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1036#issuecomment-713186189", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1036", "id": 713186189, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMzE4NjE4OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T22:56:33Z", "updated_at": "2020-10-20T22:56:33Z", "author_association": "OWNER", "body": "I think this plus the binary-CSV stuff in #1034 will justify a dedicated section of the documentation to talk about how Datasette handles binary BLOB columns.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725996507, "label": "Make it possible to download BLOB data from the Datasette UI"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1034#issuecomment-713191819", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1034", "id": 713191819, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMzE5MTgxOQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T23:12:58Z", "updated_at": "2020-10-20T23:12:58Z", "author_association": "OWNER", "body": "Enzo has a great solution here: https://twitter.com/enzo_mdd/status/1318685442976436226\r\n\r\n> Or maybe an option for a url. This keeps the CSV small but allows scripts to download binary data as needed.\r\n\r\nIn #1036 I'm planning on adding a way for users to access BLOB data. I can include that URL in the CSV output.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725184645, "label": "Better way of representing binary data in .csv output"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/262#issuecomment-713200782", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/262", "id": 713200782, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMzIwMDc4Mg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T23:41:30Z", "updated_at": "2020-10-20T23:41:30Z", "author_association": "OWNER", "body": "This is now blocking https://github.com/simonw/datasette-graphql/issues/61 because that issue needs a way to turn off suggested facets when retrieving the results of a table query.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 323658641, "label": "Add ?_extra= mechanism for requesting extra properties in JSON"}, "performed_via_github_app": null}