issue_comments
47 rows where issue = 973139047 and user = 9599 sorted by node_id
This data as json, CSV (advanced)
issue 1
- Rethink how .ext formats (v.s. ?_format=) works before 1.0 · 24 ✖
id | html_url | issue_url | node_id ▼ | user | created_at | updated_at | author_association | body | reactions | issue | performed_via_github_app |
---|---|---|---|---|---|---|---|---|---|---|---|
900699670 | https://github.com/simonw/datasette/issues/1439#issuecomment-900699670 | https://api.github.com/repos/simonw/datasette/issues/1439 | IC_kwDOBm6k_c41r5YW | simonw 9599 | 2021-08-17T23:34:23Z | 2021-08-17T23:34:23Z | OWNER | The challenge comes down to telling the difference between the following:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Rethink how .ext formats (v.s. ?_format=) works before 1.0 973139047 | |
900705226 | https://github.com/simonw/datasette/issues/1439#issuecomment-900705226 | https://api.github.com/repos/simonw/datasette/issues/1439 | IC_kwDOBm6k_c41r6vK | simonw 9599 | 2021-08-17T23:50:32Z | 2021-08-17T23:50:47Z | OWNER | An alternative solution would be to use some form of escaping for the characters that form the name of the table. The obvious way to do this would be URL-encoding - but it doesn't hold for ``` Against Cloud Run:curl -s 'https://datasette.io/-/asgi-scope/foo/bar%2Fbaz%2E' | rg path 'path': '/-/asgi-scope/foo/bar/baz.', 'raw_path': b'/-/asgi-scope/foo/bar%2Fbaz.', 'root_path': '', Against Vercel:curl -s 'https://til.simonwillison.net/-/asgi-scope/foo/bar%2Fbaz%2E' | rg path 'path': '/-/asgi-scope/foo/bar%2Fbaz%2E', 'raw_path': b'/-/asgi-scope/foo/bar%2Fbaz%2E', 'root_path': '', ``` Surprisingly in this case Vercel DOES keep it intact, but Cloud Run does not. It's still no good though: I need a solution that works on Vercel, Cloud Run and every other potential hosting provider too. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Rethink how .ext formats (v.s. ?_format=) works before 1.0 973139047 | |
900709703 | https://github.com/simonw/datasette/issues/1439#issuecomment-900709703 | https://api.github.com/repos/simonw/datasette/issues/1439 | IC_kwDOBm6k_c41r71H | simonw 9599 | 2021-08-18T00:03:09Z | 2021-08-18T00:03:09Z | OWNER | But... what if I invent my own escaping scheme? I actually did this once before, in https://github.com/simonw/datasette/commit/9fdb47ca952b93b7b60adddb965ea6642b1ff523 - while I was working on porting Datasette to ASGI in https://github.com/simonw/datasette/issues/272#issuecomment-494192779 because ASGI didn't yet have the I could bring that back - it looked like this:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Rethink how .ext formats (v.s. ?_format=) works before 1.0 973139047 | |
900711967 | https://github.com/simonw/datasette/issues/1439#issuecomment-900711967 | https://api.github.com/repos/simonw/datasette/issues/1439 | IC_kwDOBm6k_c41r8Yf | simonw 9599 | 2021-08-18T00:08:09Z | 2021-08-18T00:08:09Z | OWNER | Here's an alternative I just made up which I'm calling "dot dash" encoding: ```python def dot_dash_encode(s): return s.replace("-", "--").replace(".", "-.") def dot_dash_decode(s):
return s.replace("-.", ".").replace("--", "-")
hello.csv hello-.csv True hello-and-so-on.csv hello--and--so--on-.csv True hello-.csv hello---.csv True hello--and--so--on-.csv hello----and----so----on---.csv True hello.csv. hello-.csv-. True hello.csv.- hello-.csv-.-- True hello.csv.-- hello-.csv-.---- True ``` |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Rethink how .ext formats (v.s. ?_format=) works before 1.0 973139047 | |
900712981 | https://github.com/simonw/datasette/issues/1439#issuecomment-900712981 | https://api.github.com/repos/simonw/datasette/issues/1439 | IC_kwDOBm6k_c41r8oV | simonw 9599 | 2021-08-18T00:09:59Z | 2021-08-18T00:12:32Z | OWNER | So given the original examples, a table called
And if for some horific reason you had a table with the name
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Rethink how .ext formats (v.s. ?_format=) works before 1.0 973139047 | |
900714630 | https://github.com/simonw/datasette/issues/1439#issuecomment-900714630 | https://api.github.com/repos/simonw/datasette/issues/1439 | IC_kwDOBm6k_c41r9CG | simonw 9599 | 2021-08-18T00:13:33Z | 2021-08-18T00:13:33Z | OWNER | The documentation should definitely cover how table names become URLs, in case any third party code needs to be able to calculate this themselves. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Rethink how .ext formats (v.s. ?_format=) works before 1.0 973139047 | |
900715375 | https://github.com/simonw/datasette/issues/1439#issuecomment-900715375 | https://api.github.com/repos/simonw/datasette/issues/1439 | IC_kwDOBm6k_c41r9Nv | simonw 9599 | 2021-08-18T00:15:28Z | 2021-08-18T00:15:28Z | OWNER | Maybe I should use |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Rethink how .ext formats (v.s. ?_format=) works before 1.0 973139047 | |
1031141849 | https://github.com/simonw/datasette/issues/1439#issuecomment-1031141849 | https://api.github.com/repos/simonw/datasette/issues/1439 | IC_kwDOBm6k_c49dfnZ | simonw 9599 | 2022-02-07T07:11:11Z | 2022-02-07T07:11:11Z | OWNER | I added a Link header to solve this problem for the JSON version in: - #1533 |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Rethink how .ext formats (v.s. ?_format=) works before 1.0 973139047 | |
1059802318 | https://github.com/simonw/datasette/issues/1439#issuecomment-1059802318 | https://api.github.com/repos/simonw/datasette/issues/1439 | IC_kwDOBm6k_c4_K0zO | simonw 9599 | 2022-03-05T17:34:33Z | 2022-03-05T17:34:33Z | OWNER | Wrote documentation: |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Rethink how .ext formats (v.s. ?_format=) works before 1.0 973139047 | |
1059822151 | https://github.com/simonw/datasette/issues/1439#issuecomment-1059822151 | https://api.github.com/repos/simonw/datasette/issues/1439 | IC_kwDOBm6k_c4_K5pH | simonw 9599 | 2022-03-05T19:48:35Z | 2022-03-05T19:48:35Z | OWNER | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Rethink how .ext formats (v.s. ?_format=) works before 1.0 973139047 | ||
1059822391 | https://github.com/simonw/datasette/issues/1439#issuecomment-1059822391 | https://api.github.com/repos/simonw/datasette/issues/1439 | IC_kwDOBm6k_c4_K5s3 | simonw 9599 | 2022-03-05T19:50:12Z | 2022-03-05T19:50:12Z | OWNER | I'm going to move this work to a PR. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Rethink how .ext formats (v.s. ?_format=) works before 1.0 973139047 | |
1059836599 | https://github.com/simonw/datasette/issues/1439#issuecomment-1059836599 | https://api.github.com/repos/simonw/datasette/issues/1439 | IC_kwDOBm6k_c4_K9K3 | simonw 9599 | 2022-03-05T21:52:10Z | 2022-03-05T21:52:10Z | OWNER | Blogged about this here: https://simonwillison.net/2022/Mar/5/dash-encoding/ |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Rethink how .ext formats (v.s. ?_format=) works before 1.0 973139047 | |
1059850369 | https://github.com/simonw/datasette/issues/1439#issuecomment-1059850369 | https://api.github.com/repos/simonw/datasette/issues/1439 | IC_kwDOBm6k_c4_LAiB | simonw 9599 | 2022-03-05T23:28:56Z | 2022-03-05T23:28:56Z | OWNER | Lots of great conversations about the dash encoding implementation on Twitter: https://twitter.com/simonw/status/1500228316309061633 @dracos helped me figure out a simpler regex: https://twitter.com/dracos/status/1500236433809973248
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Rethink how .ext formats (v.s. ?_format=) works before 1.0 973139047 | |
1059851259 | https://github.com/simonw/datasette/issues/1439#issuecomment-1059851259 | https://api.github.com/repos/simonw/datasette/issues/1439 | IC_kwDOBm6k_c4_LAv7 | simonw 9599 | 2022-03-05T23:35:47Z | 2022-03-05T23:35:59Z | OWNER | This comment from glyph got me thinking:
What happens if a table name includes a I should consider |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Rethink how .ext formats (v.s. ?_format=) works before 1.0 973139047 | |
1059853526 | https://github.com/simonw/datasette/issues/1439#issuecomment-1059853526 | https://api.github.com/repos/simonw/datasette/issues/1439 | IC_kwDOBm6k_c4_LBTW | simonw 9599 | 2022-03-05T23:49:59Z | 2022-03-05T23:49:59Z | OWNER | I want to try regular percentage encoding, except that it also encodes both the Should check what it does with emoji too. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Rethink how .ext formats (v.s. ?_format=) works before 1.0 973139047 | |
1059854864 | https://github.com/simonw/datasette/issues/1439#issuecomment-1059854864 | https://api.github.com/repos/simonw/datasette/issues/1439 | IC_kwDOBm6k_c4_LBoQ | simonw 9599 | 2022-03-05T23:59:05Z | 2022-03-05T23:59:05Z | OWNER | OK, for that percentage thing: the Python core implementation of URL percentage escaping deliberately ignores two of the characters we want to escape:
I'm going to try borrowing and modifying the core of the Python implementation: https://github.com/python/cpython/blob/6927632492cbad86a250aa006c1847e03b03e70b/Lib/urllib/parse.py#L795-L814 ```python class _Quoter(dict): """A mapping from bytes numbers (in range(0,256)) to strings. String values are percent-encoded byte values, unless the key < 128, and in either of the specified safe set, or the always safe set. """ # Keeps a cache internally, via missing, for efficiency (lookups # of cached keys don't call Python code at all). def init(self, safe): """safe: bytes object.""" self.safe = _ALWAYS_SAFE.union(safe)
``` |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Rethink how .ext formats (v.s. ?_format=) works before 1.0 973139047 | |
1059855418 | https://github.com/simonw/datasette/issues/1439#issuecomment-1059855418 | https://api.github.com/repos/simonw/datasette/issues/1439 | IC_kwDOBm6k_c4_LBw6 | simonw 9599 | 2022-03-06T00:00:53Z | 2022-03-06T00:04:18Z | OWNER | ```python ESCAPE_SAFE = frozenset( b'ABCDEFGHIJKLMNOPQRSTUVWXYZ' b'abcdefghijklmnopqrstuvwxyz' b'0123456789' ) I removed b'.-~')class Quoter(dict): # Keeps a cache internally, via missing def missing(self, b): # Handle a cache miss. Store quoted string in cache and return. res = chr(b) if b in _ESCAPE_SAFE else '-{:02X}'.format(b) self[b] = res return res quoter = Quoter().getitem ''.join([quoter(char) for char in b'foo/bar.csv']) 'foo-2Fbar-2Ecsv'``` |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Rethink how .ext formats (v.s. ?_format=) works before 1.0 973139047 | |
1059864154 | https://github.com/simonw/datasette/issues/1439#issuecomment-1059864154 | https://api.github.com/repos/simonw/datasette/issues/1439 | IC_kwDOBm6k_c4_LD5a | simonw 9599 | 2022-03-06T00:59:04Z | 2022-03-06T00:59:04Z | OWNER | Needs more testing, but this seems to work for decoding the percent-escaped-with-dashes format: |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Rethink how .ext formats (v.s. ?_format=) works before 1.0 973139047 | |
1059903309 | https://github.com/simonw/datasette/issues/1439#issuecomment-1059903309 | https://api.github.com/repos/simonw/datasette/issues/1439 | IC_kwDOBm6k_c4_LNdN | simonw 9599 | 2022-03-06T06:17:51Z | 2022-03-06T06:17:51Z | OWNER | 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 Making it easy for plugins to do the right, consistent thing is a good idea. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Rethink how .ext formats (v.s. ?_format=) works before 1.0 973139047 | |
1060044007 | https://github.com/simonw/datasette/issues/1439#issuecomment-1060044007 | https://api.github.com/repos/simonw/datasette/issues/1439 | IC_kwDOBm6k_c4_Lvzn | simonw 9599 | 2022-03-06T21:38:15Z | 2022-03-06T21:38:15Z | OWNER | One big advantage to this scheme is that redirecting old links to |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Rethink how .ext formats (v.s. ?_format=) works before 1.0 973139047 | |
1060870237 | https://github.com/simonw/datasette/issues/1439#issuecomment-1060870237 | https://api.github.com/repos/simonw/datasette/issues/1439 | IC_kwDOBm6k_c4_O5hd | simonw 9599 | 2022-03-07T16:19:22Z | 2022-03-07T16:19:22Z | OWNER | I didn't need to do any of the fancy regular expression routing stuff after all, since the new dash encoding format avoids using |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Rethink how .ext formats (v.s. ?_format=) works before 1.0 973139047 | |
1065987808 | https://github.com/simonw/datasette/issues/1439#issuecomment-1065987808 | https://api.github.com/repos/simonw/datasette/issues/1439 | IC_kwDOBm6k_c4_ia7g | simonw 9599 | 2022-03-13T00:02:32Z | 2022-03-13T00:02:32Z | OWNER | OK, this has broken a lot more than I expected it would. Turns out https://datasette.io/-/databases for example has two:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Rethink how .ext formats (v.s. ?_format=) works before 1.0 973139047 | |
1065988403 | https://github.com/simonw/datasette/issues/1439#issuecomment-1065988403 | https://api.github.com/repos/simonw/datasette/issues/1439 | IC_kwDOBm6k_c4_ibEz | simonw 9599 | 2022-03-13T00:06:38Z | 2022-03-13T00:07:19Z | OWNER | If I want to reserve
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Rethink how .ext formats (v.s. ?_format=) works before 1.0 973139047 | |
1068461449 | https://github.com/simonw/datasette/issues/1439#issuecomment-1068461449 | https://api.github.com/repos/simonw/datasette/issues/1439 | IC_kwDOBm6k_c4_r22J | simonw 9599 | 2022-03-15T20:51:26Z | 2022-03-15T20:51:26Z | OWNER | I'm happy with this now that I've landed Tilde encoding in #1657. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Rethink how .ext formats (v.s. ?_format=) works before 1.0 973139047 |
Advanced export
JSON shape: default, array, newline-delimited, object
CREATE TABLE [issue_comments] ( [html_url] TEXT, [issue_url] TEXT, [id] INTEGER PRIMARY KEY, [node_id] TEXT, [user] INTEGER REFERENCES [users]([id]), [created_at] TEXT, [updated_at] TEXT, [author_association] TEXT, [body] TEXT, [reactions] TEXT, [issue] INTEGER REFERENCES [issues]([id]) , [performed_via_github_app] TEXT); CREATE INDEX [idx_issue_comments_issue] ON [issue_comments] ([issue]); CREATE INDEX [idx_issue_comments_user] ON [issue_comments] ([user]);
user 1