issue_comments: 1257072258
This data as json
html_url | issue_url | id | node_id | user | created_at | updated_at | author_association | body | reactions | issue | performed_via_github_app |
---|---|---|---|---|---|---|---|---|---|---|---|
https://github.com/simonw/sqlite-utils/issues/490#issuecomment-1257072258 | https://api.github.com/repos/simonw/sqlite-utils/issues/490 | 1257072258 | IC_kwDOCGYnMM5K7WaC | 6180701 | 2022-09-24T22:01:05Z | 2022-09-24T22:01:05Z | NONE | For completeness, the regex requires a bit more dark magic to capture the following lines, here is a _working_ expression: https://regex101.com/r/rsuEcs/1 ``` 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})(?:\:\s)(?P<log>(.*\s\s.*|.*)+)', re.MULTILINE) def convert(text): return [m.groupdict() for m in r.finditer(text)] " ``` ``` BEGIN TRANSACTION; CREATE TABLE [log] ( [datetime] TEXT, [log] TEXT ); INSERT INTO "log" VALUES('2022-03-01T12:04:52','Here is a log message that spans multiple lines'); INSERT INTO "log" VALUES('2022-03-01T12:04:52','This is a single line'); INSERT INTO "log" VALUES('2022-03-01T12:04:52','Here is another message that spans multiple lines'); COMMIT; ``` | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1382457780 |