issue_comments: 1461230197
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/dogsheep/apple-notes-to-sqlite/issues/1#issuecomment-1461230197 | https://api.github.com/repos/dogsheep/apple-notes-to-sqlite/issues/1 | 1461230197 | IC_kwDOJHON9s5XGJp1 | 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 ```zsh !/bin/zshosascript -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'
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 } |
1616347574 |