Skip to content

Instantly share code, notes, and snippets.

@locofocos
Last active July 12, 2020 02:15
Show Gist options
  • Save locofocos/4c618dcbdb060c0bb1759461054147f0 to your computer and use it in GitHub Desktop.
Save locofocos/4c618dcbdb060c0bb1759461054147f0 to your computer and use it in GitHub Desktop.
Export notes from Samsung Notes to Evernote

Poor man's approach (Windows)

Mostly-batch approach (Windows)

This converts PDF to plain text, then imports to Evernote. Don't expect anything beyond plain text, like pictures.

 cd "C:\Users\the user name\Downloads\drive-download-20200712T005213Z-001" 
 cmd /k for %%i in (*) do "C:\Users\the user name\Downloads\pdftotext.exe" %%i "C:\Users\the user name\Downloads\txtnotesoutput\%%~ni.txt"
  • Tweak the paths as necessary. Sorry for the quick write up.
    • drive-download-20200712T005213Z-001 has all the PDFs inside that I downloaded from Google Drive.
    • txtnotesoutput is a folder I created already
  • Run the bat script. Now txtnotesoutput should have a bunch of txt files. Each text file has a random-ish file name.
  • Open PowerShell and run this command to rename each text file using the first line of the file: Get-childitem "C:\Users\the user name\Downloads\txtnotesoutput\*.txt" | %{rename-item $_.fullname $_.name.replace($_.basename,(get-content $_.fullname)[0])}
  • For any files that failed (probably due to the note containing a character that isn't allowed, or a duplicate name), fix these by hand. Open in Notepad++, copy the first line, rename the file in Windows Explorer. You could write some command or script I'm sure.
  • Strip out the weird unicode characters.
    • Option 1 - I'd love to script out something with iconv following https://stackoverflow.com/a/8562577 but I can't get the batch script to redirect the output to the new file. Doing this on Windows is painful. My attempt: cmd /k for %%i in (*) do "C:\Program Files (x86)\GnuWin32\bin\iconv.exe" -c -f utf-8 -t ascii "%%i" ^> "%%i"
    • Option 2 - Open all the text files in Notepad++. Do a global ctrl-F to remove the weird character at the end. Save all (there's a menu item up top).
  • Import to Evernote: https://help.evernote.com/hc/en-us/articles/208314308-How-to-import-from-other-note-apps-into-Evernote

Handwritten notes

This reddit comment makes some mention of retrieving the handwritten notes: https://www.reddit.com/r/GalaxyNote8/comments/9l6dv6/its_now_possible_to_run_the_samsung_notes_app_on/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment