Since maybe many people will come across this, I thought I would mention a bug in evernote I came across since it’s affecting imports from evernote. And when/if it’s fixed, I imagine Joplin will need to handle it as well.
Is this just the longstanding problem with Evernote exports in that internal links are represented only as links to Evernote’s web servers, which change if notes are deleted (or e.g. moved between accounts)?
(NB I quite Evernote for Joplin as soon as I became aware of this)
I don’t know how longstanding it is as I hadn’t noticed it before. I did a search on the forum but didn’t see any mention of it here.
Does it sound like it’s the problem described here — https://discussion.evernote.com/topic/24557-import-old-notebooks-into-evernote-using-enex-loses-all-note-links/ ?
If so, that’s the longstanding problem I refer to to. (that forum thread is from 2012). Given how long it’s been around, I’m not very worried that Evernote are going to fix it.
In theory, you could write a script that takes a .enex file and matches up internal links based on the note titles - but that won’t work for cases where you’ve edited the link text or the note. If you had only done that for a minority of cases, maybe the script could list the cases it couldn’t match, and leave them up to you to manually fix before running it again.
(the script might also incorrectly link some cases where the link text has been changed so that it matches the title of the wrong note. I don’t see any way to avoid that.)
Said script, or a second one, would then need to export in Joplin format somehow.
yeah, this looks like it. I looked at the enex files as they’re just XML files. There’s no unique internal identifier for any given note so there’s no way they have currently to link it. That’s really stupid.
And the link itself is clearly a reference to an internal database id.
Just a quick addendum - I'm looking into this for my own purposes, and one can use the Evernote API to retrieve a list of GUID, title, creation date, for example. So I am hoping to use this to re-map of the broken links in Joplin. I guess the workflow would be to script something that does this:
- Find all notes containing evernote:// links
- Extract the GUIDs in use from each note
- Use the Evernote API to look up the title and creation date of each linked note
- Use the Joplin API to find the corresponding Joplin note filenames
- Modify the notes to replace enex:// links with Joplin links
I haven't poked into the Joplin API yet, so step 4 is the unknown one for me, but I think this is reasonable.
Does anyone have other ideas? Or see any flaws in my plan?
Does anyone have other ideas? Or see any flaws in my plan?
Great idea, can you implement this? The only problem I see is that you can find several notes with the same name in Evernote, but I think it is not a common situation and you can pick up the first one.
Another idea is that maybe steps 2 and 3 unnecessary. Each link in Joplin has already the name of the note (at least it is my case). So it is better to find a note in Joplin with that name, copy the markdown link and paste it instead of Evernote's link.
Well, I don't know any js so won't be trying to tackle this in Joplin - my plan is to use a python script and work outside/with Jopling after I import.
Indeed title is not unique - title and creation date together are (in my case, at least).
I can't see how to avoid steps 2/3 since the only information in the imported Joplin notes is something like this:
<a href="evernote:///view/138788/s3/3ba1eea5-8f77-41d7-a2bc-116f18f7c034/3ba1eea5-8f77-41d7-a2bc-116f18f7c034/" title="evernote:///view/138788/s3/3ba1eea5-8f77-41d7-a2bc-116f18f7c034/3ba1eea5-8f77-41d7-a2bc-116f18f7c034/">Monthly planning May 2020</a>
So you have to turn this into a Joplin link (simple link to the Markdown file) by matching the note GUID (
3ba1eea5-8f77-41d7-a2bc-116f18f7c034) referenced in the note to another Joplin note (for which we need to know the filename, e.g.
The only way I can see to do this is to query the Evernote API to find the note title and creation date, and find a matching note in Joplin. (Actually I simply use the Evernote API to create a CSV file with GUID, Title, Date records - that bit is easy, now I have to play with the Joplin API).
Hope you can do that. I have many internal links what now are broken.
enex file and matches up internal links based on the note titles - but that won’t work for cases where you’ve edited the link text or the note. If you had only done that for a minority of cases, maybe the script could list the cases it couldn’t match, and leave them up to you to manually fix before running it again.
No, indeed - as I mention above, I would only do this immediately following an ENEX import - once, and never again
And please, share your work with us
But I thought, if you share your work with us, it is possible that many users will change several links. Like I did with most recent notes I am working now. So now my Joplin base <> Evernote base in some notes.
Sure - I've got something that half works now, but once it's polished and tested I'll push it to GitHub and post in the #apps category.
Hi, I'm interested in working on this problem (migrate evernote internal links to joplin). Does this thread represent the latest activity on the topic? Did that python land somewhere where I can help? Is anyone else motivated to discuss a design that solves the problem more cleanly (e.g. looks like smartenex isn't active anymore; also read somewhere that a linux evernote client can export a slightly different format that does include UUIDs).
Personally, I've got years of evernote notes with internal links to import. Very often I did not preserve original note titles.
@joeschmoe this is a well known issue at Evernote. Many EN users aren't aware of it, but the "power users" have known about it for years. And it creates a problem when moving to Joplin since Joplin's import cannot recreate note links that EN's export file doesn't contain.
Some thoughts I had on this issue.
Looks like Evernote has an API. Maybe it could be used for export bypassing ENEX.
API route is interesting. What makes sense? Generate JEX format via evernote API instead?
thanks @jb261. The thing I was hoping to avoid is the "match by note title" idea because I have quite a few that won't match this way. What do you think about generating JEX or some other format instead straight out of evernote via API?
I've never used Evernote's API. That could work. Even if you can't export in a JEX-like format, if you could write a script that appends the target note's title next to the note link in the referring note, that would make it pretty trivial to redo the note link when you run across the referring note in Joplin (just use @@ in front of the target note title and @roman_r_m 's quick links plugin will find and create the link).