home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

12 rows where issue = 1168995756 sorted by updated_at descending

✖
✖

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: created_at (date), updated_at (date)

user 1

  • simonw 12

issue 1

  • Tilde encoding: use ~ instead of - for dash-encoding · 12 ✖

author_association 1

  • OWNER 12
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
1068318454 https://github.com/simonw/datasette/issues/1657#issuecomment-1068318454 https://api.github.com/repos/simonw/datasette/issues/1657 IC_kwDOBm6k_c4_rT72 simonw 9599 2022-03-15T18:25:11Z 2022-03-15T18:25:11Z OWNER

Demo:

  • https://latest.datasette.io/fixtures/table~2Fwith~2Fslashes~2Ecsv
  • https://latest.datasette.io/fixtures/table~2Fwith~2Fslashes~2Ecsv.csv
  • https://latest.datasette.io/fixtures/table~2Fwith~2Fslashes~2Ecsv.json
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Tilde encoding: use ~ instead of - for dash-encoding 1168995756  
1068306916 https://github.com/simonw/datasette/issues/1657#issuecomment-1068306916 https://api.github.com/repos/simonw/datasette/issues/1657 IC_kwDOBm6k_c4_rRHk simonw 9599 2022-03-15T18:15:11Z 2022-03-15T18:15:11Z OWNER

Now live here: https://fivethirtyeight.datasettes.com/fivethirtyeight/august-senate-polls~2Faugust_senate_polls

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Tilde encoding: use ~ instead of - for dash-encoding 1168995756  
1068296042 https://github.com/simonw/datasette/issues/1657#issuecomment-1068296042 https://api.github.com/repos/simonw/datasette/issues/1657 IC_kwDOBm6k_c4_rOdq simonw 9599 2022-03-15T18:05:54Z 2022-03-15T18:05:54Z OWNER

Documentation: https://docs.datasette.io/en/latest/internals.html#tilde-encoding

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Tilde encoding: use ~ instead of - for dash-encoding 1168995756  
1068181623 https://github.com/simonw/datasette/issues/1657#issuecomment-1068181623 https://api.github.com/repos/simonw/datasette/issues/1657 IC_kwDOBm6k_c4_qyh3 simonw 9599 2022-03-15T16:18:23Z 2022-03-15T16:18:23Z OWNER

Moving this to a PR.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Tilde encoding: use ~ instead of - for dash-encoding 1168995756  
1068148013 https://github.com/simonw/datasette/issues/1657#issuecomment-1068148013 https://api.github.com/repos/simonw/datasette/issues/1657 IC_kwDOBm6k_c4_qqUt simonw 9599 2022-03-15T15:50:15Z 2022-03-15T15:50:15Z OWNER

The thing that broke everything was this change:

I'm going to bring back the horrible get_format() method for the moment, with its weird mutations of the args object, then try and get rid of it again later.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Tilde encoding: use ~ instead of - for dash-encoding 1168995756  
1068126821 https://github.com/simonw/datasette/issues/1657#issuecomment-1068126821 https://api.github.com/repos/simonw/datasette/issues/1657 IC_kwDOBm6k_c4_qlJl simonw 9599 2022-03-15T15:31:54Z 2022-03-15T15:31:54Z OWNER

The state I had got to prior to that revert is in https://github.com/simonw/datasette/tree/issue-1657-wip

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Tilde encoding: use ~ instead of - for dash-encoding 1168995756  
1068125636 https://github.com/simonw/datasette/issues/1657#issuecomment-1068125636 https://api.github.com/repos/simonw/datasette/issues/1657 IC_kwDOBm6k_c4_qk3E simonw 9599 2022-03-15T15:30:54Z 2022-03-15T15:30:54Z OWNER

I've made a real mess of this. I'm going to revert Datasettemain back to the last commit that passed the tests and try this again in a branch.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Tilde encoding: use ~ instead of - for dash-encoding 1168995756  
1067423720 https://github.com/simonw/datasette/issues/1657#issuecomment-1067423720 https://api.github.com/repos/simonw/datasette/issues/1657 IC_kwDOBm6k_c4_n5fo simonw 9599 2022-03-14T23:59:56Z 2022-03-14T23:59:56Z OWNER

