movenotes is a set of utilities to migrate from Apple Notes to:
- GMail Apple Notes
- Joplin
The Apple Notes app does not provide a move all action to move all Apple Notes in a folder to GMail.
gyb is used to import and export note email messages to and from GMail.
mac_apt is used to extract the Apple Notes database from iOS device backups.
readnotes is used to extract Apple Notes from the Notes app databases for iOS and Mac OS.
bookmarks is used to extract bookmarks to be moved to GMail or Joplin as notes.
chrometabs is used to extract the current tabs from Google Chrome to be moved to GMail or Joplin as notes.
listurls is used to extract URLs from text files to be moved to GMail or Joplin as notes.
filterurls is used to filter URLs from text files to be moved to GMail or Joplin as notes.
twitter-to-sqlite is used to extract Twitter likes via the Twitter API.
jq is used to format JSON files.
In the example, see the ~/output_macos/Export/NOTES directory for copies of files to process using readnotes.
The mac_apt.db file does not contain a complete representation of the note text.
python3 mac_apt.py -o ~/output_macos -s -x MOUNTED / NOTES
See the readnotes README for how to extract notes from the Apple Notes databases.
Use Finder to create a local iOS backup and then use mac_apt to extract the notes from the backup.
In the example, see the ~/output_ios/Export/IDEVICEBACKUPS directory for copies of files to process using readnotes.
The mac_apt.db file does not contain a complete representation of the note text.
python3 mac_apt.py -o ~/output_ios -s -x MOUNTED / IDEVICEBACKUPS
Rename 4f98687d8ab0d6d1a371110e6b7300f6e465bef2 from iOS backup to NoteStore.sqlite.
Name of notes SQLite database varies depending upon OS version:
Database | OS Version |
---|---|
NotesV1.storedata | Mountain Lion |
NotesV2.storedata | Mavericks |
NotesV4.storedata | Yosemite |
NotesV6.storedata | El Capitan and Sierra |
NotesV7.storedata | HighSierra |
NoteStore.sqlite | El Capitan+ |
python3 mac_apt_artifact_only.py -i ~/output_ios/NoteStore.sqlite -o ~/output_ios_notes -s NOTES
Currently, mac_apt does not extract public.url attachments in Apple Notes (see [ydkhatri/mac_apt#33). Any URLs in public.url attachments will be missing from the note text until public.url attachments are supported.
See the readnotes README for how to extract notes from the Apple Notes databases.
To obtain a copy of your data:
- Log in to privacy.apple.com.
- Select the "Get started" link under the "Get a copy of your data" heading.
- Tick the boxes of the categories of data you want to download (Notes).
- Press Continue.
- Select your preferred maximum file size (Apple will split up the data into chunks, up to a maximum of 25 GB) and press Continue.
After the download is ready, extract it into a local folder.
python3 -B icloud2sql.py --email [email protected] --input ~/iCloudNotes --output ~/notesdb
Download GMail notes as EML files using GYB
./gyb --email [email protected] --action estimate --search "label:Notes"
./gyb --email [email protected] --search "label:Notes"
python3 -B gyb2eml.py --email [email protected] --action list-files --local-folder ~/gyb/[email protected] > filelist.txt
python3 -B eml2sql.py --email [email protected] --filelist ./filelist.txt --output ~/notesdb
python3 -B mbox2eml.py --email [email protected] --input ./mboxes --output ~/note_emls
python3 -B filelist.py --path ~/note_emls --extensions ".eml" > filelist.txt
python3 -B eml2sql.py --email [email protected] --filelist ./filelist.txt --output ~/notesdb
python3 -B sql2eml.py --email [email protected] --input ~/notesdb --output ~/note_emls
python3 -B sql2eml.py --email [email protected] --input ~/notesdb --output ~/note_emls
python3 -B eml2mbox.py --email [email protected] --input ~/note_emls --output ~/mboxes
./gyb --email [email protected] --action restore-mbox --local-folder ~/mboxes --label-restored Notes
python3 -B icloud2sql.py --email [email protected] --input ~/icloud_notes --output ./output
python3 -B macapt2sql.py --email [email protected] --input ~/macos_notes --output ~/notesdb
python3 -B macapt2sql.py --email [email protected] --input ~/ios_notes --output ~/notesdb
python3 -B macapt2sql.py --email [email protected] --input ~/ios_notes --output ~/notesdb --folder Notes
python3 -B joplin2sql.py --email [email protected] --input ~/JoplinNotesRAW --output ~/notesdb
Remove duplicate notes across all folders.
python3 -B removedups.py --email [email protected] --input ~/notedb
Remove unused resource files across all folders.
python3 -B cleanres.py --email [email protected] --input ~/notesdb
python3 -B sql2joplin.py --email [email protected] --input ~/notedb --output ~/JoplinNotesRAW_New
Select a backup in ~/Library/Application\ Support/Firefox/Profiles/yourprofile.default/bookmarkbackups
Decompress Mozilla Firefox bookmarks backup files
./lz4jsoncat ./sample.jsonlz4
python3 -B ffbookmarks.py --path ./sample.json
python3 -B url2sql.py --email [email protected] --input ./urls.txt --output ~/notesdb --folder Bookmarks
python3 -B ffplaces.py --path ~/Library/Application\ Support/Firefox/Profiles/yourprofile.default/places.sqlite
python3 -B url2sql.py --email [email protected] --input ./urls.txt --output ~/notesdb --folder Bookmarks
~/Library/Application\ Support/Firefox/Profiles/n8hzydqt.default/sessionstore-backups/recovery.js
python3 -B ffrecovery.py --path ~/Library/Application\ Support/Firefox/Profiles/yourprofile.default/sessionstore.js
python3 -B url2sql.py --email [email protected] --input ./urls.txt --output ~/notesdb --folder Bookmarks
python3 -B chbookmarks.py --path ~/Library/Application\ Support/Google/Chrome/Default/Bookmarks > urls.txt
python3 -B url2sql.py --email [email protected] --input ./urls.txt --output ~/notesdb --folder Bookmarks
python3 -B chrometabs.py --path ~/Library/Application\ Support/Google/Chrome/Default/Current\ Tabs > urls.txt
python3 -B url2sql.py --email [email protected] --input ./urls.txt --output ~/notesdb --folder Bookmarks
python3 -B sfbookmarks.py --path ~/Library/Safari/Bookmarks.plist > urls.txt
python3 -B url2sql.py --email [email protected] --input ./urls.txt --output ~/notesdb --folder Bookmarks
Extract text data into a file using strings and then use listurls.py to extract the URLs in the text.
The titles will be retrieved online which can take some time. If the title cannot be retrieved, the URL will be used as the title.
python3 -B listurls.py --path ./input --output ./urls.txt
python3 -B htmlbackup.py --path ./urls.txt > bookmarks.html
python3 -B htmlbookmarks.py --path ./input --output ./urls.txt --backup
The sites.txt file contains sites and URLs to filter out of the URL files.
python3 -B filterurls.py --path ./input --sites ./sites.txt --output ./urls.txt --backup
If 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.
python3 -B url2sql.py --email [email protected] --input ./urls.txt --output ~/notesdb --folder Bookmarks
twitter-to-sqlite favorites faves.db
See How to download your Twitter archive on Twitter's website for how to download a copy of your Twitter archive.
$ twitter-to-sqlite import archiveYYYYMMDD.db ./twitter-YYYY-MM-DD-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/data/like.js
python3 -B twitterarchivelikes2sql.py --email [email protected] --input /path/to/Twitter/archive/likes/archiveYYYYMMDD.db --output ~/twitterdb --cache ./url_dict.json --error ./error_dict.json
The Twitter archive contains shortened URLs using Twitter's URL shortener.
Other URL shorteners are also used by the authors of the tweets.
Over 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.
If there are expansion errors, this step will need to be repeated.
python3 -B expandurls.py --cache ./url_dict.json --error ./error_dict.json
cat url_dict.json | jq '.' > temp.txt
cp temp.txt url_dict.json
rm temp.txt
cat error_dict.json | jq '.' > temp.txt
cp temp.txt error_dict.json
rm temp.txt
Wipe the Twitter database and re-run the step to load the database with the cache of expanded URLs.
rm ~/twitterdb/*
python3 -B twitterlikes2sql.py --email [email protected] --input /path/to/Twitter/API/likes/faves.db --output ~/twitterdb --cache ./url_dict.json --error ./error_dict.json
Expand shortened URLs in the Twitter likes.
Wipe the Twitter database and re-run the step to load the database with the cache of expanded URLs.
rm ~/twitterdb/*
python3 -B sql2joplin.py --email [email protected] --input ~/twitterdb --output ~/JoplinNotesRAW_Twitter