{"url":"https://api.github.com/repos/dogsheep/apple-notes-to-sqlite/issues/8","repository_url":"https://api.github.com/repos/dogsheep/apple-notes-to-sqlite","labels_url":"https://api.github.com/repos/dogsheep/apple-notes-to-sqlite/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/dogsheep/apple-notes-to-sqlite/issues/8/comments","events_url":"https://api.github.com/repos/dogsheep/apple-notes-to-sqlite/issues/8/events","html_url":"https://github.com/dogsheep/apple-notes-to-sqlite/issues/8","id":1617823309,"node_id":"I_kwDOJHON9s5gbgZN","number":8,"title":"Increase performance using macnotesapp","user":{"login":"RhetTbull","id":41546558,"node_id":"MDQ6VXNlcjQxNTQ2NTU4","avatar_url":"https://avatars.githubusercontent.com/u/41546558?v=4","gravatar_id":"","url":"https://api.github.com/users/RhetTbull","html_url":"https://github.com/RhetTbull","followers_url":"https://api.github.com/users/RhetTbull/followers","following_url":"https://api.github.com/users/RhetTbull/following{/other_user}","gists_url":"https://api.github.com/users/RhetTbull/gists{/gist_id}","starred_url":"https://api.github.com/users/RhetTbull/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RhetTbull/subscriptions","organizations_url":"https://api.github.com/users/RhetTbull/orgs","repos_url":"https://api.github.com/users/RhetTbull/repos","events_url":"https://api.github.com/users/RhetTbull/events{/privacy}","received_events_url":"https://api.github.com/users/RhetTbull/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[],"state":"closed","locked":false,"assignees":[],"milestone":null,"comments":1,"created_at":"2023-03-09T18:51:05Z","updated_at":"2023-03-14T22:00:22Z","closed_at":"2023-03-14T22:00:21Z","assignee":null,"author_association":"NONE","type":null,"active_lock_reason":null,"sub_issues_summary":{"total":0,"completed":0,"percent_completed":0},"issue_dependencies_summary":{"blocked_by":0,"total_blocked_by":0,"blocking":0,"total_blocking":0},"body":"Neat project!  You can probably increase performance using my python interface to Notes, [macnotesapp](https://github.com/RhetTbull/macnotesapp), which uses Scripting Bridge and bulk queries for much better performance than AppleScript.\r\n\r\nAnother related project is [PyXA](https://github.com/SKaplanOfficial/PyXA) which uses Scripting Bridge to access Notes (and many other apps) and can return all the notes at once as opposed to calling AppleScript for each note.  \r\n\r\nmacnotesapp allows you to access multiple accounts and folders as well.\r\n\r\n```python\r\nfrom macnotesapp import NotesApp\r\n\r\n# NotesApp() provides interface to Notes.app\r\nnotesapp = NotesApp()\r\n\r\n# Get list of notes (Note objects for each note)\r\nnotes = notesapp.notes()\r\nnote = notes[0]\r\nprint(\r\n    note.id,\r\n    note.account,\r\n    note.folder,\r\n    note.name,\r\n    note.body,\r\n    note.plaintext,\r\n    note.password_protected,\r\n)\r\n\r\nprint(note.asdict())\r\n\r\n```","closed_by":{"login":"RhetTbull","id":41546558,"node_id":"MDQ6VXNlcjQxNTQ2NTU4","avatar_url":"https://avatars.githubusercontent.com/u/41546558?v=4","gravatar_id":"","url":"https://api.github.com/users/RhetTbull","html_url":"https://github.com/RhetTbull","followers_url":"https://api.github.com/users/RhetTbull/followers","following_url":"https://api.github.com/users/RhetTbull/following{/other_user}","gists_url":"https://api.github.com/users/RhetTbull/gists{/gist_id}","starred_url":"https://api.github.com/users/RhetTbull/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RhetTbull/subscriptions","organizations_url":"https://api.github.com/users/RhetTbull/orgs","repos_url":"https://api.github.com/users/RhetTbull/repos","events_url":"https://api.github.com/users/RhetTbull/events{/privacy}","received_events_url":"https://api.github.com/users/RhetTbull/received_events","type":"User","user_view_type":"public","site_admin":false},"reactions":{"url":"https://api.github.com/repos/dogsheep/apple-notes-to-sqlite/issues/8/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/dogsheep/apple-notes-to-sqlite/issues/8/timeline","performed_via_github_app":null,"state_reason":"completed","pinned_comment":null}