Updated test: python @pytest.mark.parametrize( "original,expected", ( ("abc", "abc"), ("/foo/bar", "~2Ffoo~2Fbar"), ("/-/bar", "~2F-~2Fbar"), ("-/db-/table.csv", "-~2Fdb-~2Ftable~2Ecsv"), (r"%~-/", "~25~7E-~2F"), ("~25~7E~2D~2F", "~7E25~7E7E~7E2D~7E2F"), ), ) def test_tilde_encoding(original, expected): actual = utils.tilde_encode(original) assert actual == expected # And test round-trip assert original == utils.tilde_decode(actual)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Tilde encoding: use ~ instead of - for dash-encoding 1168995756  
1067414156 https://github.com/simonw/datasette/issues/1657#issuecomment-1067414156 https://api.github.com/repos/simonw/datasette/issues/1657 IC_kwDOBm6k_c4_n3KM simonw 9599 2022-03-14T23:38:41Z 2022-03-14T23:38:41Z OWNER

And in https://datatracker.ietf.org/doc/html/rfc3986#section-2.3 "Unreserved Characters":

  unreserved  = ALPHA / DIGIT / "-" / "." / "_" / "~"
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Tilde encoding: use ~ instead of - for dash-encoding 1168995756  
1067413691 https://github.com/simonw/datasette/issues/1657#issuecomment-1067413691 https://api.github.com/repos/simonw/datasette/issues/1657 IC_kwDOBm6k_c4_n3C7 simonw 9599 2022-03-14T23:37:42Z 2022-03-14T23:37:42Z OWNER

Relevant: https://datatracker.ietf.org/doc/html/rfc3986#section-2.1

```

  reserved    = gen-delims / sub-delims

  gen-delims  = ":" / "/" / "?" / "#" / "[" / "]" / "@"

  sub-delims  = "!" / "$" / "&" / "'" / "(" / ")"
              / "*" / "+" / "," / ";" / "="

`` Notably~` is not in either of those lists.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Tilde encoding: use ~ instead of - for dash-encoding 1168995756  
1067382232 https://github.com/simonw/datasette/issues/1657#issuecomment-1067382232 https://api.github.com/repos/simonw/datasette/issues/1657 IC_kwDOBm6k_c4_nvXY simonw 9599 2022-03-14T22:58:47Z 2022-03-14T22:58:47Z OWNER

Asked about this on Twitter:

Anyone ever seen a proxy or other URL handling system do anything surprising with the tilde "~" character?

I'm considering it as an escaping character, in place of "-" as described in

Replies so far seem like it should be OK - Apache has supported this for home directories for a couple of decades now without any problems.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Tilde encoding: use ~ instead of - for dash-encoding 1168995756  
1067381556 https://github.com/simonw/datasette/issues/1657#issuecomment-1067381556 https://api.github.com/repos/simonw/datasette/issues/1657 IC_kwDOBm6k_c4_nvM0 simonw 9599 2022-03-14T22:57:27Z 2022-03-14T22:57:45Z OWNER

The problem with the dash encoding mechanism is that it turns out dashes are used in a LOT of existing Datasette instances - much of https://fivethirtyeight.datasettes.com/fivethirtyeight for example, and even https://datasette.io/ itself: https://datasette.io/dogsheep-index

It's pretty ugly to force all of those to change to their dash-encoded equivalent - and in fact it broke https://datasette.io/ in a subtle way:

  • https://github.com/simonw/datasette.io/issues/94

I'm going to try using ~ instead and see if that works as well and causes less breakage to existing sites.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Tilde encoding: use ~ instead of - for dash-encoding 1168995756  

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

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]);
Powered by Datasette · Queries took 22.012ms · About: github-to-sqlite
  • Sort ascending
  • Sort descending
  • Facet by this
  • Hide this column
  • Show all columns
  • Show not-blank rows