Evernote bug causing issues with importing: internal note links are not persistent

I though of something more ambitious: skip ENEX entirely and write an importer from Evernote to Joplin using the API. But that's just a suggestion.

I looked into this a bit. What is probably a dealbreaker is that to use the API requires an OAuth flow and evernote doesn't appear to support the oauth "device flow", which means that a web site would have to be hosted to, at a bare minimum, complete the authorization flow. So back to thinking about how else to pull this off. Pretty clear now why this isn't already a solved problem. The best solution by far would be that the GUID is included in the enex export. Still thinking about it, but probably not pursuing the API idea.

You can usually get it working by running a local server on the app. At the end of the Oauth flow, you give a localhost URL. That's how it works for the OneDrive auth on Joplin for example and there's no issue.

Thanks @laurent I'll try it

1 Like

It comes with absolutely no warranty, but I wrote a script to use the Joplin and Evernote APIs to re-write the evernote:// links when I first imported my .enex files...

I didn't use OAuth etc. just an API key.

4 Likes

Thanks @msbentley ! I might just give that a shot and see how it shakes out. Already did a full evernote export/joplin import but still treating it as a rehearsal as long as internal links are broken.

Still also looking at potential to build a plugin that does a direct import (well, still just familiarizing myself with the Joplin codebase in general, for starters). Ideally, I think I'd want access to some functionality from import-enex.js. Can a plugin reach those libs (e.g. processNoteResource()) ? Caveat: I haven't familiarized myself yet with plugin architecture, so this all could be asked/answered somewhere already and I just need to get around to reading about it.

Thanks!

It's part of the lib package, so you could simply import the @joplin/lib in your plugin.

1 Like