{"html_url": "https://github.com/dogsheep/github-to-sqlite/issues/58#issuecomment-746734412", "issue_url": "https://api.github.com/repos/dogsheep/github-to-sqlite/issues/58", "id": 746734412, "node_id": "MDEyOklzc3VlQ29tbWVudDc0NjczNDQxMg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-12-16T17:58:56Z", "updated_at": "2020-12-16T17:58:56Z", "author_association": "MEMBER", "body": "I'm going to rewrite those `` links to `` - but only if a corresponding `id=\"user-content-filtering-tables\"` element exists.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 769150394, "label": "Readme HTML has broken internal links"}, "performed_via_github_app": null} {"html_url": "https://github.com/dogsheep/github-to-sqlite/issues/58#issuecomment-746735889", "issue_url": "https://api.github.com/repos/dogsheep/github-to-sqlite/issues/58", "id": 746735889, "node_id": "MDEyOklzc3VlQ29tbWVudDc0NjczNTg4OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-12-16T17:59:50Z", "updated_at": "2020-12-16T17:59:50Z", "author_association": "MEMBER", "body": "I don't want to add a full HTML parser (like BeautifulSoup) as a dependency for this feature. Since the HTML comes from a single, trusted source (GitHub) I could probably handle this using [regular expressions](https://stackoverflow.com/a/1732454).", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 769150394, "label": "Readme HTML has broken internal links"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1143#issuecomment-746827083", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1143", "id": 746827083, "node_id": "MDEyOklzc3VlQ29tbWVudDc0NjgyNzA4Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-12-16T18:56:07Z", "updated_at": "2020-12-16T18:56:07Z", "author_association": "OWNER", "body": "I think the right way to do this is to support multiple optional `--cors-origin=` pattern values, like you suggested.", "reactions": "{\"total_count\": 2, \"+1\": 1, \"-1\": 0, \"laugh\": 0, \"hooray\": 1, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 764059235, "label": "More flexible CORS support in core, to encourage good security practices"}, "performed_via_github_app": null} {"html_url": "https://github.com/dogsheep/dogsheep-beta/issues/29#issuecomment-747029636", "issue_url": "https://api.github.com/repos/dogsheep/dogsheep-beta/issues/29", "id": 747029636, "node_id": "MDEyOklzc3VlQ29tbWVudDc0NzAyOTYzNg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-12-16T21:14:03Z", "updated_at": "2020-12-16T21:14:03Z", "author_association": "MEMBER", "body": "I think I can do this as a cunning trick in `display_sql`. Consider this example query: https://til.simonwillison.net/tils?sql=select%0D%0A++path%2C%0D%0A++snippet%28til_fts%2C+-1%2C+%27b4de2a49c8%27%2C+%278c94a2ed4b%27%2C+%27...%27%2C+60%29+as+snippet%0D%0Afrom%0D%0A++til%0D%0A++join+til_fts+on+til.rowid+%3D+til_fts.rowid%0D%0Awhere%0D%0A++til_fts+match+escape_fts%28%3Aq%29%0D%0A++and+path+%3D+%27asgi_lifespan-test-httpx.md%27%0D%0A&q=pytest\r\n\r\n```sql\r\nselect\r\n path,\r\n snippet(til_fts, -1, 'b4de2a49c8', '8c94a2ed4b', '...', 60) as snippet\r\nfrom\r\n til\r\n join til_fts on til.rowid = til_fts.rowid\r\nwhere\r\n til_fts match escape_fts(:q)\r\n and path = 'asgi_lifespan-test-httpx.md'\r\n```\r\nThe `and path = 'asgi_lifespan-test-httpx.md'` bit means we only get back a specific document - but the snippet highlighting is applied to it.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 724759588, "label": "Add search highlighting snippets"}, "performed_via_github_app": null} {"html_url": "https://github.com/dogsheep/dogsheep-beta/issues/29#issuecomment-747030964", "issue_url": "https://api.github.com/repos/dogsheep/dogsheep-beta/issues/29", "id": 747030964, "node_id": "MDEyOklzc3VlQ29tbWVudDc0NzAzMDk2NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-12-16T21:14:54Z", "updated_at": "2020-12-16T21:14:54Z", "author_association": "MEMBER", "body": "To do this I'll need the search term to be passed to the `display_sql` SQL query:\r\nhttps://github.com/dogsheep/dogsheep-beta/blob/4890ec87b5e2ec48940f32c9ad1f5aae25c75a4d/dogsheep_beta/__init__.py#L164-L171", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 724759588, "label": "Add search highlighting snippets"}, "performed_via_github_app": null} {"html_url": "https://github.com/dogsheep/dogsheep-beta/issues/29#issuecomment-747031608", "issue_url": "https://api.github.com/repos/dogsheep/dogsheep-beta/issues/29", "id": 747031608, "node_id": "MDEyOklzc3VlQ29tbWVudDc0NzAzMTYwOA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-12-16T21:15:18Z", "updated_at": "2020-12-16T21:15:18Z", "author_association": "MEMBER", "body": "Should I pass any other details to the `display_sql` here as well?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 724759588, "label": "Add search highlighting snippets"}, "performed_via_github_app": null} {"html_url": "https://github.com/dogsheep/dogsheep-beta/issues/29#issuecomment-747034481", "issue_url": "https://api.github.com/repos/dogsheep/dogsheep-beta/issues/29", "id": 747034481, "node_id": "MDEyOklzc3VlQ29tbWVudDc0NzAzNDQ4MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-12-16T21:17:05Z", "updated_at": "2020-12-16T21:17:05Z", "author_association": "MEMBER", "body": "I'm just going to add `q` for the moment.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 724759588, "label": "Add search highlighting snippets"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/675#issuecomment-747059277", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/675", "id": 747059277, "node_id": "MDEyOklzc3VlQ29tbWVudDc0NzA1OTI3Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-12-16T21:43:52Z", "updated_at": "2020-12-16T21:43:52Z", "author_association": "OWNER", "body": "It turns out I need this for a couple of projects:\r\n\r\n- [datasette-ripgrep](https://github.com/simonw/datasette-ripgrep) needs to ship a whole bunch of source code files up in a known location. I worked around this with a nasty hack involving `--static` but it would be better if I wasn't doing that.\r\n- [dogsheep-beta](https://github.com/dogsheep/dogsheep-beta) uses an additional `dogsheep-beta.yml` configuration file in the project root (a sibling to `metadata.yml`) which needs to be included when publishing - see https://github.com/simonw/datasette.io/issues/21#issuecomment-747058067\r\n\r\nI want this for `datasette publish cloudrun`, not just for `datasette package`.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 567902704, "label": "--cp option for datasette publish and datasette package for shipping additional files and directories"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1148#issuecomment-747062909", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1148", "id": 747062909, "node_id": "MDEyOklzc3VlQ29tbWVudDc0NzA2MjkwOQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-12-16T21:51:54Z", "updated_at": "2020-12-16T21:51:54Z", "author_association": "OWNER", "body": "This is a really frustrating bug with Vercel: https://github.com/simonw/datasette-publish-vercel/issues/28\r\n\r\n`+` characters in URLs get translated into spaces before they get to Datasette. They know about the bug and said they were working on a fix a few months ago, but looks like it's still a problem.\r\n\r\nA workaround is to avoid `+` and use `-` instead - I think this SQL query does the same thing as yours:\r\n\r\nhttps://aws-partners-singapore.vercel.app/partners?sql=select%0D%0A++A.launch_rank%2C%0D%0A++A.partner_info%0D%0Afrom%0D%0A++summary+A%0D%0A++INNER+JOIN+summary+B+ON+A.launch_rank+%3E%3D+B.launch_rank+-+3%0D%0A++AND+A.launch_rank+-4+%3C%3D+B.launch_rank%0D%0AWHERE%0D%0A++B.%22partner_info%22+LIKE+%27%25Palo+Alto%25%27\r\n\r\n```sql\r\nselect\r\n A.launch_rank,\r\n A.partner_info\r\nfrom\r\n summary A\r\n INNER JOIN summary B ON A.launch_rank >= B.launch_rank - 3\r\n AND A.launch_rank -4 <= B.launch_rank\r\nWHERE\r\n B.\"partner_info\" LIKE '%Palo Alto%'\r\n```\r\nI've been moving projects from Vercel to Cloud Run when they run into this, but that's not a great situation to be in.", "reactions": "{\"total_count\": 1, \"+1\": 1, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 767561886, "label": "Syntax error with + symbol when deployed to Vercel"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1148#issuecomment-747065487", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1148", "id": 747065487, "node_id": "MDEyOklzc3VlQ29tbWVudDc0NzA2NTQ4Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-12-16T21:57:29Z", "updated_at": "2020-12-16T21:57:29Z", "author_association": "OWNER", "body": "I filed a new public bug in their issue tracker here: https://github.com/vercel/vercel/issues/5575", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 767561886, "label": "Syntax error with + symbol when deployed to Vercel"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/675#issuecomment-747066629", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/675", "id": 747066629, "node_id": "MDEyOklzc3VlQ29tbWVudDc0NzA2NjYyOQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-12-16T21:59:58Z", "updated_at": "2020-12-16T22:00:48Z", "author_association": "OWNER", "body": "Note that `datasette publish cloudrun` uses a working directory of `/app` - so users will need to copy their files into `/app` if that's where they need to live.\r\n\r\nhttps://github.com/simonw/datasette/blob/17cbbb1f7f230b39650afac62dd16476626001b5/datasette/utils/__init__.py#L348-L357", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 567902704, "label": "--cp option for datasette publish and datasette package for shipping additional files and directories"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/675#issuecomment-747067864", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/675", "id": 747067864, "node_id": "MDEyOklzc3VlQ29tbWVudDc0NzA2Nzg2NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-12-16T22:02:55Z", "updated_at": "2020-12-16T22:02:55Z", "author_association": "OWNER", "body": "But since we're already running `COPY . /app` anything that's made it into the temporary directory will get copied into `/app`.\r\n\r\nBut... I feel the usability of the command will be better if users can use absolute paths on the `target` side:\r\n\r\n datasette publish cloudrun my.db --cp dogsheep-beta.yml /app", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 567902704, "label": "--cp option for datasette publish and datasette package for shipping additional files and directories"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/675#issuecomment-747068624", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/675", "id": 747068624, "node_id": "MDEyOklzc3VlQ29tbWVudDc0NzA2ODYyNA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-12-16T22:04:42Z", "updated_at": "2020-12-16T22:04:42Z", "author_association": "OWNER", "body": "I can't just use `COPY /path/to/blah.yml /app` in the `Dockerfile` because it runs on the Google Cloud Build servers, not on the user's laptop - so I need to first copy the files they specify to that temporary directory that gets uploaded to the cloud, then rewrite the `COPY` lines in the `Dockerfile` to copy from there.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 567902704, "label": "--cp option for datasette publish and datasette package for shipping additional files and directories"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/675#issuecomment-747070709", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/675", "id": 747070709, "node_id": "MDEyOklzc3VlQ29tbWVudDc0NzA3MDcwOQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-12-16T22:09:15Z", "updated_at": "2020-12-16T22:09:15Z", "author_association": "OWNER", "body": "The other way this could work is passing a single argument - the file (or directory) to be copied in - and assuming it should always go in the `/app` root. Something like:\r\n\r\n datasette publish cloudrun my.db --include src/ --include dogsheep-beta.yml\r\n\r\nWhich would add `/app/src/...` and `/app/dogsheep-beta.yml`.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 567902704, "label": "--cp option for datasette publish and datasette package for shipping additional files and directories"}, "performed_via_github_app": null}