{"id":13314122,"url":"https://github.com/renesugar/movenotes","last_synced_at":"2025-03-10T20:33:22.229Z","repository":{"id":54590742,"uuid":"266422480","full_name":"renesugar/movenotes","owner":"renesugar","description":null,"archived":false,"fork":false,"pushed_at":"2022-07-29T23:16:21.000Z","size":127,"stargazers_count":12,"open_issues_count":2,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-07-29T19:05:44.574Z","etag":null,"topics":["apple-notes","joplin","migration-tool"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/renesugar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-23T21:28:33.000Z","updated_at":"2024-03-27T14:33:05.000Z","dependencies_parsed_at":"2022-08-13T20:40:33.438Z","dependency_job_id":null,"html_url":"https://github.com/renesugar/movenotes","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/renesugar%2Fmovenotes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renesugar%2Fmovenotes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renesugar%2Fmovenotes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renesugar%2Fmovenotes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/renesugar","download_url":"https://codeload.github.com/renesugar/movenotes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242922003,"owners_count":20207135,"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","joplin","migration-tool"],"created_at":"2024-07-29T18:11:01.857Z","updated_at":"2025-03-10T20:33:21.625Z","avatar_url":"https://github.com/renesugar.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# About\r\n**movenotes** is a set of utilities to migrate from Apple Notes to:\n\n* GMail Apple Notes\n* Joplin\n\nThe Apple Notes app does not provide a ***move all*** action to move all Apple Notes in a folder to GMail.\n\n\n[gyb](https://github.com/jay0lee/got-your-back/wiki) is used to import and export note email messages to and from GMail.\n\n[mac_apt](https://github.com/ydkhatri/mac_apt/wiki) is used to extract the Apple Notes database from iOS device backups.\n\n[readnotes](https://github.com/renesugar/readnotes) is used to extract Apple Notes from the Notes app databases for iOS and Mac OS.\n\n[bookmarks](https://github.com/renesugar/bookmarks) is used to extract bookmarks to be moved to GMail or Joplin as notes.\n\n[chrometabs](https://github.com/renesugar/chrometabs) is used to extract the current tabs from Google Chrome to be moved to GMail or Joplin as notes.\n\n[listurls](https://github.com/renesugar/listurls) is used to extract URLs from text files to be moved to GMail or Joplin as notes.\n\n[filterurls](https://github.com/renesugar/filterurls) is used to filter URLs from text files to be moved to GMail or Joplin as notes.\n\n[twitter-to-sqlite](https://github.com/dogsheep/twitter-to-sqlite) is used to extract Twitter likes via the Twitter API.\r\n\n[jq](https://github.com/stedolan/jq) is used to format JSON files.\n\r\n# Usage\n\n## Extract Apple Notes\n\n### Extract MacOS Notes Databases\n\nIn the example, see the *~/output_macos/Export/NOTES* directory for copies of files to process using *readnotes*.\n\nThe *mac_apt.db* file does not contain a complete representation of the note text.\n\n```\npython3 mac_apt.py -o ~/output_macos -s -x MOUNTED / NOTES\n```\n\n### Extract MacOS Notes\n\nSee the [readnotes](https://github.com/renesugar/readnotes) README for how to extract notes from the Apple Notes databases.\n\n### Extract iOS Notes Databases\n\nUse Finder to create a local iOS backup and then use *mac_apt* to extract the notes from the backup.\n\nIn the example, see the *~/output_ios/Export/IDEVICEBACKUPS* directory for copies of files to process using *readnotes*.\n\nThe *mac_apt.db* file does not contain a complete representation of the note text.\n\n```\npython3 mac_apt.py -o ~/output_ios -s -x MOUNTED / IDEVICEBACKUPS\n```\n\nRename *4f98687d8ab0d6d1a371110e6b7300f6e465bef2* from iOS backup to *NoteStore.sqlite*.\n\nName of notes SQLite database varies depending upon OS version:\n\n| Database | OS Version |\n|----------|------------|\n| NotesV1.storedata | Mountain Lion |\n| NotesV2.storedata | Mavericks |\n|NotesV4.storedata | Yosemite |\n|NotesV6.storedata | El Capitan and Sierra |\n|NotesV7.storedata | HighSierra |\n|NoteStore.sqlite  | El Capitan+ |\n\n```\npython3 mac_apt_artifact_only.py -i ~/output_ios/NoteStore.sqlite -o ~/output_ios_notes -s NOTES\n```\n\nCurrently, *mac_apt* does not extract *public.url* attachments in Apple Notes (see [\u003chttps://github.com/ydkhatri/mac_apt/issues/33\u003e). Any URLs in public.url attachments will be missing from the note text until public.url attachments are supported.\n\n### Extract iOS Notes\n\nSee the [readnotes](https://github.com/renesugar/readnotes) README for how to extract notes from the Apple Notes databases.\n\n### Extract iCloud Notes\nTo obtain a copy of your data:\n\n1. Log in to [privacy.apple.com](https://privacy.apple.com).\n2. Select the \"Get started\" link under the \"Get a copy of your data\" heading.\n3. Tick the boxes of the categories of data you want to download (Notes).\n4. Press Continue.\n5. Select your preferred maximum file size (Apple will split up the data into chunks, up to a maximum of 25 GB) and press Continue.\n\nAfter the download is ready, extract it into a local folder.\n\n### Load iCloud Notes into database\n```\npython3 -B icloud2sql.py --email your.email@address.com --input ~/iCloudNotes --output ~/notesdb\n```\n## Download GMail Apple Notes\n\n### Download GMail notes as EML files using [GYB](https://github.com/jay0lee/got-your-back/wiki)\n```\n./gyb --email your.email@address.com  --action estimate --search \"label:Notes\"\n```\n```\n./gyb --email your.email@address.com  --search \"label:Notes\"\n```\n### Load EML notes into database\n```\npython3 -B gyb2eml.py --email your.email@address.com --action list-files --local-folder ~/gyb/GYB-GMail-Backup-your.email@address.com \u003e filelist.txt\n```\n```\npython3 -B eml2sql.py --email your.email@address.com --filelist ./filelist.txt --output ~/notesdb\n```\n\n## Convert Emails into Notes\n\n### Convert MBOXes to EMLs\n```\npython3 -B mbox2eml.py --email your.email@address.com --input ./mboxes --output ~/note_emls\n```\n```\npython3 -B filelist.py --path ~/note_emls --extensions \".eml\" \u003e filelist.txt\n```\n### Load EMLs into database\n```\npython3 -B eml2sql.py --email your.email@address.com --filelist ./filelist.txt --output ~/notesdb\n```\n### Convert EMLs in database to Apple Note EMLs\n```\npython3 -B sql2eml.py --email your.email@address.com --input ~/notesdb --output ~/note_emls\n```\n## Move Apple Notes to GMail Folder\n\n### Save database as EML notes\n```\npython3 -B sql2eml.py --email your.email@address.com --input ~/notesdb --output ~/note_emls\n```\n### Package EML notes as an MBOX file\n```\npython3 -B eml2mbox.py --email your.email@address.com --input ~/note_emls --output ~/mboxes\n```\n### Load EML notes MBOX into GMail\n```\n./gyb --email your.email@address.com --action restore-mbox --local-folder ~/mboxes --label-restored Notes\n```\n\n## Move Apple Notes to Joplin\n### Load iCloud Notes into database\n```\npython3 -B icloud2sql.py --email your.email@address.com --input ~/icloud_notes --output ./output\n```\n### Load MacOS Notes into database\n```\npython3 -B macapt2sql.py --email your.email@address.com --input ~/macos_notes --output ~/notesdb\n```\n### Load iOS Notes into database\n```\npython3 -B macapt2sql.py --email your.email@address.com --input ~/ios_notes --output ~/notesdb\n```\n### Load iOS Notes into database and move all notes to folder \"Notes\"\n```\npython3 -B macapt2sql.py --email your.email@address.com --input ~/ios_notes --output ~/notesdb --folder Notes\n```\n\n### Load Joplin Notes into database\n```\npython3 -B joplin2sql.py --email your.email@address.com --input ~/JoplinNotesRAW --output ~/notesdb\n```\n\n### Remove duplicate notes from database\n\nRemove duplicate notes across all folders.\n\n```\npython3 -B removedups.py --email your.email@address.com --input ~/notedb\n```\n\n### Clean resources directory\n\nRemove unused resource files across all folders.\n\n```\npython3 -B cleanres.py --email rene.sugar@gmail.com --input ~/notesdb\n```\n### Convert database to Joplin Notes\n```\npython3 -B sql2joplin.py --email your.email@address.com --input ~/notedb --output ~/JoplinNotesRAW_New\n```\n\n## Convert Bookmarks to Notes\n\n### Load Firefox bookmark backup into database\n\n[Firefox Profile Folder](http://kb.mozillazine.org/Profile_folder_-_Firefox)\n\n[sessionstore-backups folder](https://support.mozilla.org/en-US/questions/1091640#answer-800491)\n\nSelect a backup in *~/Library/Application\\ Support/Firefox/Profiles/yourprofile.default/bookmarkbackups*\n\n[Decompress Mozilla Firefox bookmarks backup files](https://github.com/andikleen/lz4json)\n\n```\n./lz4jsoncat ./sample.jsonlz4\n\npython3 -B ffbookmarks.py --path ./sample.json\n```\n\n```\npython3 -B url2sql.py --email your.email@address.com --input ./urls.txt --output ~/notesdb --folder Bookmarks\n```\n\n### Load Firefox bookmarks into database\n```\npython3 -B ffplaces.py --path ~/Library/Application\\ Support/Firefox/Profiles/yourprofile.default/places.sqlite\n```\n\n```\npython3 -B url2sql.py --email your.email@address.com --input ./urls.txt --output ~/notesdb --folder Bookmarks\n```\n\n### Load Firefox tabs into database\n\n[Firefox Profile Folder](http://kb.mozillazine.org/Profile_folder_-_Firefox)\n\n[sessionstore-backups folder](https://support.mozilla.org/en-US/questions/1091640#answer-800491)\n\n*~/Library/Application\\ Support/Firefox/Profiles/n8hzydqt.default/sessionstore-backups/recovery.js*\n\n```\npython3 -B ffrecovery.py --path ~/Library/Application\\ Support/Firefox/Profiles/yourprofile.default/sessionstore.js\n```\n\n```\npython3 -B url2sql.py --email your.email@address.com --input ./urls.txt --output ~/notesdb --folder Bookmarks\n```\n\n### Load Chrome bookmarks into database\n\n```\npython3 -B chbookmarks.py --path ~/Library/Application\\ Support/Google/Chrome/Default/Bookmarks \u003e urls.txt\n```\n```\npython3 -B url2sql.py --email your.email@address.com --input ./urls.txt --output ~/notesdb --folder Bookmarks\n```\n\n### Load Chrome tabs into database\n\n```\npython3 -B chrometabs.py --path ~/Library/Application\\ Support/Google/Chrome/Default/Current\\ Tabs \u003e urls.txt\n```\n```\npython3 -B url2sql.py --email your.email@address.com --input ./urls.txt --output ~/notesdb --folder Bookmarks\n```\n\n### Load Safari bookmarks into database\n\n```\npython3 -B sfbookmarks.py --path ~/Library/Safari/Bookmarks.plist \u003e urls.txt\n```\n```\npython3 -B url2sql.py --email your.email@address.com --input ./urls.txt --output ~/notesdb --folder Bookmarks\n```\n\n### List URLs in text files\n\nExtract text data into a file using *strings* and then use *listurls.py* to extract the URLs in the text.\n\nThe titles will be retrieved online which can take some time. If the title cannot be retrieved, the URL will be used as the title.\n\n```\npython3 -B listurls.py --path ./input --output ./urls.txt\n```\n\n### Format URLs into Firefox bookmark HTML file\n\n```\npython3 -B htmlbackup.py --path ./urls.txt \u003e bookmarks.html\n```\n\n### Extract URLs from Firefox or Chrome bookmark HTML files\n\n```\npython3 -B htmlbookmarks.py --path ./input --output ./urls.txt --backup\n```\n\n### Filter URLs from URL backup file\n\nThe sites.txt file contains sites and URLs to filter out of the URL files.\n\n```\npython3 -B filterurls.py --path ./input --sites ./sites.txt --output ./urls.txt --backup\n```\n\n### Load bookmark URLs into database\n\nIf the title matches the URL, titles will be retrieved online which can take some time. If the title cannot be retrieved, the URL will be used as the title.\n\n```\npython3 -B url2sql.py --email your.email@address.com --input ./urls.txt --output ~/notesdb --folder Bookmarks\n```\n\n## Convert Twitter Likes to Notes\n\n### Extract Twitter Likes from API\n\n```\ntwitter-to-sqlite favorites faves.db\n```\n\n### Extract Twitter Likes from Archive\n\nSee [How to download your Twitter archive](https://help.twitter.com/en/managing-your-account/how-to-download-your-twitter-archive) on Twitter's website for how to download a copy of your Twitter archive.\n\n```\n$ twitter-to-sqlite import archiveYYYYMMDD.db ./twitter-YYYY-MM-DD-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/data/like.js\n```\n\n### Load Twitter likes from Archive into database\n\n```\npython3 -B twitterarchivelikes2sql.py --email your.email@address.com --input /path/to/Twitter/archive/likes/archiveYYYYMMDD.db --output ~/twitterdb --cache ./url_dict.json --error ./error_dict.json\n```\n\n### Expand Shortened URLs\n\nThe Twitter archive contains shortened URLs using Twitter's URL shortener.\n\nOther URL shorteners are also used by the authors of the tweets.\n\nOver time, these URL shorteners can become unavailable so the URLs need to be expanded. The Twitter archive data may contain shortened URLs that can no longer be expanded for this reason.\n\nIf there are expansion errors, this step will need to be repeated.\n\n```\npython3 -B expandurls.py --cache ./url_dict.json --error ./error_dict.json\n```\n\n```\ncat url_dict.json | jq '.' \u003e temp.txt\ncp temp.txt url_dict.json\nrm temp.txt\n\ncat error_dict.json | jq '.' \u003e temp.txt\ncp temp.txt error_dict.json\nrm temp.txt\n```\n\nWipe the Twitter database and re-run the step to load the database with the cache of expanded URLs.\n\n```\nrm ~/twitterdb/*\n```\n\n### Load Twitter Likes from API into database\n\n```\npython3 -B twitterlikes2sql.py --email your.email@address.com --input /path/to/Twitter/API/likes/faves.db --output ~/twitterdb --cache ./url_dict.json --error ./error_dict.json\n```\n\n### Expand Shortened URLs\n\nExpand shortened URLs in the Twitter likes.\n\n\nWipe the Twitter database and re-run the step to load the database with the cache of expanded URLs.\n\n```\nrm ~/twitterdb/*\n```\n\n### Convert database to Jopin Notes\n\n```\npython3 -B sql2joplin.py --email your.email@address.com --input ~/twitterdb --output ~/JoplinNotesRAW_Twitter\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frenesugar%2Fmovenotes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frenesugar%2Fmovenotes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frenesugar%2Fmovenotes/lists"}