{"html_url": "https://github.com/simonw/datasette/issues/1829#issuecomment-1278300241", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1829", "id": 1278300241, "node_id": "IC_kwDOBm6k_c5MMVBR", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-10-14T00:03:52Z", "updated_at": "2022-10-14T00:04:28Z", "author_association": "OWNER", "body": "Here's what I've got so far:\r\n```diff\r\ndiff --git a/datasette/app.py b/datasette/app.py\r\nindex 5fa4955c..df9eae49 100644\r\n--- a/datasette/app.py\r\n+++ b/datasette/app.py\r\n@@ -1,5 +1,5 @@\r\n import asyncio\r\n-from typing import Sequence, Union, Tuple\r\n+from typing import Sequence, Union, Tuple, Optional\r\n import asgi_csrf\r\n import collections\r\n import datetime\r\n@@ -707,7 +707,7 @@ class Datasette:\r\n \r\n Raises datasette.Forbidden() if any of the checks fail\r\n \"\"\"\r\n- assert actor is None or isinstance(actor, dict)\r\n+ assert actor is None or isinstance(actor, dict), \"actor must be None or a dict\"\r\n for permission in permissions:\r\n if isinstance(permission, str):\r\n action = permission\r\n@@ -732,23 +732,34 @@ class Datasette:\r\n else:\r\n raise Forbidden(action)\r\n \r\n- async def check_visibility(self, actor, action, resource):\r\n+ async def check_visibility(\r\n+ self,\r\n+ actor: dict,\r\n+ action: Optional[str] = None,\r\n+ resource: Optional[str] = None,\r\n+ permissions: Optional[\r\n+ Sequence[Union[Tuple[str, Union[str, Tuple[str, str]]], str]]\r\n+ ] = None,\r\n+ ):\r\n \"\"\"Returns (visible, private) - visible = can you see it, private = can others see it too\"\"\"\r\n- visible = await self.permission_allowed(\r\n- actor,\r\n- action,\r\n- resource=resource,\r\n- default=True,\r\n- )\r\n- if not visible:\r\n+ if permissions:\r\n+ assert (\r\n+ not action and not resource\r\n+ ), \"Can't use action= or resource= with permissions=\"\r\n+ else:\r\n+ permissions = [(action, resource)]\r\n+ try:\r\n+ await self.ensure_permissions(actor, permissions)\r\n+ except Forbidden:\r\n return False, False\r\n- private = not await self.permission_allowed(\r\n- None,\r\n- action,\r\n- resource=resource,\r\n- default=True,\r\n- )\r\n- return visible, private\r\n+ # User can see it, but can the anonymous user see it?\r\n+ try:\r\n+ await self.ensure_permissions(None, permissions)\r\n+ except Forbidden:\r\n+ # It's visible but private\r\n+ return True, True\r\n+ # It's visible to everyone\r\n+ return True, False\r\n \r\n async def execute(\r\n self,\r\ndiff --git a/datasette/views/table.py b/datasette/views/table.py\r\nindex 60c092f9..f73b0957 100644\r\n--- a/datasette/views/table.py\r\n+++ b/datasette/views/table.py\r\n@@ -28,7 +28,7 @@ from datasette.utils import (\r\n urlsafe_components,\r\n value_as_boolean,\r\n )\r\n-from datasette.utils.asgi import BadRequest, NotFound\r\n+from datasette.utils.asgi import BadRequest, Forbidden, NotFound\r\n from datasette.filters import Filters\r\n from .base import DataView, DatasetteError, ureg\r\n from .database import QueryView\r\n@@ -213,18 +213,16 @@ class TableView(DataView):\r\n raise NotFound(f\"Table not found: {table_name}\")\r\n \r\n # Ensure user has permission to view this table\r\n- await self.ds.ensure_permissions(\r\n+ visible, private = await self.ds.check_visibility(\r\n request.actor,\r\n- [\r\n+ permissions=[\r\n (\"view-table\", (database_name, table_name)),\r\n (\"view-database\", database_name),\r\n \"view-instance\",\r\n ],\r\n )\r\n-\r\n- private = not await self.ds.permission_allowed(\r\n- None, \"view-table\", (database_name, table_name), default=True\r\n- )\r\n+ if not visible:\r\n+ raise Forbidden(\"You do not have permission to view this table\")\r\n \r\n # Handle ?_filter_column and redirect, if present\r\n redirect_params = filters_should_redirect(request.args)\r\n```\r\nStill needs tests and a documentation update.\r\n\r\nAlso this fix is currently only applied on the table page - needs to be applied on database, row and query pages too.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1396948693, "label": "Table/database that is private due to inherited permissions does not show padlock"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1829#issuecomment-1278302478", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1829", "id": 1278302478, "node_id": "IC_kwDOBm6k_c5MMVkO", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-10-14T00:06:19Z", "updated_at": "2022-10-14T00:06:19Z", "author_association": "OWNER", "body": "I'll finish this in a PR:\r\n- https://github.com/simonw/datasette/pull/1842", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1396948693, "label": "Table/database that is private due to inherited permissions does not show padlock"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1842#issuecomment-1278306180", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1842", "id": 1278306180, "node_id": "IC_kwDOBm6k_c5MMWeE", "user": {"value": 22429695, "label": "codecov[bot]"}, "created_at": "2022-10-14T00:11:46Z", "updated_at": "2022-10-24T02:04:52Z", "author_association": "NONE", "body": "# [Codecov](https://codecov.io/gh/simonw/datasette/pull/1842?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) Report\nBase: **92.52**% // Head: **92.54**% // Increases project coverage by **`+0.02%`** :tada:\n> Coverage data is based on head [(`3623475`)](https://codecov.io/gh/simonw/datasette/pull/1842?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) compared to base [(`79aa0de`)](https://codecov.io/gh/simonw/datasette/commit/79aa0de083d38a9975915d5a4cc68ca6c74fbe3d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison).\n> Patch coverage: 100.00% of modified lines in pull request are covered.\n\n
Additional details and impacted files\n\n\n```diff\n@@ Coverage Diff @@\n## main #1842 +/- ##\n==========================================\n+ Coverage 92.52% 92.54% +0.02% \n==========================================\n Files 35 35 \n Lines 4415 4428 +13 \n==========================================\n+ Hits 4085 4098 +13 \n Misses 330 330 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/simonw/datasette/pull/1842?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) | Coverage \u0394 | |\n|---|---|---|\n| [datasette/app.py](https://codecov.io/gh/simonw/datasette/pull/1842/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-ZGF0YXNldHRlL2FwcC5weQ==) | `94.28% <100.00%> (+0.05%)` | :arrow_up: |\n| [datasette/views/database.py](https://codecov.io/gh/simonw/datasette/pull/1842/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-ZGF0YXNldHRlL3ZpZXdzL2RhdGFiYXNlLnB5) | `95.29% <100.00%> (+0.06%)` | :arrow_up: |\n| [datasette/views/index.py](https://codecov.io/gh/simonw/datasette/pull/1842/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-ZGF0YXNldHRlL3ZpZXdzL2luZGV4LnB5) | `96.49% <100.00%> (\u00f8)` | |\n| [datasette/views/row.py](https://codecov.io/gh/simonw/datasette/pull/1842/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-ZGF0YXNldHRlL3ZpZXdzL3Jvdy5weQ==) | `88.70% <100.00%> (+0.37%)` | :arrow_up: |\n| [datasette/views/table.py](https://codecov.io/gh/simonw/datasette/pull/1842/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-ZGF0YXNldHRlL3ZpZXdzL3RhYmxlLnB5) | `95.20% <100.00%> (+0.01%)` | :arrow_up: |\n\nHelp us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison)\n\n
\n\n[:umbrella: View full report at Codecov](https://codecov.io/gh/simonw/datasette/pull/1842?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison). \n:loudspeaker: Do you have feedback about the report comment? [Let us know in this issue](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison).\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1408561039, "label": "check_visibility can now take multiple permissions into account"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1843#issuecomment-1278478042", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1843", "id": 1278478042, "node_id": "IC_kwDOBm6k_c5MNAba", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-10-14T04:46:29Z", "updated_at": "2022-10-14T04:46:29Z", "author_association": "OWNER", "body": "I did `pip install psutil` and then ran this in the debugger for one of these errors:\r\n\r\n```python\r\nimport psutil\r\nfor f in psutil.Process().open_files(): print(f)\r\n```\r\nThe output looked like this:\r\n\r\n```\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmpq31d2af1/fixtures.db', fd=11)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmpoxdpxj6w/fixtures.db', fd=12)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmpfd3oyo10/fixtures.dot.db', fd=13)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmpezwfu7w8/fixtures.db', fd=14)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmpq31d2af1/fixtures.db', fd=15)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmpq31d2af1/fixtures.db', fd=16)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmpz6e2anqw/fixtures.db', fd=17)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmpoxdpxj6w/fixtures.db', fd=18)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmpdp4we7hb/fixtures.db', fd=19)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmpfd3oyo10/fixtures.dot.db', fd=20)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmp4ljq_ai0/fixtures.db', fd=21)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmpezwfu7w8/fixtures.db', fd=22)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmp907xmnzb/fixtures.db', fd=24)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmpz6e2anqw/extra database.db', fd=25)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmpz6e2anqw/fixtures.db', fd=26)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmpzlwn6bqm/fixtures.db', fd=27)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmpdp4we7hb/fixtures.db', fd=28)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmp42e6vyj_/fixtures.db', fd=29)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmp4ljq_ai0/fixtures.db', fd=31)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmpw32vwkjq/fixtures.db', fd=32)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmp907xmnzb/extra database.db', fd=33)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmp907xmnzb/fixtures.db', fd=34)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmpw32vwkjq/fixtures.db', fd=35)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmpzlwn6bqm/foo-bar.db', fd=36)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmpzlwn6bqm/foo.db', fd=37)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmpzlwn6bqm/fixtures.db', fd=38)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmpcl1edmyv/fixtures.db', fd=39)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmp42e6vyj_/fixtures.db', fd=40)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmpoxdpxj6w/fixtures.db', fd=41)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmp0w5jugqk/fixtures.db', fd=42)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmpmb9y9fba/fixtures.db', fd=43)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmpfwsbx941/fixtures.db', fd=44)\r\npopenfile(path='/Users/simon/Dropbox/Development/datasette/tests/spatialite.db', fd=45)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmp0w5jugqk/fixtures.db', fd=46)\r\npopenfile(path='/Users/simon/Dropbox/Development/datasette/tests/spatialite.db', fd=47)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmpmb9y9fba/fixtures.db', fd=48)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/test_serve_create0/does_not_exist_yet.db', fd=49)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmpfwsbx941/data.db', fd=92)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmpfwsbx941/fixtures.db', fd=93)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmpfwsbx941/data.db', fd=94)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/test_serve_duplicate_database_0/db.db', fd=95)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/test_serve_duplicate_database_0/nested/db.db', fd=99)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/test_serve_deduplicate_same_da0/db.db', fd=100)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/test_weird_database_names_test0/test-database (1).sqlite', fd=101)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/test_weird_database_names_test0/test-database (1).sqlite', fd=102)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/test_serve_duplicate_database_0/db.db', fd=103)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/test_serve_duplicate_database_0/nested/db.db', fd=104)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/test_weird_database_names_data0/database (1).sqlite', fd=105)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/test_weird_database_names_data0/database (1).sqlite', fd=106)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/test_weird_database_names_test0/test-database (1).sqlite', fd=107)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/test_weird_database_names_test0/test-database (1).sqlite', fd=109)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/test_weird_database_names_data0/database (1).sqlite', fd=111)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/test_weird_database_names_data0/database (1).sqlite', fd=113)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmppju9w34z/fixtures.db', fd=117)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmpky1jamnv/fixtures.db', fd=118)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/dbs0/db_0.db', fd=119)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/config-dir0/demo.db', fd=120)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/config-dir0/immutable.db', fd=121)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/config-dir0/k.sqlite', fd=122)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/config-dir0/j.sqlite3', fd=123)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/dbs0/db_1.db', fd=124)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmppju9w34z/extra database.db', fd=125)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmppju9w34z/fixtures.db', fd=126)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmppju9w34z/extra database.db', fd=127)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmppju9w34z/fixtures.db', fd=128)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/dbs0/db_2.db', fd=129)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/dbs0/db_3.db', fd=130)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/dbs0/db_4.db', fd=131)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/dbs0/db_5.db', fd=132)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/dbs0/db_6.db', fd=133)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/dbs0/db_7.db', fd=134)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/dbs0/db_8.db', fd=135)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/dbs0/db_9.db', fd=136)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/dbs0/db_0.db', fd=137)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/dbs0/db_1.db', fd=138)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/dbs0/db_2.db', fd=139)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/dbs0/db_3.db', fd=140)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/dbs0/db_4.db', fd=141)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/dbs0/db_5.db', fd=142)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/dbs0/db_6.db', fd=143)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/dbs0/db_7.db', fd=144)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/dbs0/db_8.db', fd=145)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/dbs0/db_9.db', fd=146)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/dbs0/db_10.db', fd=147)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmpmzu4jbdx/fixtures.db', fd=148)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmpskyh32wh/fixtures.db', fd=149)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmp966705ec/fixtures.db', fd=150)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/dbs0/db_0.db', fd=151)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/dbs0/db_1.db', fd=152)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/dbs0/db_2.db', fd=153)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/dbs0/db_3.db', fd=154)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/dbs0/db_4.db', fd=155)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/dbs0/db_5.db', fd=156)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/dbs0/db_6.db', fd=157)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/dbs0/db_7.db', fd=158)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/dbs0/db_8.db', fd=159)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/dbs0/db_9.db', fd=160)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/dbs0/db_10.db', fd=161)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/dbs0/db_0.db', fd=162)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/dbs0/db_1.db', fd=163)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/dbs0/db_2.db', fd=164)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/dbs0/db_3.db', fd=165)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/dbs0/db_4.db', fd=166)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/dbs0/db_5.db', fd=167)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/dbs0/db_6.db', fd=168)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/dbs0/db_7.db', fd=169)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/dbs0/db_8.db', fd=170)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/dbs0/db_9.db', fd=171)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmpky1jamnv/fixtures.db', fd=172)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmpwmewpy8e/fixtures.db', fd=173)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmpmzu4jbdx/fixtures.db', fd=174)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmpkyn60obe/fixtures.db', fd=175)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmpskyh32wh/fixtures.db', fd=176)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmpcl1edmyv/fixtures.db', fd=177)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmp966705ec/fixtures.db', fd=178)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmp4gctb4i6/fixtures.db', fd=179)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmpwmewpy8e/fixtures.db', fd=180)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmp4gctb4i6/fixtures.db', fd=181)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmpkyn60obe/fixtures.db', fd=182)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmp4gctb4i6/fixtures.db', fd=183)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmps7p_ee_e/fixtures.db', fd=184)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmpf3_6i1d6/fixtures.db', fd=185)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmp6_9vzq4o/fixtures.db', fd=187)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmpqtubcoah/fixtures.db', fd=188)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmps7p_ee_e/extra database.db', fd=189)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmps7p_ee_e/fixtures.db', fd=190)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmp2gauogmy/fixtures.db', fd=191)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmpf3_6i1d6/fixtures.db', fd=192)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmprh373nt1/fixtures.db', fd=193)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmp6_9vzq4o/fixtures.db', fd=197)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmprh373nt1/extra database.db', fd=198)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmpqtubcoah/fixtures.db', fd=211)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmprh373nt1/fixtures.db', fd=212)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmp2gauogmy/fixtures.db', fd=215)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmpd2tleqni/fixtures.db', fd=216)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmpd2tleqni/fixtures.db', fd=217)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmplpdc3wfl/fixtures.db', fd=219)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmpdnsscl5v/fixtures.db', fd=222)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmptjayd3pn/fixtures.db', fd=223)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmp4u5oo5ne/fixtures.db', fd=224)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmp0dgqc4wx/fixtures.db', fd=225)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmpdnsscl5v/fixtures.db', fd=226)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmpoehh1_tg/fixtures.db', fd=227)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmp4u5oo5ne/fixtures.db', fd=247)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmp0dgqc4wx/fixtures.db', fd=251)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmpoehh1_tg/fixtures.db', fd=253)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/tmptjayd3pn/fixtures.db', fd=254)\r\npopenfile(path='/private/var/folders/wr/hn3206rs1yzgq3r49bz8nvnh0000gn/T/pytest-of-simon/pytest-14/test-view-names0/fixtures.db', fd=255)\r\n```\r\nClearly something is bad with the way fixtures work in the tests - a huge number of `fixtures.db` database files are being created and left open!", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1408757705, "label": "Intermittent \"Too many open files\" error running tests"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1843#issuecomment-1278480437", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1843", "id": 1278480437, "node_id": "IC_kwDOBm6k_c5MNBA1", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-10-14T04:51:10Z", "updated_at": "2022-10-14T04:51:10Z", "author_association": "OWNER", "body": "Extracted a TIL: https://til.simonwillison.net/python/too-many-open-files-psutil", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1408757705, "label": "Intermittent \"Too many open files\" error running tests"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1843#issuecomment-1278537920", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1843", "id": 1278537920, "node_id": "IC_kwDOBm6k_c5MNPDA", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-10-14T06:19:55Z", "updated_at": "2022-10-14T06:20:06Z", "author_association": "OWNER", "body": "Maybe I need to explicitly close those SQLite connections held by the Datasette instance after this line: https://github.com/simonw/datasette/blob/79aa0de083d38a9975915d5a4cc68ca6c74fbe3d/tests/fixtures.py#L165", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1408757705, "label": "Intermittent \"Too many open files\" error running tests"}, "performed_via_github_app": null} {"html_url": "https://github.com/dogsheep/github-to-sqlite/issues/51#issuecomment-1279224780", "issue_url": "https://api.github.com/repos/dogsheep/github-to-sqlite/issues/51", "id": 1279224780, "node_id": "IC_kwDODFdgUs5MP2vM", "user": {"value": 7908073, "label": "chapmanjacobd"}, "created_at": "2022-10-14T16:34:07Z", "updated_at": "2022-10-14T16:34:07Z", "author_association": "NONE", "body": "also, it says that authenticated requests have a much higher \"rate limit\". Unauthenticated requests only get 60 req/hour ?? seems more like a quota than a \"rate limit\" (although I guess that is semantic equivalence)\r\n\r\nYou would want to use `x-ratelimit-reset`\r\n\r\n```\r\ntime.sleep(r['x-ratelimit-reset'] + 1 - time.time())\r\n```\r\n\r\nBut a more complete solution would bring authenticated requests to the other subcommands. I'm surprised only `github-to-sqlite get` is using the `--auth=` CLI flag", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 703246031, "label": "github-to-sqlite should handle rate limits better"}, "performed_via_github_app": null} {"html_url": "https://github.com/dogsheep/twitter-to-sqlite/issues/60#issuecomment-1279249898", "issue_url": "https://api.github.com/repos/dogsheep/twitter-to-sqlite/issues/60", "id": 1279249898, "node_id": "IC_kwDODEm0Qs5MP83q", "user": {"value": 7908073, "label": "chapmanjacobd"}, "created_at": "2022-10-14T16:58:26Z", "updated_at": "2022-10-14T16:58:26Z", "author_association": "NONE", "body": "You could try using `msys2`. I've had better luck running python CLIs within that system on Windows.\r\n\r\nHere is a guide: https://github.com/chapmanjacobd/lb/blob/main/Windows.md#prep", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1063982712, "label": "Execution on Windows"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1844#issuecomment-1279311487", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1844", "id": 1279311487, "node_id": "IC_kwDOBm6k_c5MQL5_", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-10-14T18:06:53Z", "updated_at": "2022-10-14T19:33:24Z", "author_association": "OWNER", "body": "I just spotted some other out-dated screenshots in the `docs/` directory:\r\n\r\n- [x] [advanced_export.png](https://github.com/simonw/datasette/blob/main/docs/advanced_export.png \"advanced_export.png\")\r\n- [x] [binary_data.png](https://github.com/simonw/datasette/blob/main/docs/binary_data.png \"binary_data.png\")\r\n- [x] [facets.png](https://github.com/simonw/datasette/blob/main/docs/facets.png \"facets.png\")\r\n- [x] [full_text_search.png](https://github.com/simonw/datasette/blob/main/docs/full_text_search.png \"full_text_search.png\")\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1409679008, "label": "Update screenshots in documentation to match latest designs"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1844#issuecomment-1279314400", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1844", "id": 1279314400, "node_id": "IC_kwDOBm6k_c5MQMng", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-10-14T18:10:07Z", "updated_at": "2022-10-14T18:13:36Z", "author_association": "OWNER", "body": "For the advanced export one:\r\n\r\n shot-scraper 'https://register-of-members-interests.datasettes.com/regmem/items?_search=hamper' -s '#export' -p 10\r\n\r\nProduces:\r\n\r\n![register-of-members-interests-datasettes-com-regmem-items 2](https://user-images.githubusercontent.com/9599/195913614-448557aa-5ec6-4a83-98cf-8837d3117204.png)\r\n\r\nCurrent image is:\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": 1409679008, "label": "Update screenshots in documentation to match latest designs"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1844#issuecomment-1279316670", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1844", "id": 1279316670, "node_id": "IC_kwDOBm6k_c5MQNK-", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-10-14T18:12:39Z", "updated_at": "2022-10-14T18:12:39Z", "author_association": "OWNER", "body": "New screenshot of FTS, from https://register-of-members-interests.datasettes.com/regmem/items?_search=hamper&_sort_desc=date\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": 1409679008, "label": "Update screenshots in documentation to match latest designs"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1844#issuecomment-1279323714", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1844", "id": 1279323714, "node_id": "IC_kwDOBm6k_c5MQO5C", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-10-14T18:21:03Z", "updated_at": "2022-10-14T18:21:03Z", "author_association": "OWNER", "body": "For this image:\r\n\r\n\r\n\r\nhttps://latest.datasette.io/fixtures/binary_data has an extra row these days:\r\n\r\n\"image\"\r\n\r\nThis deletes every row past the first two (first three including the header row):\r\n```javascipt\r\nArray.from(document.querySelectorAll('tr:nth-child(n+3)'), el => el.parentNode.removeChild(el));\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1409679008, "label": "Update screenshots in documentation to match latest designs"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1844#issuecomment-1279325003", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1844", "id": 1279325003, "node_id": "IC_kwDOBm6k_c5MQPNL", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-10-14T18:22:35Z", "updated_at": "2022-10-14T18:22:35Z", "author_association": "OWNER", "body": "So:\r\n```\r\nshot-scraper 'https://latest.datasette.io/fixtures/binary_data' \\\r\n -j \"Array.from(document.querySelectorAll('tr:nth-child(n+3)'), el => el.parentNode.removeChild(el));\" \\\r\n -s table -p 10\r\n```\r\n![latest-datasette-io-fixtures-binary_data 1](https://user-images.githubusercontent.com/9599/195915092-be81db43-5672-4375-bd66-4316211b1afc.png)\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1409679008, "label": "Update screenshots in documentation to match latest designs"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1844#issuecomment-1279325685", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1844", "id": 1279325685, "node_id": "IC_kwDOBm6k_c5MQPX1", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-10-14T18:23:22Z", "updated_at": "2022-10-14T18:23:22Z", "author_association": "OWNER", "body": "Here's the new advanced export image:\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": 1409679008, "label": "Update screenshots in documentation to match latest designs"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1844#issuecomment-1279334694", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1844", "id": 1279334694, "node_id": "IC_kwDOBm6k_c5MQRkm", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-10-14T18:33:41Z", "updated_at": "2022-10-14T18:34:32Z", "author_association": "OWNER", "body": "I'm going to use this page for the facets screenshot: https://congress-legislators.datasettes.com/legislators/legislator_terms?_facet=type&_facet=party&_facet=state&_facet_size=10\r\n\r\nTrying for this bit:\r\n\r\n\"image\"\r\n\r\nWhich incorporates `.suggested-facets` but also the first 3 rows and 10 columns of the table, I wonder if I can specify that in a single selector?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1409679008, "label": "Update screenshots in documentation to match latest designs"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1844#issuecomment-1279339124", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1844", "id": 1279339124, "node_id": "IC_kwDOBm6k_c5MQSp0", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-10-14T18:38:22Z", "updated_at": "2022-10-14T18:42:58Z", "author_association": "OWNER", "body": "This seems to get every table cell in that table for the first 3 rows and the columns up to `party`:\r\n\r\n document.querySelectorAll('tr:not(:nth-child(n+4)) td:not(:nth-child(n+10))')", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1409679008, "label": "Update screenshots in documentation to match latest designs"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1844#issuecomment-1279348239", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1844", "id": 1279348239, "node_id": "IC_kwDOBm6k_c5MQU4P", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-10-14T18:49:22Z", "updated_at": "2022-10-14T18:49:22Z", "author_association": "OWNER", "body": "This works:\r\n```\r\nshot-scraper\r\n 'https://congress-legislators.datasettes.com/legislators/legislator_terms?_facet=type&_facet=party&_facet=state&_facet_size=10' \\\r\n -s '.suggested-facets a' \\\r\n --selector-all 'tr:not(tr:nth-child(n+4)) td:not(:nth-child(n+11))' \\\r\n -p 10\r\n```\r\n![congress-legislators-datasettes-com-legislators-legislator_terms 6](https://user-images.githubusercontent.com/9599/195919422-97616694-3ec0-4e05-afc2-c509275c767c.png)\r\n\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": 1409679008, "label": "Update screenshots in documentation to match latest designs"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1844#issuecomment-1279349314", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1844", "id": 1279349314, "node_id": "IC_kwDOBm6k_c5MQVJC", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-10-14T18:50:42Z", "updated_at": "2022-10-14T19:34:37Z", "author_association": "OWNER", "body": "I'm going to link the documentation screenshots directly to the images in the https://github.com/simonw/datasette-screenshots repository - but I don't want those images to reflect `main` when the documentation may reflect a specific version.\r\n\r\nSo I'm going to start tagging releases of `datasette-screenshots` so I can get permanent URLs to those images.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1409679008, "label": "Update screenshots in documentation to match latest designs"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1844#issuecomment-1279382674", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1844", "id": 1279382674, "node_id": "IC_kwDOBm6k_c5MQdSS", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-10-14T19:33:16Z", "updated_at": "2022-10-14T19:33:16Z", "author_association": "OWNER", "body": "That's the last two screenshots:\r\n\r\n\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": 1409679008, "label": "Update screenshots in documentation to match latest designs"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1844#issuecomment-1279383121", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1844", "id": 1279383121, "node_id": "IC_kwDOBm6k_c5MQdZR", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-10-14T19:33:49Z", "updated_at": "2022-10-14T19:33:49Z", "author_association": "OWNER", "body": "I'm going to tag `datasette-screenshots` with the current Datasette version, `0.62`.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1409679008, "label": "Update screenshots in documentation to match latest designs"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1844#issuecomment-1279392717", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1844", "id": 1279392717, "node_id": "IC_kwDOBm6k_c5MQfvN", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-10-14T19:44:44Z", "updated_at": "2022-10-14T19:45:54Z", "author_association": "OWNER", "body": "OK, the URLs to use in the docs are:\r\n\r\n* https://raw.githubusercontent.com/simonw/datasette-screenshots/0.62/advanced-export.png (retina)\r\n* https://raw.githubusercontent.com/simonw/datasette-screenshots/0.62/non-retina/regmem-search.png\r\n* https://raw.githubusercontent.com/simonw/datasette-screenshots/0.62/binary-data.png (retina)\r\n* https://raw.githubusercontent.com/simonw/datasette-screenshots/0.62/non-retina/faceting-details.png\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1409679008, "label": "Update screenshots in documentation to match latest designs"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1844#issuecomment-1279405429", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1844", "id": 1279405429, "node_id": "IC_kwDOBm6k_c5MQi11", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-10-14T20:00:26Z", "updated_at": "2022-10-14T20:00:26Z", "author_association": "OWNER", "body": "New images are now live on these pages:\r\n- https://docs.datasette.io/en/latest/csv_export.html\r\n- https://docs.datasette.io/en/latest/binary_data.html\r\n- https://docs.datasette.io/en/latest/facets.html\r\n- https://docs.datasette.io/en/latest/full_text_search.html\r\n- https://docs.datasette.io/en/latest/changelog.html#v0-23 (was a duplicate of the advanced export image)", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1409679008, "label": "Update screenshots in documentation to match latest designs"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1844#issuecomment-1279406134", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1844", "id": 1279406134, "node_id": "IC_kwDOBm6k_c5MQjA2", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-10-14T20:01:13Z", "updated_at": "2022-10-14T20:01:13Z", "author_association": "OWNER", "body": "Here's the YAML I added to https://github.com/simonw/datasette-screenshots/blob/main/shots.yml for this issue:\r\n\r\n```yaml\r\n- url: https://register-of-members-interests.datasettes.com/regmem/items?_search=hamper&_sort_desc=date\r\n height: 585\r\n width: 960\r\n output: regmem-search.png\r\n- url: https://register-of-members-interests.datasettes.com/regmem/items?_search=hamper\r\n selector: \"#export\"\r\n output: advanced-export.png\r\n padding: 10\r\n- url: https://congress-legislators.datasettes.com/legislators/legislator_terms?_facet=type&_facet=party&_facet=state&_facet_size=10\r\n selectors_all:\r\n - .suggested-facets a\r\n - tr:not(tr:nth-child(n+4)) td:not(:nth-child(n+11))\r\n padding: 10\r\n output: faceting-details.png\r\n- url: https://latest.datasette.io/fixtures/binary_data\r\n selector: table\r\n javascript: |-\r\n Array.from(\r\n document.querySelectorAll('tr:nth-child(n+3)'),\r\n el => el.parentNode.removeChild(el)\r\n );\r\n padding: 10\r\n output: binary-data.png\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1409679008, "label": "Update screenshots in documentation to match latest designs"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1844#issuecomment-1279415365", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1844", "id": 1279415365, "node_id": "IC_kwDOBm6k_c5MQlRF", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-10-14T20:11:55Z", "updated_at": "2022-10-14T20:11:55Z", "author_association": "OWNER", "body": "Twitter thread about this issue: https://twitter.com/simonw/status/1581012617526595584", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1409679008, "label": "Update screenshots in documentation to match latest designs"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1844#issuecomment-1279427618", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1844", "id": 1279427618, "node_id": "IC_kwDOBm6k_c5MQoQi", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-10-14T20:25:45Z", "updated_at": "2022-10-14T20:25:45Z", "author_association": "OWNER", "body": "Extracted a TIL: https://til.simonwillison.net/shot-scraper/subset-of-table-columns", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1409679008, "label": "Update screenshots in documentation to match latest designs"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1844#issuecomment-1279598878", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1844", "id": 1279598878, "node_id": "IC_kwDOBm6k_c5MRSEe", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-10-14T23:51:46Z", "updated_at": "2022-10-14T23:51:46Z", "author_association": "OWNER", "body": "Blogged about this here: https://simonwillison.net/2022/Oct/14/automating-screenshots/", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1409679008, "label": "Update screenshots in documentation to match latest designs"}, "performed_via_github_app": null}