{"html_url": "https://github.com/simonw/datasette/issues/1439#issuecomment-1060044007", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1439", "id": 1060044007, "node_id": "IC_kwDOBm6k_c4_Lvzn", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-03-06T21:38:15Z", "updated_at": "2022-03-06T21:38:15Z", "author_association": "OWNER", "body": "Test: https://github.com/simonw/datasette/blob/d2e3fe3facf0ed0abf8b00cd54463af90dd6904d/tests/test_utils.py#L651-L666\r\n\r\nOne big advantage to this scheme is that redirecting old links to `%2F` pages (e.g. https://fivethirtyeight.datasettes.com/fivethirtyeight/twitter-ratio%2Fsenators) is easy - if you see a `%` in the `raw_path`, redirect to that page with the `%` replaced by `-`.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 973139047, "label": "Rethink how .ext formats (v.s. ?_format=) works before 1.0"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1439#issuecomment-1059903309", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1439", "id": 1059903309, "node_id": "IC_kwDOBm6k_c4_LNdN", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-03-06T06:17:51Z", "updated_at": "2022-03-06T06:17:51Z", "author_association": "OWNER", "body": "Suggestion from a conversation with Seth Michael Larson: it would be neat if plugins could easily integrate with whatever scheme this ends up using, maybe with the `/db/table/-/plugin-name` standardized pattern or similar.\r\n\r\nMaking it easy for plugins to do the right, consistent thing is a good idea.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 973139047, "label": "Rethink how .ext formats (v.s. ?_format=) works before 1.0"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1439#issuecomment-1059864154", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1439", "id": 1059864154, "node_id": "IC_kwDOBm6k_c4_LD5a", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-03-06T00:59:04Z", "updated_at": "2022-03-06T00:59:04Z", "author_association": "OWNER", "body": "Needs more testing, but this seems to work for decoding the percent-escaped-with-dashes format: `urllib.parse.unquote(s.replace('-', '%'))`", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 973139047, "label": "Rethink how .ext formats (v.s. ?_format=) works before 1.0"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1439#issuecomment-1059863997", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1439", "id": 1059863997, "node_id": "IC_kwDOBm6k_c4_LD29", "user": {"value": 505230, "label": "karlcow"}, "created_at": "2022-03-06T00:57:57Z", "updated_at": "2022-03-06T00:57:57Z", "author_association": "NONE", "body": "Probably too late\u2026 but I have just seen this because \r\nhttp://simonwillison.net/2022/Mar/5/dash-encoding/#atom-everything\r\n\r\nAnd it reminded me of comma tools at W3C.\r\nhttp://www.w3.org/,tools\r\n\r\nExample, the text version of W3C homepage\r\nhttps://www.w3.org/,text\r\n\r\n\r\n> The challenge comes down to telling the difference between the following:\r\n> \r\n> * `/db/table` - an HTML table page\r\n\r\n`/db/table`\r\n\r\n> * `/db/table.csv` - the CSV version of `/db/table`\r\n\r\n`/db/table,csv`\r\n\r\n> * `/db/table.csv` - no this one is actually a database table called `table.csv`\r\n\r\n`/db/table.csv`\r\n\r\n> * `/db/table.csv.csv` - the CSV version of `/db/table.csv`\r\n\r\n`/db/table.csv,csv`\r\n\r\n> * `/db/table.csv.csv.csv` and so on...\r\n\r\n`/db/table.csv.csv,csv`\r\n\r\n\r\nI haven't checked all the cases in the thread.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 973139047, "label": "Rethink how .ext formats (v.s. ?_format=) works before 1.0"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1439#issuecomment-1059855418", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1439", "id": 1059855418, "node_id": "IC_kwDOBm6k_c4_LBw6", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-03-06T00:00:53Z", "updated_at": "2022-03-06T00:04:18Z", "author_association": "OWNER", "body": "```python\r\n_ESCAPE_SAFE = frozenset(\r\n b'ABCDEFGHIJKLMNOPQRSTUVWXYZ'\r\n b'abcdefghijklmnopqrstuvwxyz'\r\n b'0123456789_'\r\n)\r\n# I removed b'.-~')\r\n\r\nclass Quoter(dict):\r\n # Keeps a cache internally, via __missing__\r\n def __missing__(self, b):\r\n # Handle a cache miss. Store quoted string in cache and return.\r\n res = chr(b) if b in _ESCAPE_SAFE else '-{:02X}'.format(b)\r\n self[b] = res\r\n return res\r\n\r\nquoter = Quoter().__getitem__\r\n\r\n''.join([quoter(char) for char in b'foo/bar.csv'])\r\n# 'foo-2Fbar-2Ecsv'\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 973139047, "label": "Rethink how .ext formats (v.s. ?_format=) works before 1.0"}, "performed_via_github_app": null}