issue_comments
525 rows where author_association = "MEMBER" sorted by node_id
This data as json, CSV (advanced)
Suggested facets: created_at (date)
id | html_url | issue_url | node_id ▼ | user | created_at | updated_at | author_association | body | reactions | issue | performed_via_github_app |
---|---|---|---|---|---|---|---|---|---|---|---|
902356871 | https://github.com/dogsheep/healthkit-to-sqlite/issues/20#issuecomment-902356871 | https://api.github.com/repos/dogsheep/healthkit-to-sqlite/issues/20 | IC_kwDOC8tyDs41yN-H | simonw 9599 | 2021-08-20T01:12:48Z | 2021-08-20T01:12:48Z | MEMBER | Also on `workout_points.workout_id` to speed up queries to show all points in a specific workout. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Add index on workout_points.date 975166271 | |
902355471 | https://github.com/dogsheep/healthkit-to-sqlite/issues/20#issuecomment-902355471 | https://api.github.com/repos/dogsheep/healthkit-to-sqlite/issues/20 | IC_kwDOC8tyDs41yNoP | simonw 9599 | 2021-08-20T01:09:07Z | 2021-08-20T01:09:07Z | MEMBER | Workaround: sqlite-utils create-index healthkit.db workout_points -- -date See https://sqlite-utils.datasette.io/en/stable/cli.html#creating-indexes | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Add index on workout_points.date 975166271 | |
1502543165 | https://github.com/dogsheep/swarm-to-sqlite/issues/13#issuecomment-1502543165 | https://api.github.com/repos/dogsheep/swarm-to-sqlite/issues/13 | IC_kwDODD6af85Zjv09 | simonw 9599 | 2023-04-11T01:10:36Z | 2023-04-11T01:11:47Z | MEMBER | I just had that error myself on macOS while running the tests: ``` ERROR tests/test_save_checkin.py::test_tables - sqlite3.OperationalError: table sqlite_master may not be modified ERROR tests/test_save_checkin.py::test_venue - sqlite3.OperationalError: table sqlite_master may not be modified ERROR tests/test_save_checkin.py::test_event - sqlite3.OperationalError: table sqlite_master may not be modified ERROR tests/test_save_checkin.py::test_sticker - sqlite3.OperationalError: table sqlite_master may not be modified ERROR tests/test_save_checkin.py::test_likes - sqlite3.OperationalError: table sqlite_master may not be modified ERROR tests/test_save_checkin.py::test_with_ - sqlite3.OperationalError: table sqlite_master may not be modified ERROR tests/test_save_checkin.py::test_users - sqlite3.OperationalError: table sqlite_master may not be modified ERROR tests/test_save_checkin.py::test_photos - sqlite3.OperationalError: table sqlite_master may not be modified ERROR tests/test_save_checkin.py::test_posts - sqlite3.OperationalError: table sqlite_master may not be modified ERROR tests/test_save_checkin.py::test_view - sqlite3.OperationalError: table sqlite_master may not be modified ``` `pytest --pdb` shows it happening in the bit that adds foreign keys: ``` > /Users/simon/.local/share/virtualenvs/swarm-to-sqlite-daPW7yIJ/lib/python3.9/site-packages/sqlite_utils/db.py(1096)add_foreign_keys() -> cursor.execute( (Pdb) list 1096 >> cursor.execute( 1097 "UPDATE sqlite_master SET sql = ? WHERE name = ?", 1098 (new_sql, table_name), 1099 ) 1100 cursor.execute("PRAGMA schema_version = %d" % (schema_version + 1)) 1101 -> cursor.execute("PRAGMA writable_schema = 0") 1102 # Have to VACUUM outside the transaction to ensure .foreign_keys property 1103 # can see the newly created foreign key. 1104 self.vacuum() ``` | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | fails before generating views. ERR: table sqlite_master may not be modified 1373210675 | |
1502546045 | https://github.com/dogsheep/swarm-to-sqlite/issues/13#issuecomment-1502546045 | https://api.github.com/repos/dogsheep/swarm-to-sqlite/issues/13 | IC_kwDODD6af85Zjwh9 | simonw 9599 | 2023-04-11T01:14:50Z | 2023-04-11T01:14:50Z | MEMBER | Related: - https://github.com/simonw/sqlite-utils/issues/235 | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | fails before generating views. ERR: table sqlite_master may not be modified 1373210675 | |
1502629219 | https://github.com/dogsheep/swarm-to-sqlite/issues/13#issuecomment-1502629219 | https://api.github.com/repos/dogsheep/swarm-to-sqlite/issues/13 | IC_kwDODD6af85ZkE1j | simonw 9599 | 2023-04-11T03:15:26Z | 2023-04-11T03:15:26Z | MEMBER | OK, I figured this out. Unfortunately it's an error that occurs on Python versions that have defensive mode turned on, and it doesn't look like there's a way to turn that mode off. See notes above. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | fails before generating views. ERR: table sqlite_master may not be modified 1373210675 | |
1502629404 | https://github.com/dogsheep/swarm-to-sqlite/issues/13#issuecomment-1502629404 | https://api.github.com/repos/dogsheep/swarm-to-sqlite/issues/13 | IC_kwDODD6af85ZkE4c | simonw 9599 | 2023-04-11T03:15:47Z | 2023-04-11T03:46:17Z | MEMBER | I think `swarm-to-sqlite` needs to avoid this error, maybe by setting up foreign keys in another way - or even by skipping foreign keys entirely on databases that don't support this kind of operation. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | fails before generating views. ERR: table sqlite_master may not be modified 1373210675 | |
902327457 | https://github.com/dogsheep/twitter-to-sqlite/issues/57#issuecomment-902327457 | https://api.github.com/repos/dogsheep/twitter-to-sqlite/issues/57 | IC_kwDODEm0Qs41yGyh | simonw 9599 | 2021-08-19T23:53:25Z | 2021-08-19T23:53:25Z | MEMBER | I'm getting this too. Looking into it now. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Error: Use either --since or --since_id, not both 907645813 | |
902328369 | https://github.com/dogsheep/twitter-to-sqlite/issues/57#issuecomment-902328369 | https://api.github.com/repos/dogsheep/twitter-to-sqlite/issues/57 | IC_kwDODEm0Qs41yHAx | simonw 9599 | 2021-08-19T23:56:26Z | 2021-08-19T23:56:26Z | MEMBER | https://developer.twitter.com/en/docs/twitter-api/v1/tweets/timelines/api-reference/get-statuses-user_timeline says the API has been replaced by the new v2 one, but it should still work - and the `since_id` parameter is still documented on that page. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Error: Use either --since or --since_id, not both 907645813 | |
902328760 | https://github.com/dogsheep/twitter-to-sqlite/issues/57#issuecomment-902328760 | https://api.github.com/repos/dogsheep/twitter-to-sqlite/issues/57 | IC_kwDODEm0Qs41yHG4 | simonw 9599 | 2021-08-19T23:57:41Z | 2021-08-19T23:57:41Z | MEMBER | Weird, added debug code and got this: `{'screen_name': 'simonw', 'count': 200, 'since_id': 'False', 'tweet_mode': 'extended'}` - so maybe it's a `twitter-to-sqlite` bug where somehow the string `False` is being passed somewhere. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Error: Use either --since or --since_id, not both 907645813 | |
902329455 | https://github.com/dogsheep/twitter-to-sqlite/issues/57#issuecomment-902329455 | https://api.github.com/repos/dogsheep/twitter-to-sqlite/issues/57 | IC_kwDODEm0Qs41yHRv | simonw 9599 | 2021-08-19T23:59:56Z | 2021-08-19T23:59:56Z | MEMBER | This looks like the bug to me: https://github.com/dogsheep/twitter-to-sqlite/blob/197e69cec40052c423a5ed071feb5f7cccea41b9/twitter_to_sqlite/cli.py#L239-L241 `type=str, default=False` | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Error: Use either --since or --since_id, not both 907645813 | |
902329884 | https://github.com/dogsheep/twitter-to-sqlite/issues/57#issuecomment-902329884 | https://api.github.com/repos/dogsheep/twitter-to-sqlite/issues/57 | IC_kwDODEm0Qs41yHYc | simonw 9599 | 2021-08-20T00:01:05Z | 2021-08-20T00:01:05Z | MEMBER | Maybe Click changed something which meant that this broke things when it didn't used to? | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Error: Use either --since or --since_id, not both 907645813 | |
902330301 | https://github.com/dogsheep/twitter-to-sqlite/pull/49#issuecomment-902330301 | https://api.github.com/repos/dogsheep/twitter-to-sqlite/issues/49 | IC_kwDODEm0Qs41yHe9 | simonw 9599 | 2021-08-20T00:01:56Z | 2021-08-20T00:01:56Z | MEMBER | Thanks! | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Document the use of --stop_after with favorites, refs #20 681575714 | |
924209583 | https://github.com/dogsheep/twitter-to-sqlite/pull/59#issuecomment-924209583 | https://api.github.com/repos/dogsheep/twitter-to-sqlite/issues/59 | IC_kwDODEm0Qs43FlGv | simonw 9599 | 2021-09-21T17:37:34Z | 2021-09-21T17:37:34Z | MEMBER | Thanks for this! | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Fix for since_id bug, closes #58 984942782 | |
985928838 | https://github.com/dogsheep/github-to-sqlite/issues/69#issuecomment-985928838 | https://api.github.com/repos/dogsheep/github-to-sqlite/issues/69 | IC_kwDODFdgUs46xBSG | simonw 9599 | 2021-12-04T00:34:52Z | 2021-12-04T00:34:52Z | MEMBER | First attempt at this: ```sql select 'issues' as "table", id, node_id, title, user, created_at, body, repo from issues union all select 'issue_comments' as "table", issue_comments.id, issue_comments.node_id, '' as title, issue_comments.user, issue_comments.created_at, issue_comments.body, issues.repo from issue_comments join issues on issues.id = issue_comments.issue order by created_at desc ``` https://github-to-sqlite.dogsheep.net/github?sql=select+%27issues%27+as+%22table%22%2C+id%2C+node_id%2C+title%2C+user%2C+created_at%2C+body%2C+repo%0D%0Afrom+issues%0D%0Aunion+all%0D%0Aselect+%27issue_comments%27+as+%22table%22%2C+issue_comments.id%2C+issue_comments.node_id%2C+%27%27+as+title%2C+issue_comments.user%2C+issue_comments.created_at%2C+issue_comments.body%2C+issues.repo%0D%0Afrom+issue_comments+join+issues+on+issues.id+%3D+issue_comments.issue%0D%0Aorder+by+created_at+desc | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | View that combines issues and issue comments 1071071397 | |
1105474232 | https://github.com/dogsheep/github-to-sqlite/issues/72#issuecomment-1105474232 | https://api.github.com/repos/dogsheep/github-to-sqlite/issues/72 | IC_kwDODFdgUs5B5DK4 | simonw 9599 | 2022-04-21T17:02:15Z | 2022-04-21T17:02:15Z | MEMBER | That's interesting - yeah it looks like the number of pages can be derived from the `Link` header, which is enough information to show a progress bar, probably using Click just to avoid adding another dependency. https://docs.github.com/en/rest/guides/traversing-with-pagination | {"total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | feature: display progress bar when downloading multi-page responses 1211283427 | |
1188223299 | https://github.com/dogsheep/github-to-sqlite/pull/73#issuecomment-1188223299 | https://api.github.com/repos/dogsheep/github-to-sqlite/issues/73 | IC_kwDODFdgUs5G0tlD | simonw 9599 | 2022-07-18T19:40:06Z | 2022-07-18T19:40:06Z | MEMBER | Thanks! | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Fixing 'NoneType' object has no attribute 'items' 1261884917 | |
1188223933 | https://github.com/dogsheep/github-to-sqlite/issues/74#issuecomment-1188223933 | https://api.github.com/repos/dogsheep/github-to-sqlite/issues/74 | IC_kwDODFdgUs5G0tu9 | simonw 9599 | 2022-07-18T19:40:50Z | 2022-07-18T19:42:41Z | MEMBER | Here's how the demo is deployed: https://github.com/dogsheep/github-to-sqlite/blob/dbac2e5dd8a562b45d8255a265859cf8020ca22a/.github/workflows/deploy-demo.yml#L103-L119 I'm suspicious of `py-gfm`, which is used like this: https://github.com/dogsheep/github-to-sqlite/blob/dbac2e5dd8a562b45d8255a265859cf8020ca22a/demo-metadata.json#L49-L51 | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 500 error in github-to-sqlite demo 1308461063 | |
1188228964 | https://github.com/dogsheep/github-to-sqlite/issues/74#issuecomment-1188228964 | https://api.github.com/repos/dogsheep/github-to-sqlite/issues/74 | IC_kwDODFdgUs5G0u9k | simonw 9599 | 2022-07-18T19:45:30Z | 2022-07-18T19:47:35Z | MEMBER | `pycmarkgfm` doesn't implement the Markdown plugin extension I was using. I'm going to drop the GFM rendering from the demo, and just treat it as regular markdown. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 500 error in github-to-sqlite demo 1308461063 | |
1188225625 | https://github.com/dogsheep/github-to-sqlite/issues/74#issuecomment-1188225625 | https://api.github.com/repos/dogsheep/github-to-sqlite/issues/74 | IC_kwDODFdgUs5G0uJZ | simonw 9599 | 2022-07-18T19:41:52Z | 2022-07-18T19:41:52Z | MEMBER | https://github.com/Zopieux/py-gfm says that library is no longer maintained, and suggests https://github.com/Zopieux/pycmarkgfm as an alternative. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 500 error in github-to-sqlite demo 1308461063 | |
1188233729 | https://github.com/dogsheep/github-to-sqlite/issues/74#issuecomment-1188233729 | https://api.github.com/repos/dogsheep/github-to-sqlite/issues/74 | IC_kwDODFdgUs5G0wIB | simonw 9599 | 2022-07-18T19:51:02Z | 2022-07-18T19:51:02Z | MEMBER | Takes 30m to deploy the demo! | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 500 error in github-to-sqlite demo 1308461063 | |
1188317682 | https://github.com/dogsheep/github-to-sqlite/issues/74#issuecomment-1188317682 | https://api.github.com/repos/dogsheep/github-to-sqlite/issues/74 | IC_kwDODFdgUs5G1Eny | simonw 9599 | 2022-07-18T21:14:22Z | 2022-07-18T21:14:22Z | MEMBER | That fixed it. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 500 error in github-to-sqlite demo 1308461063 | |
1498167714 | https://github.com/dogsheep/github-to-sqlite/issues/79#issuecomment-1498167714 | https://api.github.com/repos/dogsheep/github-to-sqlite/issues/79 | IC_kwDODFdgUs5ZTDmi | simonw 9599 | 2023-04-05T21:12:55Z | 2023-04-05T21:12:55Z | MEMBER | It's a rate limiting problem: https://github.com/dogsheep/github-to-sqlite/actions/runs/4622674009/jobs/8175633155 ``` File "/home/runner/work/github-to-sqlite/github-to-sqlite/github_to_sqlite/cli.py", line 407, in commits utils.save_commits(db, commits, repo_full["id"]) File "/home/runner/work/github-to-sqlite/github-to-sqlite/github_to_sqlite/utils.py", line 635, in save_commits for commit in commits: File "/home/runner/work/github-to-sqlite/github-to-sqlite/github_to_sqlite/utils.py", line 417, in fetch_commits for commits in paginate(url, headers): File "/home/runner/work/github-to-sqlite/github-to-sqlite/github_to_sqlite/utils.py", line 478, in paginate raise GitHubError.from_response(response) github_to_sqlite.utils.GitHubError: ('API rate limit exceeded for user ID 9599.', 403) Error: Process completed with exit code 1. ``` | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Deploy demo job is failing due to rate limit 1570375808 | |
1221623052 | https://github.com/dogsheep/pocket-to-sqlite/issues/10#issuecomment-1221623052 | https://api.github.com/repos/dogsheep/pocket-to-sqlite/issues/10 | IC_kwDODLZ_YM5I0H0M | simonw 9599 | 2022-08-21T21:20:33Z | 2022-08-21T21:20:33Z | MEMBER | That was clearly the intention from the description of this issue: - #4 | {"total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | When running `auth` command, don't overwrite an existing auth.json file 1246826792 | |
1221621466 | https://github.com/dogsheep/pocket-to-sqlite/issues/11#issuecomment-1221621466 | https://api.github.com/repos/dogsheep/pocket-to-sqlite/issues/11 | IC_kwDODLZ_YM5I0Hba | simonw 9599 | 2022-08-21T21:09:47Z | 2022-08-21T21:09:47Z | MEMBER | Great catch, thanks. I'm going to use it to mean `--auth` - since other tools in the Dogsheep family have the same convention. `--all` will be the only way to specify all. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | -a option is used for "--auth" and for "--all" 1345452427 | |
1221621529 | https://github.com/dogsheep/pocket-to-sqlite/issues/11#issuecomment-1221621529 | https://api.github.com/repos/dogsheep/pocket-to-sqlite/issues/11 | IC_kwDODLZ_YM5I0HcZ | simonw 9599 | 2022-08-21T21:10:15Z | 2022-08-21T21:11:26Z | MEMBER | Just saw that's what's implemented here already! - #7 | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | -a option is used for "--auth" and for "--all" 1345452427 | |
1221621700 | https://github.com/dogsheep/pocket-to-sqlite/pull/7#issuecomment-1221621700 | https://api.github.com/repos/dogsheep/pocket-to-sqlite/issues/7 | IC_kwDODLZ_YM5I0HfE | simonw 9599 | 2022-08-21T21:11:12Z | 2022-08-21T21:11:12Z | MEMBER | I thought this might need a documentation update but `--all` is already covered: https://github.com/dogsheep/pocket-to-sqlite/blob/0.2.1/README.md | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Fixed conflicting CLI flags 750141615 | |
1221622873 | https://github.com/dogsheep/pocket-to-sqlite/issues/10#issuecomment-1221622873 | https://api.github.com/repos/dogsheep/pocket-to-sqlite/issues/10 | IC_kwDODLZ_YM5I0HxZ | simonw 9599 | 2022-08-21T21:19:25Z | 2022-08-21T21:19:25Z | MEMBER | Agreed, that would be a much better implementation. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | When running `auth` command, don't overwrite an existing auth.json file 1246826792 | |
1627563202 | https://github.com/dogsheep/pocket-to-sqlite/issues/12#issuecomment-1627563202 | https://api.github.com/repos/dogsheep/pocket-to-sqlite/issues/12 | IC_kwDODLZ_YM5hAqTC | simonw 9599 | 2023-07-09T01:14:27Z | 2023-07-09T01:14:27Z | MEMBER | I tested this locally with `python -m build` and then `pip install ...whl` in a fresh virtual environment. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Switch to pyproject.toml 1795187493 | |
1627564127 | https://github.com/dogsheep/pocket-to-sqlite/issues/12#issuecomment-1627564127 | https://api.github.com/repos/dogsheep/pocket-to-sqlite/issues/12 | IC_kwDODLZ_YM5hAqhf | simonw 9599 | 2023-07-09T01:19:42Z | 2023-07-09T01:19:42Z | MEMBER | https://github.com/dogsheep/pocket-to-sqlite/tree/0.2.3 and https://pypi.org/project/pocket-to-sqlite/0.2.3/ | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Switch to pyproject.toml 1795187493 | |
886136224 | https://github.com/dogsheep/hacker-news-to-sqlite/issues/2#issuecomment-886136224 | https://api.github.com/repos/dogsheep/hacker-news-to-sqlite/issues/2 | IC_kwDODtX3eM400V2g | simonw 9599 | 2021-07-25T02:08:29Z | 2021-07-25T02:08:29Z | MEMBER | Prototype: curl "https://hn.algolia.com/api/v1/search_by_date?query=simonwillison.net&restrictSearchableAttributes=url&hitsPerPage=1000" | \ jq .hits | sqlite-utils insert hn.db items - --pk objectID --alter | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Command for fetching Hacker News threads from the search API 952179830 | |
886135562 | https://github.com/dogsheep/hacker-news-to-sqlite/issues/2#issuecomment-886135562 | https://api.github.com/repos/dogsheep/hacker-news-to-sqlite/issues/2 | IC_kwDODtX3eM400VsK | simonw 9599 | 2021-07-25T02:01:11Z | 2021-07-25T02:01:11Z | MEMBER | That page doesn't have an API but does look easy to scrape. The other option here is the HN Search API powered by Algolia, documented at https://hn.algolia.com/api | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Command for fetching Hacker News threads from the search API 952179830 | |
886135922 | https://github.com/dogsheep/hacker-news-to-sqlite/issues/2#issuecomment-886135922 | https://api.github.com/repos/dogsheep/hacker-news-to-sqlite/issues/2 | IC_kwDODtX3eM400Vxy | simonw 9599 | 2021-07-25T02:06:20Z | 2021-07-25T02:06:20Z | MEMBER | https://hn.algolia.com/api/v1/search_by_date?query=simonwillison.net&restrictSearchableAttributes=url looks like it does what I want. https://hn.algolia.com/api/v1/search_by_date?query=simonwillison.net&restrictSearchableAttributes=url&hitsPerPage=1000 - returns 1000 at once. Otherwise you have to paginate using `&page=2` etc - up to `nbPages` pages. https://www.algolia.com/doc/api-reference/api-parameters/hitsPerPage/ says 1000 is the maximum. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Command for fetching Hacker News threads from the search API 952179830 | |
886140431 | https://github.com/dogsheep/hacker-news-to-sqlite/issues/2#issuecomment-886140431 | https://api.github.com/repos/dogsheep/hacker-news-to-sqlite/issues/2 | IC_kwDODtX3eM400W4P | simonw 9599 | 2021-07-25T03:12:57Z | 2021-07-25T03:12:57Z | MEMBER | I'm going to build a general-purpose `hacker-new-to-sqlite search ...` command, where one of the options is to search within the URL. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Command for fetching Hacker News threads from the search API 952179830 | |
886142671 | https://github.com/dogsheep/hacker-news-to-sqlite/issues/3#issuecomment-886142671 | https://api.github.com/repos/dogsheep/hacker-news-to-sqlite/issues/3 | IC_kwDODtX3eM400XbP | simonw 9599 | 2021-07-25T03:51:05Z | 2021-07-25T03:51:05Z | MEMBER | Prototype: curl 'https://hn.algolia.com/api/v1/items/27941108' \ | jq '[recurse(.children[]) | del(.children)]' \ | sqlite-utils insert hn.db items - --pk id | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Use HN algolia endpoint to retrieve trees 952189173 | |
886237834 | https://github.com/dogsheep/hacker-news-to-sqlite/issues/3#issuecomment-886237834 | https://api.github.com/repos/dogsheep/hacker-news-to-sqlite/issues/3 | IC_kwDODtX3eM400uqK | simonw 9599 | 2021-07-25T18:05:32Z | 2021-07-25T18:05:32Z | MEMBER | If you hit the endpoint for a comment that's part of a thread you get that comment and its recursive children: https://hn.algolia.com/api/v1/items/27941552 You can tell that it's not the top-level because the `parent_id` isn't `null`. You can use `story_id` to figure out what the top-level item is. ```json { "id": 27941552, "created_at": "2021-07-24T15:08:39.000Z", "created_at_i": 1627139319, "type": "comment", "author": "nine_k", "title": null, "url": null, "text": "<p>I wish ...", "points": null, "parent_id": 27941108, "story_id": 27941108 } ``` | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Use HN algolia endpoint to retrieve trees 952189173 | |
886241674 | https://github.com/dogsheep/hacker-news-to-sqlite/issues/3#issuecomment-886241674 | https://api.github.com/repos/dogsheep/hacker-news-to-sqlite/issues/3 | IC_kwDODtX3eM400vmK | simonw 9599 | 2021-07-25T18:41:17Z | 2021-07-25T18:41:17Z | MEMBER | Got a TIL out of this: https://til.simonwillison.net/jq/extracting-objects-recursively | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Use HN algolia endpoint to retrieve trees 952189173 | |
905203570 | https://github.com/dogsheep/evernote-to-sqlite/issues/13#issuecomment-905203570 | https://api.github.com/repos/dogsheep/evernote-to-sqlite/issues/13 | IC_kwDOEhK-wc419E9y | simonw 9599 | 2021-08-25T05:51:22Z | 2021-08-25T05:53:27Z | MEMBER | The debugger showed me that it broke on a string that looked like this: ```xml <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd"> <en-note> <h1 title="Q3 2018 Reflection & Development"> <span title=Q3 2018 Reflection & Development"> Q3 2018 Reflection & Development </span> </h1> ... ``` Yeah that is not valid XML! | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | xml.etree.ElementTree.ParseError: not well-formed (invalid token) 978743426 | |
905206234 | https://github.com/dogsheep/evernote-to-sqlite/issues/13#issuecomment-905206234 | https://api.github.com/repos/dogsheep/evernote-to-sqlite/issues/13 | IC_kwDOEhK-wc419Fna | simonw 9599 | 2021-08-25T05:58:42Z | 2021-08-25T05:58:42Z | MEMBER | https://github.com/dogsheep/evernote-to-sqlite/blob/36a466f142e5bad52719851c2fbda0c05cd35b99/evernote_to_sqlite/utils.py#L34-L42 Not sure why I was round-tripping the `content_xml` like that - I will try not doing that. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | xml.etree.ElementTree.ParseError: not well-formed (invalid token) 978743426 | |
906635938 | https://github.com/dogsheep/evernote-to-sqlite/issues/13#issuecomment-906635938 | https://api.github.com/repos/dogsheep/evernote-to-sqlite/issues/13 | IC_kwDOEhK-wc42Ciqi | simonw 9599 | 2021-08-26T18:18:27Z | 2021-08-26T18:18:27Z | MEMBER | It looks like I was using the round-trip to dump the `<?xml version="1.0" encoding="UTF-8" standalone="no"?>` and `<!DOCTYPE` prefixes. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | xml.etree.ElementTree.ParseError: not well-formed (invalid token) 978743426 | |
906646452 | https://github.com/dogsheep/evernote-to-sqlite/issues/13#issuecomment-906646452 | https://api.github.com/repos/dogsheep/evernote-to-sqlite/issues/13 | IC_kwDOEhK-wc42ClO0 | simonw 9599 | 2021-08-26T18:34:34Z | 2021-08-26T18:35:20Z | MEMBER | I tried this ampersand fix: https://regex101.com/r/ojU2H9/1 ```python # https://regex101.com/r/ojU2H9/1 _invalid_ampersand_re = re.compile(r'&(?![a-z0-9]+;)') def fix_bad_xml(xml): # More fixes for things like '&' not as part of an entity return _invalid_ampersand_re.sub('&', xml) ``` Even with that I'm still getting total garbage in the `<en-note>` content - it's just HTML, not even trying to be XML. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | xml.etree.ElementTree.ParseError: not well-formed (invalid token) 978743426 | |
1461226402 | https://github.com/dogsheep/apple-notes-to-sqlite/issues/1#issuecomment-1461226402 | https://api.github.com/repos/dogsheep/apple-notes-to-sqlite/issues/1 | IC_kwDOJHON9s5XGIui | simonw 9599 | 2023-03-09T03:47:11Z | 2023-03-09T03:47:11Z | MEMBER | Me: > Write applescript to loop through all of my Apple Notes and output their contents ChatGPT: ```applescript tell application "Notes" repeat with eachNote in every note set noteTitle to the name of eachNote set noteBody to the body of eachNote display dialog noteTitle & return & return & noteBody end repeat end tell ``` Me: > How can I turn that into a zsh script which will output the results to my terminal ChatGPT: ```zsh #!/usr/bin/zsh osascript -e 'tell application "Notes" repeat with eachNote in every note set noteTitle to the name of eachNote set noteBody to the body of eachNote set output to noteTitle & "\n" & noteBody & "\n" display dialog output log output end repeat end tell' ``` I had to change that first line to `#!/bin/zsh` - then when I ran it it spammed my screen with dialog boxes. Me: > I want to log the notes contents to the terminal, not display it in a dialog ChatGPT: ```zsh #!/bin/zsh osascript -e 'tell application "Notes" repeat with eachNote in every note set noteTitle to the name of eachNote set noteBody to the body of eachNote set output to noteTitle & "\n" & noteBody & "\n" log output end repeat end tell' ``` This really helps! | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Initial proof of concept with ChatGPT 1616347574 | |
1461230197 | https://github.com/dogsheep/apple-notes-to-sqlite/issues/1#issuecomment-1461230197 | https://api.github.com/repos/dogsheep/apple-notes-to-sqlite/issues/1 | IC_kwDOJHON9s5XGJp1 | simonw 9599 | 2023-03-09T03:51:36Z | 2023-03-09T03:51:36Z | MEMBER | After a few more rounds I got to this script, which outputs them to a `/tmp/notes.txt` file: ```zsh #!/bin/zsh osascript -e ' set notesFile to "/tmp/notes.txt" set fileRef to open for access notesFile with write permission tell application "Notes" repeat with eachNote in every note set noteId to the id of eachNote set noteTitle to the name of eachNote set noteBody to the body of eachNote write "------------------------" & "\n" to fileRef write noteId & "\n" to fileRef write noteTitle & "\n\n" to fileRef write noteBody & "\n" to fileRef end repeat end tell close access fileRef' ``` Then I wrote this little Python script to load them into a database: ```python import sqlite_utils split = b"------------------------\n" s = open("/tmp/notes.txt", "rb").read() notes = [n.decode("mac_roman") for n in s.split(split) if n] cleaned_notes = [{ "id": n.split("\n")[0], "title": n.split("\n")[1], "body": "\n".join(n.split("\n")[2:]).strip() } for n in notes] db = sqlite_utils.Database("/tmp/notes.db") db["notes"].insert_all(cleaned_notes) ``` | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Initial proof of concept with ChatGPT 1616347574 | |
1461230436 | https://github.com/dogsheep/apple-notes-to-sqlite/issues/1#issuecomment-1461230436 | https://api.github.com/repos/dogsheep/apple-notes-to-sqlite/issues/1 | IC_kwDOJHON9s5XGJtk | simonw 9599 | 2023-03-09T03:51:52Z | 2023-03-09T03:51:52Z | MEMBER | This did the job! Next step is to turn that into a Python script. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Initial proof of concept with ChatGPT 1616347574 | |
1461232709 | https://github.com/dogsheep/apple-notes-to-sqlite/issues/2#issuecomment-1461232709 | https://api.github.com/repos/dogsheep/apple-notes-to-sqlite/issues/2 | IC_kwDOJHON9s5XGKRF | simonw 9599 | 2023-03-09T03:54:28Z | 2023-03-09T03:54:28Z | MEMBER | I think the AppleScript I want to pass to `osascript` looks like this: ```applescript tell application "Notes" repeat with eachNote in every note set noteId to the id of eachNote set noteTitle to the name of eachNote set noteBody to the body of eachNote log "------------------------" & "\n" log noteId & "\n" log noteTitle & "\n\n" log noteBody & "\n" end repeat end tell ``` But there are a few more properties I'd like to get - created and updated date for example. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | First working version 1616354999 | |
1461234311 | https://github.com/dogsheep/apple-notes-to-sqlite/issues/2#issuecomment-1461234311 | https://api.github.com/repos/dogsheep/apple-notes-to-sqlite/issues/2 | IC_kwDOJHON9s5XGKqH | simonw 9599 | 2023-03-09T03:56:24Z | 2023-03-09T03:56:24Z | MEMBER | I opened the "Script Editor" app on my computer, used Window -> Library to open the Library panel, then clicked on the Notes app there. I got this: <img width="1240" alt="image" src="https://user-images.githubusercontent.com/9599/223912876-09e8660e-f59a-4f04-8992-668e09c8d7d4.png"> So the notes object has these properties: - name (text) : the name of the note (normally the first line of the body) - id (text, r/o) : the unique identifier of the note - container ([folder](applewebdata://621FA8D9-C995-4081-B3B3-149B0EA04C7F#Notes-Suite.folder), r/o) : the folder of the note - body (text) : the HTML content of the note - plaintext (text, r/o) : the plaintext content of the note - creation date (date, r/o) : the creation date of the note - modification date (date, r/o) : the modification date of the note - password protected (boolean, r/o) : Is the note password protected? - shared (boolean, r/o) : Is the note shared? I'm going to ignore the concept of attachments for the moment. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | First working version 1616354999 | |
1461234591 | https://github.com/dogsheep/apple-notes-to-sqlite/issues/2#issuecomment-1461234591 | https://api.github.com/repos/dogsheep/apple-notes-to-sqlite/issues/2 | IC_kwDOJHON9s5XGKuf | simonw 9599 | 2023-03-09T03:56:45Z | 2023-03-09T03:56:45Z | MEMBER | My prototype showed that images embedded in notes come out in the HTML export as bas64 image URLs, which is neat. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | First working version 1616354999 | |
1461259490 | https://github.com/dogsheep/apple-notes-to-sqlite/issues/2#issuecomment-1461259490 | https://api.github.com/repos/dogsheep/apple-notes-to-sqlite/issues/2 | IC_kwDOJHON9s5XGQzi | simonw 9599 | 2023-03-09T04:24:27Z | 2023-03-09T04:24:27Z | MEMBER | Converting AppleScript date strings to ISO format is hard! https://forum.latenightsw.com/t/formatting-dates/841 has a recipe I'll try: set todayISO to (todayDate as «class isot» as string) Not clear to me how timezones work here. I'm going to ignore them for the moment. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | First working version 1616354999 | |
1461260978 | https://github.com/dogsheep/apple-notes-to-sqlite/issues/2#issuecomment-1461260978 | https://api.github.com/repos/dogsheep/apple-notes-to-sqlite/issues/2 | IC_kwDOJHON9s5XGRKy | simonw 9599 | 2023-03-09T04:27:18Z | 2023-03-09T04:27:18Z | MEMBER | Before that conversion: Monday, March 6, 2023 at 11:55:15 AM After: 2023-03-06T11:55:15 | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | First working version 1616354999 | |
1461262577 | https://github.com/dogsheep/apple-notes-to-sqlite/issues/2#issuecomment-1461262577 | https://api.github.com/repos/dogsheep/apple-notes-to-sqlite/issues/2 | IC_kwDOJHON9s5XGRjx | simonw 9599 | 2023-03-09T04:30:00Z | 2023-03-09T04:30:00Z | MEMBER | It doesn't have tests yet. I guess I'll need to mock `subprocess` to test this. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | First working version 1616354999 | |
1461285545 | https://github.com/dogsheep/apple-notes-to-sqlite/issues/2#issuecomment-1461285545 | https://api.github.com/repos/dogsheep/apple-notes-to-sqlite/issues/2 | IC_kwDOJHON9s5XGXKp | simonw 9599 | 2023-03-09T05:06:24Z | 2023-03-09T05:06:24Z | MEMBER | OK, this works! | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | First working version 1616354999 | |
1462554175 | https://github.com/dogsheep/apple-notes-to-sqlite/issues/4#issuecomment-1462554175 | https://api.github.com/repos/dogsheep/apple-notes-to-sqlite/issues/4 | IC_kwDOJHON9s5XLM4_ | simonw 9599 | 2023-03-09T18:19:34Z | 2023-03-09T18:19:34Z | MEMBER | It looks like the iteration order is most-recently-modified-first - I tried editing a note a bit further back in my notes app and it was the first one output by `apple-notes-to-sqlite --dump`. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Support incremental updates 1616429236 | |
1462556829 | https://github.com/dogsheep/apple-notes-to-sqlite/issues/4#issuecomment-1462556829 | https://api.github.com/repos/dogsheep/apple-notes-to-sqlite/issues/4 | IC_kwDOJHON9s5XLNid | simonw 9599 | 2023-03-09T18:20:56Z | 2023-03-09T18:20:56Z | MEMBER | In terms of the UI: I'm tempted to say that the default behaviour is for it to run until it sees a note that it already knows about AND that has matching update/created dates, and then stop. You can do a full import again ignoring that logic with `apple-notes-to-sqlite notes.db --full`. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Support incremental updates 1616429236 | |
1462562735 | https://github.com/dogsheep/apple-notes-to-sqlite/issues/7#issuecomment-1462562735 | https://api.github.com/repos/dogsheep/apple-notes-to-sqlite/issues/7 | IC_kwDOJHON9s5XLO-v | simonw 9599 | 2023-03-09T18:23:56Z | 2023-03-09T18:25:22Z | MEMBER | From the Script Editor library docs: A note has a: > - `container` (folder), r/o) : the folder of the note Here's what a folder looks like: > folder n : a folder containing notes > elements: > > - contains folders, notes; contained by application, accounts, folders. > > properties: > > - `name` (text) : the name of the folder > - `id` (text, r/o) : the unique identifier of the folder > - `shared` (boolean, r/o) : Is the folder shared? > - `container` (account or folder, r/o) : the container of the folder | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Folder support 1617769847 | |
1462564717 | https://github.com/dogsheep/apple-notes-to-sqlite/issues/7#issuecomment-1462564717 | https://api.github.com/repos/dogsheep/apple-notes-to-sqlite/issues/7 | IC_kwDOJHON9s5XLPdt | simonw 9599 | 2023-03-09T18:25:39Z | 2023-03-09T18:25:39Z | MEMBER | So it looks like folders can be hierarchical? | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Folder support 1617769847 | |
1462570187 | https://github.com/dogsheep/apple-notes-to-sqlite/issues/7#issuecomment-1462570187 | https://api.github.com/repos/dogsheep/apple-notes-to-sqlite/issues/7 | IC_kwDOJHON9s5XLQzL | simonw 9599 | 2023-03-09T18:30:24Z | 2023-03-09T18:30:24Z | MEMBER | I used ChatGPT to write this: ``` osascript -e 'tell application "Notes" set allFolders to folders repeat with aFolder in allFolders set folderId to id of aFolder set folderName to name of aFolder set folderContainer to container of aFolder set folderContainerName to name of folderContainer log "Folder ID: " & folderId log "Folder Name: " & folderName log "Folder Container: " & folderContainerName log " " --check for nested folders if count of folders of aFolder > 0 then set nestedFolders to folders of aFolder repeat with aNestedFolder in nestedFolders set nestedFolderId to id of aNestedFolder set nestedFolderName to name of aNestedFolder set nestedFolderContainer to container of aNestedFolder set nestedFolderContainerName to name of nestedFolderContainer log " Nested Folder ID: " & nestedFolderId log " Nested Folder Name: " & nestedFolderName log " Nested Folder Container: " & nestedFolderContainerName log " " end repeat end if end repeat end tell ' ``` Which for my account output this: ``` Folder ID: x-coredata://D2D50498-BBD1-4097-B122-D15ABD32BDEC/ICFolder/p6113 Folder Name: Blog posts Folder Container: iCloud Nested Folder ID: x-coredata://D2D50498-BBD1-4097-B122-D15ABD32BDEC/ICFolder/p7995 Nested Folder Name: Nested inside blog posts Nested Folder Container: Blog posts Folder ID: x-coredata://D2D50498-BBD1-4097-B122-D15ABD32BDEC/ICFolder/p698 Folder Name: JSK Folder Container: iCloud Folder ID: x-coredata://D2D50498-BBD1-4097-B122-D15ABD32BDEC/ICFolder/p7995 Folder Name: Nested inside blog posts Folder Container: Blog posts Folder ID: x-coredata://D2D50498-BBD1-4097-B122-D15ABD32BDEC/ICFolder/p3526 Folder Name: New Folder Folder Container: iCloud Folder ID: x-coreda… | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Folder support 1617769847 | |
1462682795 | https://github.com/dogsheep/apple-notes-to-sqlite/issues/7#issuecomment-1462682795 | https://api.github.com/repos/dogsheep/apple-notes-to-sqlite/issues/7 | IC_kwDOJHON9s5XLsSr | simonw 9599 | 2023-03-09T19:52:20Z | 2023-03-09T19:52:44Z | MEMBER | Created through several rounds with ChatGPT (including hints like "rewrite that using setdefault()"): ```python def topological_sort(nodes): children = {} for node in nodes: parent_id = node["parent"] if parent_id is not None: children.setdefault(parent_id, []).append(node) def traverse(node, result): result.append(node) if node["id"] in children: for child in children[node["id"]]: traverse(child, result) sorted_data = [] for node in nodes: if node["parent"] is None: traverse(node, sorted_data) return sorted_data ``` | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Folder support 1617769847 | |
1462693867 | https://github.com/dogsheep/apple-notes-to-sqlite/issues/7#issuecomment-1462693867 | https://api.github.com/repos/dogsheep/apple-notes-to-sqlite/issues/7 | IC_kwDOJHON9s5XLu_r | simonw 9599 | 2023-03-09T20:01:39Z | 2023-03-09T20:02:11Z | MEMBER | My `folders` table will have: - `id` - rowid - `long_id` - that long unique string ID - `name` - the name - `parent` - foreign key to `id` | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Folder support 1617769847 | |
1462691466 | https://github.com/dogsheep/apple-notes-to-sqlite/issues/7#issuecomment-1462691466 | https://api.github.com/repos/dogsheep/apple-notes-to-sqlite/issues/7 | IC_kwDOJHON9s5XLuaK | simonw 9599 | 2023-03-09T19:59:52Z | 2023-03-09T19:59:52Z | MEMBER | Improved script: ```zsh osascript -e 'tell application "Notes" set allFolders to folders repeat with aFolder in allFolders set folderId to id of aFolder set folderName to name of aFolder set folderContainer to container of aFolder if class of folderContainer is folder then set folderContainerId to id of folderContainer else set folderContainerId to "" end if log "ID: " & folderId log "Name: " & folderName log "Container: " & folderContainerId log " " end repeat end tell ' ``` ``` ID: x-coredata://D2D50498-BBD1-4097-B122-D15ABD32BDEC/ICFolder/p6113 Name: Blog posts Container: ID: x-coredata://D2D50498-BBD1-4097-B122-D15ABD32BDEC/ICFolder/p698 Name: JSK Container: ID: x-coredata://D2D50498-BBD1-4097-B122-D15ABD32BDEC/ICFolder/p7995 Name: Nested inside blog posts Container: x-coredata://D2D50498-BBD1-4097-B122-D15ABD32BDEC/ICFolder/p6113 ID: x-coredata://D2D50498-BBD1-4097-B122-D15ABD32BDEC/ICFolder/p3526 Name: New Folder Container: ID: x-coredata://D2D50498-BBD1-4097-B122-D15ABD32BDEC/ICFolder/p3839 Name: New Folder 1 Container: ID: x-coredata://D2D50498-BBD1-4097-B122-D15ABD32BDEC/ICFolder/p2 Name: Notes Container: ID: x-coredata://D2D50498-BBD1-4097-B122-D15ABD32BDEC/ICFolder/p6059 Name: Quick Notes Container: ID: x-coredata://D2D50498-BBD1-4097-B122-D15ABD32BDEC/ICFolder/p7283 Name: UK Christmas 2022 Container: ``` I filtered out things where the parent was an account and not a folder using `if class of folderContainer is folder then`. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Folder support 1617769847 | |
1462962682 | https://github.com/dogsheep/apple-notes-to-sqlite/issues/11#issuecomment-1462962682 | https://api.github.com/repos/dogsheep/apple-notes-to-sqlite/issues/11 | IC_kwDOJHON9s5XMwn6 | simonw 9599 | 2023-03-09T23:20:35Z | 2023-03-09T23:22:41Z | MEMBER | Here's a query that returns all notes in folder 1, including notes in descendant folders: ```sql with recursive nested_folders(folder_id, descendant_folder_id) as ( -- base case: select all immediate children of the root folder select id, id from folders where parent is null union all -- recursive case: select all children of the previous level of nested folders select nf.folder_id, f.id from nested_folders nf join folders f on nf.descendant_folder_id = f.parent ) -- Find notes within all descendants of folder 1 select * from notes where folder in ( select descendant_folder_id from nested_folders where folder_id = 1 ); ``` With assistance from ChatGPT. Prompts were: ``` SQLite schema: CREATE TABLE [folders] ( [id] INTEGER PRIMARY KEY, [long_id] TEXT, [name] TEXT, [parent] INTEGER, FOREIGN KEY([parent]) REFERENCES [folders]([id]) ); Write a recursive CTE that returns the following: folder_id | descendant_folder_id With a row for every nested child of every folder - so the top level folder has lots of rows ``` Then I tweaked it a bit, then ran this: ``` WITH RECURSIVE nested_folders(folder_id, descendant_folder_id) AS ( -- base case: select all immediate children of the root folder SELECT id, id FROM folders WHERE parent IS NULL UNION ALL -- recursive case: select all children of the previous level of nested folders SELECT nf.folder_id, f.id FROM nested_folders nf JOIN folders f ON nf.descendant_folder_id = f.parent ) -- select all rows from the recursive CTE SELECT * from notes where folder in (select descendant_folder_id FROM nested_folders where folder_id = 1) Convert all SQL keywords to lower case, and re-indent ``` | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Implement a SQL view to make it easier to query files in a nested folder 1618130434 | |
1462968053 | https://github.com/dogsheep/apple-notes-to-sqlite/issues/11#issuecomment-1462968053 | https://api.github.com/repos/dogsheep/apple-notes-to-sqlite/issues/11 | IC_kwDOJHON9s5XMx71 | simonw 9599 | 2023-03-09T23:24:01Z | 2023-03-09T23:24:01Z | MEMBER | I improved the readability by removing some unnecessary table aliases: ```sql with recursive nested_folders(folder_id, descendant_folder_id) as ( -- base case: select all immediate children of the root folder select id, id from folders where parent is null union all -- recursive case: select all children of the previous level of nested folders select nested_folders.folder_id, folders.id from nested_folders join folders on nested_folders.descendant_folder_id = folders.parent ) -- Find notes within all descendants of folder 1 select * from notes where folder in ( select descendant_folder_id from nested_folders where folder_id = 1 ); ``` | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Implement a SQL view to make it easier to query files in a nested folder 1618130434 | |
1462965256 | https://github.com/dogsheep/apple-notes-to-sqlite/issues/11#issuecomment-1462965256 | https://api.github.com/repos/dogsheep/apple-notes-to-sqlite/issues/11 | IC_kwDOJHON9s5XMxQI | simonw 9599 | 2023-03-09T23:22:12Z | 2023-03-09T23:22:12Z | MEMBER | Here's what the CTE from that looks like: <img width="469" alt="image" src="https://user-images.githubusercontent.com/9599/224182888-50f315eb-417f-4fb1-b624-151e1740ffed.png"> | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Implement a SQL view to make it easier to query files in a nested folder 1618130434 | |
540879620 | https://github.com/dogsheep/twitter-to-sqlite/issues/4#issuecomment-540879620 | https://api.github.com/repos/dogsheep/twitter-to-sqlite/issues/4 | MDEyOklzc3VlQ29tbWVudDU0MDg3OTYyMA== | simonw 9599 | 2019-10-11T02:59:16Z | 2019-10-11T02:59:16Z | MEMBER | Also import ad preferences and all that other junk. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Command for importing data from a Twitter Export file 488835586 | |
541141169 | https://github.com/dogsheep/twitter-to-sqlite/issues/18#issuecomment-541141169 | https://api.github.com/repos/dogsheep/twitter-to-sqlite/issues/18 | MDEyOklzc3VlQ29tbWVudDU0MTE0MTE2OQ== | simonw 9599 | 2019-10-11T16:51:29Z | 2019-10-11T16:51:29Z | MEMBER | Documented here: https://github.com/dogsheep/twitter-to-sqlite/blob/master/README.md#retrieving-tweets-from-your-home-timeline | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Command to import home-timeline 505928530 | |
541112108 | https://github.com/dogsheep/twitter-to-sqlite/issues/17#issuecomment-541112108 | https://api.github.com/repos/dogsheep/twitter-to-sqlite/issues/17 | MDEyOklzc3VlQ29tbWVudDU0MTExMjEwOA== | simonw 9599 | 2019-10-11T15:30:15Z | 2019-10-11T15:30:15Z | MEMBER | It should delete the tables entirely. That way it will work even if the table schema has changed. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | import command should empty all archive-* tables first 505674949 | |
541112588 | https://github.com/dogsheep/twitter-to-sqlite/issues/17#issuecomment-541112588 | https://api.github.com/repos/dogsheep/twitter-to-sqlite/issues/17 | MDEyOklzc3VlQ29tbWVudDU0MTExMjU4OA== | simonw 9599 | 2019-10-11T15:31:30Z | 2019-10-11T15:31:30Z | MEMBER | No need for an option: > This command will delete and recreate all of your `archive-*` tables every time you run it. If this is not what you want, run the command against a fresh SQLite database rather than running it again one that already exists. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | import command should empty all archive-* tables first 505674949 | |
541118773 | https://github.com/dogsheep/twitter-to-sqlite/issues/18#issuecomment-541118773 | https://api.github.com/repos/dogsheep/twitter-to-sqlite/issues/18 | MDEyOklzc3VlQ29tbWVudDU0MTExODc3Mw== | simonw 9599 | 2019-10-11T15:48:31Z | 2019-10-11T15:48:31Z | MEMBER | https://developer.twitter.com/en/docs/tweets/timelines/api-reference/get-statuses-home_timeline | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Command to import home-timeline 505928530 | |
541118934 | https://github.com/dogsheep/twitter-to-sqlite/issues/18#issuecomment-541118934 | https://api.github.com/repos/dogsheep/twitter-to-sqlite/issues/18 | MDEyOklzc3VlQ29tbWVudDU0MTExODkzNA== | simonw 9599 | 2019-10-11T15:48:54Z | 2019-10-11T15:48:54Z | MEMBER | Rate limit is tight: 15 requests every 15 mins! | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Command to import home-timeline 505928530 | |
541119834 | https://github.com/dogsheep/twitter-to-sqlite/issues/18#issuecomment-541119834 | https://api.github.com/repos/dogsheep/twitter-to-sqlite/issues/18 | MDEyOklzc3VlQ29tbWVudDU0MTExOTgzNA== | simonw 9599 | 2019-10-11T15:51:22Z | 2019-10-11T16:51:33Z | MEMBER | In order to support multiple user timelines being saved in the same database, I'm going to import the tweets into the `tweets` table AND add a new `timeline_tweets` table recording that a specific tweet showed up in a specific user's timeline. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Command to import home-timeline 505928530 | |
541248629 | https://github.com/dogsheep/twitter-to-sqlite/issues/19#issuecomment-541248629 | https://api.github.com/repos/dogsheep/twitter-to-sqlite/issues/19 | MDEyOklzc3VlQ29tbWVudDU0MTI0ODYyOQ== | simonw 9599 | 2019-10-11T22:48:56Z | 2019-10-11T22:48:56Z | MEMBER | `since_id` documented here: https://developer.twitter.com/en/docs/tweets/timelines/api-reference/get-statuses-home_timeline > Returns results with an ID greater than (that is, more recent than) the specified ID. There are limits to the number of Tweets which can be accessed through the API. If the limit of Tweets has occured since the since_id, the since_id will be forced to the oldest ID available. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | since_id support for home-timeline 506087267 | |
541387822 | https://github.com/dogsheep/github-to-sqlite/issues/6#issuecomment-541387822 | https://api.github.com/repos/dogsheep/github-to-sqlite/issues/6 | MDEyOklzc3VlQ29tbWVudDU0MTM4NzgyMg== | simonw 9599 | 2019-10-13T05:27:39Z | 2019-10-13T05:27:39Z | MEMBER | This should be fixed by https://github.com/dogsheep/github-to-sqlite/commit/552543a74970f8a3a3f87f887be23a0c6eb1cb5b | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | sqlite3.OperationalError: table users has no column named bio 504238461 | |
541387941 | https://github.com/dogsheep/github-to-sqlite/issues/6#issuecomment-541387941 | https://api.github.com/repos/dogsheep/github-to-sqlite/issues/6 | MDEyOklzc3VlQ29tbWVudDU0MTM4Nzk0MQ== | simonw 9599 | 2019-10-13T05:30:19Z | 2019-10-13T05:30:19Z | MEMBER | Fix released in 0.5: https://github.com/dogsheep/github-to-sqlite/releases/tag/0.5 | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | sqlite3.OperationalError: table users has no column named bio 504238461 | |
541388038 | https://github.com/dogsheep/twitter-to-sqlite/issues/20#issuecomment-541388038 | https://api.github.com/repos/dogsheep/twitter-to-sqlite/issues/20 | MDEyOklzc3VlQ29tbWVudDU0MTM4ODAzOA== | simonw 9599 | 2019-10-13T05:31:58Z | 2019-10-13T05:31:58Z | MEMBER | For favourites a `--stop_after=200` option is probably good enough. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | --since support for various commands for refresh-by-cron 506268945 | |
541493242 | https://github.com/dogsheep/twitter-to-sqlite/issues/3#issuecomment-541493242 | https://api.github.com/repos/dogsheep/twitter-to-sqlite/issues/3 | MDEyOklzc3VlQ29tbWVudDU0MTQ5MzI0Mg== | simonw 9599 | 2019-10-14T03:35:36Z | 2019-10-14T03:35:36Z | MEMBER | https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Command for running a search and saving tweets for that search 488833975 | |
541748580 | https://github.com/dogsheep/twitter-to-sqlite/issues/10#issuecomment-541748580 | https://api.github.com/repos/dogsheep/twitter-to-sqlite/issues/10 | MDEyOklzc3VlQ29tbWVudDU0MTc0ODU4MA== | simonw 9599 | 2019-10-14T15:30:44Z | 2019-10-14T15:30:44Z | MEMBER | Had several recommendations for https://github.com/tqdm/tqdm which is what goodreads-to-sqlite uses. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Rethink progress bars for various commands 492297930 | |
541721437 | https://github.com/dogsheep/github-to-sqlite/issues/7#issuecomment-541721437 | https://api.github.com/repos/dogsheep/github-to-sqlite/issues/7 | MDEyOklzc3VlQ29tbWVudDU0MTcyMTQzNw== | simonw 9599 | 2019-10-14T14:44:12Z | 2019-10-14T14:44:12Z | MEMBER | Docs: https://github.com/dogsheep/github-to-sqlite/blob/0.5/README.md#retrieving-issue-comments-for-a-repository | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | issue-comments command for importing issue comments 506276893 | |
542333836 | https://github.com/dogsheep/twitter-to-sqlite/issues/21#issuecomment-542333836 | https://api.github.com/repos/dogsheep/twitter-to-sqlite/issues/21 | MDEyOklzc3VlQ29tbWVudDU0MjMzMzgzNg== | simonw 9599 | 2019-10-15T18:00:48Z | 2019-10-15T18:00:48Z | MEMBER | I'll use `html.unescape()` for this: https://docs.python.org/3/library/html.html#html.unescape | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Fix & escapes in tweet text 506432572 | |
542849963 | https://github.com/dogsheep/twitter-to-sqlite/issues/19#issuecomment-542849963 | https://api.github.com/repos/dogsheep/twitter-to-sqlite/issues/19 | MDEyOklzc3VlQ29tbWVudDU0Mjg0OTk2Mw== | simonw 9599 | 2019-10-16T19:13:06Z | 2019-10-16T19:13:06Z | MEMBER | Updated documentation: https://github.com/dogsheep/twitter-to-sqlite/blob/fced2a9b67d2cbdf9817f1eb75f7c28e413c963b/README.md#retrieving-tweets-from-your-home-timeline | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | since_id support for home-timeline 506087267 | |
542854749 | https://github.com/dogsheep/twitter-to-sqlite/issues/20#issuecomment-542854749 | https://api.github.com/repos/dogsheep/twitter-to-sqlite/issues/20 | MDEyOklzc3VlQ29tbWVudDU0Mjg1NDc0OQ== | simonw 9599 | 2019-10-16T19:26:01Z | 2019-10-16T19:26:01Z | MEMBER | I'm not going to do this for "accounts that have followed me" and "new accounts that I have followed" - instead I will recommend running the `friend_ids` and `followers_ids` commands on a daily basis since that data doesn't really change much by the hour. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | --since support for various commands for refresh-by-cron 506268945 | |
542855081 | https://github.com/dogsheep/twitter-to-sqlite/issues/12#issuecomment-542855081 | https://api.github.com/repos/dogsheep/twitter-to-sqlite/issues/12 | MDEyOklzc3VlQ29tbWVudDU0Mjg1NTA4MQ== | simonw 9599 | 2019-10-16T19:26:56Z | 2019-10-16T19:26:56Z | MEMBER | This may be the first case where I want to be able to repair existing databases rather than discarding their contents. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Extract "source" into a separate lookup table 503053800 | |
542855427 | https://github.com/dogsheep/twitter-to-sqlite/issues/12#issuecomment-542855427 | https://api.github.com/repos/dogsheep/twitter-to-sqlite/issues/12 | MDEyOklzc3VlQ29tbWVudDU0Mjg1NTQyNw== | simonw 9599 | 2019-10-16T19:27:55Z | 2019-10-16T19:27:55Z | MEMBER | I can do that by keeping `source` as a `TEXT` column but turning it into a non-enforced foreign key against a new `sources` table. Then I can run code that scans that column for any values beginning with a `<` and converts them. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Extract "source" into a separate lookup table 503053800 | |
542858025 | https://github.com/dogsheep/twitter-to-sqlite/issues/12#issuecomment-542858025 | https://api.github.com/repos/dogsheep/twitter-to-sqlite/issues/12 | MDEyOklzc3VlQ29tbWVudDU0Mjg1ODAyNQ== | simonw 9599 | 2019-10-16T19:35:31Z | 2019-10-16T19:36:09Z | MEMBER | Maybe this means I need an `upgrade` command to apply these kinds of migrations? Total feature creep! | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Extract "source" into a separate lookup table 503053800 | |
542875885 | https://github.com/dogsheep/swarm-to-sqlite/issues/3#issuecomment-542875885 | https://api.github.com/repos/dogsheep/swarm-to-sqlite/issues/3 | MDEyOklzc3VlQ29tbWVudDU0Mjg3NTg4NQ== | simonw 9599 | 2019-10-16T20:23:08Z | 2019-10-16T20:23:08Z | MEMBER | https://developer.foursquare.com/docs/api/users/checkins documents `afterTimestamp`: > Retrieve the first results to follow these seconds since epoch. This should be useful for paging forward in time, or when polling for changes. To avoid missing results when polling, we recommend subtracting several seconds from the last poll time and then de-duplicating. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Option to fetch only checkins more recent than the current max checkin 487600595 | |
542876047 | https://github.com/dogsheep/swarm-to-sqlite/issues/3#issuecomment-542876047 | https://api.github.com/repos/dogsheep/swarm-to-sqlite/issues/3 | MDEyOklzc3VlQ29tbWVudDU0Mjg3NjA0Nw== | simonw 9599 | 2019-10-16T20:23:36Z | 2019-10-16T20:23:36Z | MEMBER | I'm going to go with `--since=1d/2w/3h` for this. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Option to fetch only checkins more recent than the current max checkin 487600595 | |
542882604 | https://github.com/dogsheep/swarm-to-sqlite/issues/3#issuecomment-542882604 | https://api.github.com/repos/dogsheep/swarm-to-sqlite/issues/3 | MDEyOklzc3VlQ29tbWVudDU0Mjg4MjYwNA== | simonw 9599 | 2019-10-16T20:41:23Z | 2019-10-16T20:41:23Z | MEMBER | Documented here: https://github.com/dogsheep/swarm-to-sqlite/blob/0.2/README.md#usage | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Option to fetch only checkins more recent than the current max checkin 487600595 | |
542832952 | https://github.com/dogsheep/twitter-to-sqlite/issues/19#issuecomment-542832952 | https://api.github.com/repos/dogsheep/twitter-to-sqlite/issues/19 | MDEyOklzc3VlQ29tbWVudDU0MjgzMjk1Mg== | simonw 9599 | 2019-10-16T18:30:11Z | 2019-10-16T18:30:11Z | MEMBER | The `--since` option will derive the `since_id` from the max ID in the `timeline_tweets` table: $ twitter-to-sqlite home-timeline --since The `--since_id=xxx` option lets you specify that ID directly. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | since_id support for home-timeline 506087267 | |
543265058 | https://github.com/dogsheep/twitter-to-sqlite/issues/25#issuecomment-543265058 | https://api.github.com/repos/dogsheep/twitter-to-sqlite/issues/25 | MDEyOklzc3VlQ29tbWVudDU0MzI2NTA1OA== | simonw 9599 | 2019-10-17T16:51:12Z | 2019-10-17T16:51:12Z | MEMBER | This migration function only runs if there is a table called `tweets` and the migration has not run before. I think this can happen if the database has just been freshly created (by a command that fetches the user's user timeline for example) and is then run a SECOND time. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Ensure migrations don't accidentally create foreign key twice 508578780 | |
543266947 | https://github.com/dogsheep/twitter-to-sqlite/issues/25#issuecomment-543266947 | https://api.github.com/repos/dogsheep/twitter-to-sqlite/issues/25 | MDEyOklzc3VlQ29tbWVudDU0MzI2Njk0Nw== | simonw 9599 | 2019-10-17T16:56:06Z | 2019-10-17T16:56:06Z | MEMBER | I wrote a test that proves that this is a problem. Should be an easy fix though. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Ensure migrations don't accidentally create foreign key twice 508578780 | |
543269396 | https://github.com/dogsheep/twitter-to-sqlite/issues/10#issuecomment-543269396 | https://api.github.com/repos/dogsheep/twitter-to-sqlite/issues/10 | MDEyOklzc3VlQ29tbWVudDU0MzI2OTM5Ng== | simonw 9599 | 2019-10-17T17:02:07Z | 2019-10-17T17:02:07Z | MEMBER | A neat trick that Click does is detecting if an interactive terminal is attached and NOT showing a progress bar if there isn't one. Need to figure out how to do that with tqdm. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Rethink progress bars for various commands 492297930 | |
543270714 | https://github.com/dogsheep/twitter-to-sqlite/issues/10#issuecomment-543270714 | https://api.github.com/repos/dogsheep/twitter-to-sqlite/issues/10 | MDEyOklzc3VlQ29tbWVudDU0MzI3MDcxNA== | simonw 9599 | 2019-10-17T17:05:16Z | 2019-10-17T17:05:16Z | MEMBER | https://github.com/pallets/click/blob/716a5be90f56ce6cd506bb53d5739d09374b1636/click/_termui_impl.py#L93 is how Click does this: ``` self.is_hidden = not isatty(self.file) ``` Where `isatty` is a Click utility function: `from ._compat import isatty` | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Rethink progress bars for various commands 492297930 | |
543271000 | https://github.com/dogsheep/twitter-to-sqlite/issues/10#issuecomment-543271000 | https://api.github.com/repos/dogsheep/twitter-to-sqlite/issues/10 | MDEyOklzc3VlQ29tbWVudDU0MzI3MTAwMA== | simonw 9599 | 2019-10-17T17:05:59Z | 2019-10-17T17:05:59Z | MEMBER | Looks like tqdm already does a TTY check here: https://github.com/tqdm/tqdm/blob/89b73bdc30c099c5b53725806e7edf3a121c9b3a/tqdm/std.py#L889-L890 | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Rethink progress bars for various commands 492297930 | |
543273540 | https://github.com/dogsheep/twitter-to-sqlite/issues/3#issuecomment-543273540 | https://api.github.com/repos/dogsheep/twitter-to-sqlite/issues/3 | MDEyOklzc3VlQ29tbWVudDU0MzI3MzU0MA== | simonw 9599 | 2019-10-17T17:12:51Z | 2019-10-17T17:12:51Z | MEMBER | Just importing tweets here isn't enough - how are we supposed to know which tweets were imported by which search? So I think the right thing to do here is to also create a `search_runs` table, which records each individual run of this tool (with a timestamp and the search terms used). Then have a `search_runs_tweets` m2m table which shows which Tweets were found by that search. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Command for running a search and saving tweets for that search 488833975 | |
543290744 | https://github.com/dogsheep/twitter-to-sqlite/issues/3#issuecomment-543290744 | https://api.github.com/repos/dogsheep/twitter-to-sqlite/issues/3 | MDEyOklzc3VlQ29tbWVudDU0MzI5MDc0NA== | simonw 9599 | 2019-10-17T17:57:14Z | 2019-10-17T17:57:14Z | MEMBER | I have a working command now. I'm going to ship it early because it could do with some other people trying it out. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Command for running a search and saving tweets for that search 488833975 | |
543217890 | https://github.com/dogsheep/twitter-to-sqlite/issues/23#issuecomment-543217890 | https://api.github.com/repos/dogsheep/twitter-to-sqlite/issues/23 | MDEyOklzc3VlQ29tbWVudDU0MzIxNzg5MA== | simonw 9599 | 2019-10-17T15:03:10Z | 2019-10-17T15:03:10Z | MEMBER | Thinking about this further: the concept of migrations may end up being in direct conflict with the `sqlite-utils` concept of creating tables on demand the first time they are used - and of creating table schemas automatically to fit the shape of the JSON that is being inserted into them. I'm going to forge ahead anyway and build this because I think it will be an interesting exploration, but it's very likely this turns out to be a bad idea in the long run! | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Extremely simple migration system 508190730 | |
543222239 | https://github.com/dogsheep/twitter-to-sqlite/issues/23#issuecomment-543222239 | https://api.github.com/repos/dogsheep/twitter-to-sqlite/issues/23 | MDEyOklzc3VlQ29tbWVudDU0MzIyMjIzOQ== | simonw 9599 | 2019-10-17T15:12:33Z | 2019-10-17T15:12:33Z | MEMBER | Migrations will run only if you open a database that previously existed (as opposed to opening a brand new empty database). This means that the first time you run a command against a fresh database, migrations will not run and the `migrations` table will not be created. The _second_ time you run any command against that database the migrations will execute and populate the `migrations` table. This also means that each migration needs to be able to sanity check the database to see if it should run or not. If it should NOT run, it will do nothing but still be marked as having executed by adding to the `migrations` table. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Extremely simple migration system 508190730 | |
544335363 | https://github.com/dogsheep/twitter-to-sqlite/issues/20#issuecomment-544335363 | https://api.github.com/repos/dogsheep/twitter-to-sqlite/issues/20 | MDEyOklzc3VlQ29tbWVudDU0NDMzNTM2Mw== | simonw 9599 | 2019-10-21T03:32:04Z | 2019-10-21T03:32:04Z | MEMBER | In case anyone is interested, here's an extract from the crontab I'm running these under at the moment: ``` 1,11,21,31,41,51 * * * * /home/ubuntu/datasette-venv/bin/twitter-to-sqlite user-timeline /home/ubuntu/twitter.db -a /home/ubuntu/auth.json --since 2,7,12,17,22,27,32,37,42,47,52,57 * * * * /home/ubuntu/datasette-venv/bin/twitter-to-sqlite home-timeline /home/ubuntu/timeline.db -a /home/ubuntu/auth.json --since 6,16,26,36,46,56 * * * * /home/ubuntu/datasette-venv/bin/twitter-to-sqlite favorites /home/ubuntu/twitter.db -a /home/ubuntu/auth.json --stop_after=50 ``` | {"total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | --since support for various commands for refresh-by-cron 506268945 | |
544646516 | https://github.com/dogsheep/genome-to-sqlite/issues/1#issuecomment-544646516 | https://api.github.com/repos/dogsheep/genome-to-sqlite/issues/1 | MDEyOklzc3VlQ29tbWVudDU0NDY0NjUxNg== | simonw 9599 | 2019-10-21T18:30:14Z | 2019-10-21T18:30:14Z | MEMBER | Thanks to help from Dr. Laura Cantino at Science Hack Day San Francisco I've been able to pull together this query: ```sql select rsid, genotype, case genotype when 'AA' then 'brown eye color, 80% of the time' when 'AG' then 'brown eye color' when 'GG' then 'blue eye color, 99% of the time' end as interpretation from genome where rsid = 'rs12913832' ``` See also https://www.snpedia.com/index.php/Rs12913832 - in particular this table: <img width="321" alt="rs12913832_-_SNPedia" src="https://user-images.githubusercontent.com/9599/67232392-216ff300-f3f6-11e9-8e14-b5f50c0c0d16.png"> | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Figure out some interesting example SQL queries 496415321 | |
544648863 | https://github.com/dogsheep/genome-to-sqlite/issues/1#issuecomment-544648863 | https://api.github.com/repos/dogsheep/genome-to-sqlite/issues/1 | MDEyOklzc3VlQ29tbWVudDU0NDY0ODg2Mw== | simonw 9599 | 2019-10-21T18:36:03Z | 2019-10-21T18:36:03Z | MEMBER | <img width="1418" alt="natalie__select_rsid__genotype__case_genotype_when__AA__then__brown_eye_color__80__of_the_time__when__AG__then__brown_eye_color__when__GG__then__blue_eye_color__99__of_the_time__end_as_interpretation_from_genome_where_rsid____rs12913832__an" src="https://user-images.githubusercontent.com/9599/67232810-f4701000-f3f6-11e9-90e2-8fe2cca1d98d.png"> | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Figure out some interesting example SQL queries 496415321 | |
547713287 | https://github.com/dogsheep/twitter-to-sqlite/issues/26#issuecomment-547713287 | https://api.github.com/repos/dogsheep/twitter-to-sqlite/issues/26 | MDEyOklzc3VlQ29tbWVudDU0NzcxMzI4Nw== | simonw 9599 | 2019-10-30T02:36:13Z | 2019-10-30T02:36:13Z | MEMBER | Shipped this in 0.13: https://github.com/dogsheep/twitter-to-sqlite/releases/tag/0.13 See also this Twitter thread: https://twitter.com/simonw/status/1189369677509623809 | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Command for importing mentions timeline 513074501 | |
549094195 | https://github.com/dogsheep/github-to-sqlite/pull/8#issuecomment-549094195 | https://api.github.com/repos/dogsheep/github-to-sqlite/issues/8 | MDEyOklzc3VlQ29tbWVudDU0OTA5NDE5NQ== | simonw 9599 | 2019-11-03T00:43:16Z | 2019-11-03T00:43:28Z | MEMBER | Also need to take #5 into account - if this command creates incomplete user records, how do we repair them? And make sure that if we run this command first any future commands that populate users don't break (probably just a case of using `alter=True` in a few places). | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | stargazers command, refs #4 516763727 | |
549094229 | https://github.com/dogsheep/github-to-sqlite/issues/5#issuecomment-549094229 | https://api.github.com/repos/dogsheep/github-to-sqlite/issues/5 | MDEyOklzc3VlQ29tbWVudDU0OTA5NDIyOQ== | simonw 9599 | 2019-11-03T00:44:03Z | 2019-11-03T00:44:03Z | MEMBER | Might not need an incomplete boolean - may be possible to handle this with `alter=True` and then by filtering for users with null values in certain columns. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Add "incomplete" boolean to users table for incomplete profiles 493671014 |
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) 123 ✖