issue_comments
6 rows where "created_at" is on date 2022-09-23 sorted by reactions
This data as json, CSV (advanced)
Suggested facets: author_association, issue
reactions 1 ✖
id | html_url | issue_url | node_id | user | created_at | updated_at | author_association | body | reactions ▼ | issue | performed_via_github_app |
---|---|---|---|---|---|---|---|---|---|---|---|
1256428818 | https://github.com/simonw/sqlite-utils/issues/490#issuecomment-1256428818 | https://api.github.com/repos/simonw/sqlite-utils/issues/490 | IC_kwDOCGYnMM5K45US | simonw 9599 | 2022-09-23T16:37:58Z | 2022-09-23T16:38:35Z | OWNER | It should be possible to achieve this with the `--text` option: https://sqlite-utils.datasette.io/en/stable/cli.html?highlight=text#convert-with-text Given an example like this in `multiline.log`: ``` 2022-03-01T12:04:52: Here is a log message that spans multiple lines 2022-03-01T12:04:52: This is a single line 2022-03-01T12:04:52: Here is another message that spans multiple lines ``` You should be able to run something like this: ``` sqlite-utils insert /tmp/log.db log multiline.log --text --convert " import re r = re.compile(r'^(?P<datetime>\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}):(?P<log>.*)', re.MULTILINE) def convert(text): return [m.groupdict() for m in r.finditer(text)] " ``` After running this I get: ``` sqlite-utils rows /tmp/log.db log [{"datetime": "2022-03-01T12:04:52", "log": " Here is a log message"}, {"datetime": "2022-03-01T12:04:52", "log": " This is a single line"}, {"datetime": "2022-03-01T12:04:52", "log": " Here is another message"}] ``` | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Ability to insert multi-line files 1382457780 | |
1256650449 | https://github.com/simonw/datasette/issues/1817#issuecomment-1256650449 | https://api.github.com/repos/simonw/datasette/issues/1817 | IC_kwDOBm6k_c5K5vbR | simonw 9599 | 2022-09-23T20:38:53Z | 2022-09-23T20:38:53Z | OWNER | I've wanted something like this in the past too. I think the thing to do here might be to add `sql` and `params` arguments to a bunch of the plugin hooks, such that they can see the main query that is being used on the page that they are helping to render. While I'm working on this: https://docs.datasette.io/en/0.62/plugin_hooks.html#register-output-renderer-datasette output renderer functions take `sql` but do not currently take `params` - they should also take `params`. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Expose `sql` and `params` arguments to various plugin hooks 1384273985 | |
1256652548 | https://github.com/simonw/datasette/issues/1817#issuecomment-1256652548 | https://api.github.com/repos/simonw/datasette/issues/1817 | IC_kwDOBm6k_c5K5v8E | simonw 9599 | 2022-09-23T20:41:32Z | 2022-09-23T20:41:32Z | OWNER | Which plugin hooks should take `sql` and `params`? - [extra_template_vars(template, database, table, columns, view_name, request, datasette)](https://docs.datasette.io/en/0.62/plugin_hooks.html#extra-template-vars-template-database-table-columns-view-name-request-datasette) - [extra_css_urls(template, database, table, columns, view_name, request, datasette)](https://docs.datasette.io/en/0.62/plugin_hooks.html#extra-css-urls-template-database-table-columns-view-name-request-datasette) - [extra_js_urls(template, database, table, columns, view_name, request, datasette)](https://docs.datasette.io/en/0.62/plugin_hooks.html#extra-js-urls-template-database-table-columns-view-name-request-datasette) - [extra_body_script(template, database, table, columns, view_name, request, datasette)](https://docs.datasette.io/en/0.62/plugin_hooks.html#extra-body-script-template-database-table-columns-view-name-request-datasette) And maybe these: - [render_cell(row, value, column, table, database, datasette)](https://docs.datasette.io/en/0.62/plugin_hooks.html#render-cell-row-value-column-table-database-datasette) - [table_actions(datasette, actor, database, table, request)](https://docs.datasette.io/en/0.62/plugin_hooks.html#table-actions-datasette-actor-database-table-request) I'll start by implementing the first set, then I'll think further about those "maybes". | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Expose `sql` and `params` arguments to various plugin hooks 1384273985 | |
1256659788 | https://github.com/simonw/datasette/issues/1817#issuecomment-1256659788 | https://api.github.com/repos/simonw/datasette/issues/1817 | IC_kwDOBm6k_c5K5xtM | simonw 9599 | 2022-09-23T20:49:22Z | 2022-09-23T20:49:22Z | OWNER | Implementation challenge: all four of those hooks are called inside the `datasette.render_template()` method, which has this signature: https://github.com/simonw/datasette/blob/cb1e093fd361b758120aefc1a444df02462389a3/datasette/app.py#L945-L947 So I would have to pull the `sql` and `params` variables out of the `context` since they are not being passed to that method. OR I could teach that method to take those as optional arguments. Might be an opportunity to clean up this hack: https://github.com/simonw/datasette/blob/cb1e093fd361b758120aefc1a444df02462389a3/datasette/app.py#L959-L964 | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Expose `sql` and `params` arguments to various plugin hooks 1384273985 | |
1256662785 | https://github.com/simonw/datasette/issues/1817#issuecomment-1256662785 | https://api.github.com/repos/simonw/datasette/issues/1817 | IC_kwDOBm6k_c5K5ycB | simonw 9599 | 2022-09-23T20:53:21Z | 2022-09-23T20:53:21Z | OWNER | Maybe the signature for that method should be: ```python async def render_template( self, templates, context=None, plugin_context=None, request=None, view_name=None ): ``` Where `plugin_context` is a special dictionary of values that can be passed through to plugin hooks that accept them - so `database`, `table`, `columns`, `sql` and `params`. Those would then be passed when specific views call `render_template()` - which they currently do via calling `BaseView.render(...)`, but actually the views that are used for tables and queries don't even call that directly due to the weird designed used with `DataView` subclasses that implement a `.data()` method. So yet another change that's blocked on fixing that long-running weird piece of technical debt: - https://github.com/simonw/datasette/issues/1518 | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Expose `sql` and `params` arguments to various plugin hooks 1384273985 | |
1256781274 | https://github.com/simonw/datasette/issues/1817#issuecomment-1256781274 | https://api.github.com/repos/simonw/datasette/issues/1817 | IC_kwDOBm6k_c5K6PXa | jefftriplett 50527 | 2022-09-23T22:59:46Z | 2022-09-23T22:59:46Z | CONTRIBUTOR | While you are adding features, would you be future-proofing your APIs if you switched over some arguments over to keyword-only arguments or would that be too disruptive? Thinking out loud: ``` async def render_template( self, templates, *, context=None, plugin_context=None, request=None, view_name=None ): ``` | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Expose `sql` and `params` arguments to various plugin hooks 1384273985 |
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]);
updated_at (date) 1 ✖