{"id":13582569,"url":"https://github.com/ChrLipp/notes-import","last_synced_at":"2025-04-06T14:31:03.066Z","repository":{"id":37248405,"uuid":"152028905","full_name":"ChrLipp/notes-import","owner":"ChrLipp","description":"Parses Apple notes SQLite databases","archived":false,"fork":false,"pushed_at":"2024-03-09T10:24:05.000Z","size":184,"stargazers_count":42,"open_issues_count":1,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-05T22:41:47.685Z","etag":null,"topics":["apple","notes","sqlite-database"],"latest_commit_sha":null,"homepage":null,"language":"Groovy","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ChrLipp.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-08T06:28:10.000Z","updated_at":"2024-11-04T23:53:24.000Z","dependencies_parsed_at":"2024-03-09T11:31:01.568Z","dependency_job_id":"c5b6be16-39e0-4dec-84bc-aea4a30e05da","html_url":"https://github.com/ChrLipp/notes-import","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChrLipp%2Fnotes-import","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChrLipp%2Fnotes-import/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChrLipp%2Fnotes-import/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChrLipp%2Fnotes-import/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ChrLipp","download_url":"https://codeload.github.com/ChrLipp/notes-import/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247495794,"owners_count":20948108,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apple","notes","sqlite-database"],"created_at":"2024-08-01T15:02:51.259Z","updated_at":"2025-04-06T14:31:02.776Z","avatar_url":"https://github.com/ChrLipp.png","language":"Groovy","funding_links":[],"categories":["Groovy"],"sub_categories":[],"readme":"# Apple Notes database parser\n\n## About\n\nApple Notes data is stored in a SQLite database. Some month ago the data has been stored in the file\n`/Users/\u003cuser\u003e/Library/Containers/com.apple.Notes/Data/Library/Notes/NotesV7.storedata` respectively\n`NotesV6.storedata` for the prior version. The notes have been stored in a HTML subset in clear text.\n\nThen Apple kept the file but didn't update it anymore. Instead, a new location was used:\n`/Users/christian/Library/Group Containers/group.com.apple.notes/NoteStore.sqlite`. The data is not\nin clear text anymore. I needed the access badly, because my MacBook Pro was defect (spilled a bottle\nof wine over it), my last backup was long ago and I didn't sync into iCloud.  \n\nSo I found [apple_cloud_notes_parser](https://github.com/threeplanetssoftware/apple_cloud_notes_parser),\na Perl script which showed me how to parse the data. However, they have a small bug in calculating the\nlength of the data, so you will get only the first 27 chars or so of the note.\n\nI decided to port the code to Java (ok, to Groovy) to be able to fix that. I could have adopted the\nperl script but I thought I will have to strip the HTML fragments, but this was wrong. In the new\nformat, there are no HTML fragments any more. Anyway, even if I used it only once, the script evolved\nbased on feedback.\n\n## Usage\n\nCopy the database (location above) to the input folder, rename it to `NoteStore.sqlite` and start the\nscript with `./gradlew runScript`. You will receive a file per document in the output folder.\nAfterwards I created empty notes and copy/pasted the notes back to Apple Notes again (at this time with\nactivated iCloud sync).\n\n## Remark\n\nI also tried to copy the whole database to my new MacBook, but this didn't work.\n\n## Tested with\n\n    openjdk version \"21.0.1\" 2023-10-17\n    OpenJDK Runtime Environment Homebrew (build 21.0.1)\n    Groovy Version: 4.0.19\n\n## Acknowledgement\n\n- [Duncan Brown](https://github.com/duncanjbrown) provided a PR to obtain name, structure and creation timestamp for all notes\n\n## Links\n\n- Found another statement, didn't test it: https://github.com/ydkhatri/mac_apt/issues/46#issuecomment-766418508\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FChrLipp%2Fnotes-import","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FChrLipp%2Fnotes-import","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FChrLipp%2Fnotes-import/lists"}