issue_comments
5 rows where issue = 860625833
This data as json, CSV (advanced)
Suggested facets: user, author_association, created_at (date), updated_at (date)
id ▼ | html_url | issue_url | node_id | user | created_at | updated_at | author_association | body | reactions | issue | performed_via_github_app |
---|---|---|---|---|---|---|---|---|---|---|---|
821970965 | https://github.com/simonw/datasette/issues/1300#issuecomment-821970965 | https://api.github.com/repos/simonw/datasette/issues/1300 | MDEyOklzc3VlQ29tbWVudDgyMTk3MDk2NQ== | abdusco 3243482 | 2021-04-18T10:41:15Z | 2021-04-18T10:41:15Z | CONTRIBUTOR | If I change the hookspec and add a row parameter, it works https://github.com/simonw/datasette/blob/7a2ed9f8a119e220b66d67c7b9e07cbab47b1196/datasette/hookspecs.py#L58 ``` def render_cell(value, column, row, table, database, datasette): ``` But to generate a URL, I need the primary keys, but I can't call `pks = await db.primary_keys(table)` inside a sync function. I can't call `datasette.utils.detect_primary_keys` either, because the db connection is not publicly exposed (AFAICT). | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Make row available to `render_cell` plugin hook 860625833 | |
821971059 | https://github.com/simonw/datasette/issues/1300#issuecomment-821971059 | https://api.github.com/repos/simonw/datasette/issues/1300 | MDEyOklzc3VlQ29tbWVudDgyMTk3MTA1OQ== | abdusco 3243482 | 2021-04-18T10:42:19Z | 2021-04-18T10:42:19Z | CONTRIBUTOR | If there's a simpler way to generate a URL for a specific row, I'm all ears | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Make row available to `render_cell` plugin hook 860625833 | |
833132571 | https://github.com/simonw/datasette/issues/1300#issuecomment-833132571 | https://api.github.com/repos/simonw/datasette/issues/1300 | MDEyOklzc3VlQ29tbWVudDgzMzEzMjU3MQ== | abdusco 3243482 | 2021-05-06T00:16:50Z | 2021-05-06T00:18:05Z | CONTRIBUTOR | I ended up using some JS as a workaround. First, add a JS file in `metadata.yaml`: ```yaml extra_js_urls: - '/static/app.js' ``` then inside the script, find the blob download links and replace `.blob` extension in the url with `.jpg` and replace the links with `<img/>` elements. You need to add an output formatter to serve `BLOB` columns as JPG. You can find the code in the first post. ~~Replacing `.blob` -> `.jpg` might not even be necessary, because browsers only care about the mime type, so you only need to serve the binary content with the right `content-type` header.~~. You need to replace the extension, otherwise the output renderer will not run. ```js window.addEventListener('DOMContentLoaded', () => { function renderBlobImages() { document.querySelectorAll('a[href*=".blob"]').forEach(el => { const img = document.createElement('img'); img.className = 'blob-image'; img.loading = 'lazy'; img.src = el.href.replace('.blob', '.jpg'); el.parentElement.replaceChild(img, el); }); } renderBlobImages(); }); ``` while this does the job, I'd prefer handling this in Python where it belongs. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Make row available to `render_cell` plugin hook 860625833 | |
1177893425 | https://github.com/simonw/datasette/issues/1300#issuecomment-1177893425 | https://api.github.com/repos/simonw/datasette/issues/1300 | IC_kwDOBm6k_c5GNTox | simonw 9599 | 2022-07-07T16:28:13Z | 2022-07-07T16:28:13Z | OWNER | Adding `row` to this plugin hook is a smart idea. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Make row available to `render_cell` plugin hook 860625833 | |
1177901762 | https://github.com/simonw/datasette/issues/1300#issuecomment-1177901762 | https://api.github.com/repos/simonw/datasette/issues/1300 | IC_kwDOBm6k_c5GNVrC | simonw 9599 | 2022-07-07T16:34:05Z | 2022-07-07T16:34:05Z | OWNER | Updated documentation: https://docs.datasette.io/en/latest/plugin_hooks.html#render-cell-row-value-column-table-database-datasette | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Make row available to `render_cell` plugin hook 860625833 |
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]);