Evernote Internal Links broken on import with Text format links using Importer and YARLE

What I’m trying to do

Migrate from Evernote and preserve internal links. I’ve followed guides in the Obsidian and YARLE documentation, but internal links are still broken following import.

I believe this is because

  1. the format of the links in notes is Text
  2. the Obsidian Importer and YARLE methods rely consistency of link text and note name in order to match link to note on import
  3. my link text in the Evernote note isn’t the same as the note name.

I am able get internal links to successfully work if I find the source note and change the internal link format to Title prior to export. However, there’s not easy way to identify internal links with the Text format in Evernote, no way to bulk change the format, and there are too many links to do manually.

What I’m asking is

  • Are there are configurations that would enable internal links for Text format sources?
  • Is there some way to do link matching in the import process that doesn’t rely on the text in the link to find the correct linked note?

The Issue

In Evernote, I have a source note with this:

Text is: Conversations on company profile editing for the Partners pages

And the linked text, “profile editing for the Partners pages” points to another note in as evernote:///view/2768084/s24/d81…

This link works. The linked note has the title Partners, Company Profiles and exists in another notebook.

In Obsidian, following import, the note shows

Text is: Conversations on company profile editing for the Partners pages

But the link is broken. It’s trying to link to “company%20profile%20editing%20for%20the%20Partners%20pages”

Things I have tried

Hi @nateB ,

Thanks for trying Yarle!
About the wrong links, could you pls check whether urlEncodeFileNamesAndLinks is true?
It should be false.
If it is, then could you pls share the whole config?
Thanks a lot!

Thank you for putting Yarle out there and helping here!

I did have urlEncodeFileNamesAndLinks = false.

This was the whole config (created after using the GUI):

{"enexSources":
["/Volumes/Media/2024-03-25/General.enex","
/Volumes/Media/2024-03-25/Projects - Live.enex","
/Volumes/Media/2024-03-25/Resources.enex","
/Volumes/Media/2024-03-25/Work Logs.enex"],"
outputDir":"/Users/nB/Library/Mobile Documents/iCloud~md~obsidian/Documents/Starter/Yarling","
isMetadataNeeded":true,"
isNotebookNameNeeded":false,"
isZettelkastenNeeded":false,"
useZettelIdAsFilename":false,"
plainTextNotesOnly":false,"
skipLocation":true,"
skipCreationTime":true,"
skipUpdateTime":true,"
skipSourceUrl":true,"
skipWebClips":false,"
skipTags":true,"
useHashTags":true,"
outputFormat":"ObsidianMD","
taskOutputFormat":"ObsidianMD","
skipEnexFileNameFromOutputPath":false,"
keepMDCharactersOfENNotes":false,"
monospaceIsCodeBlock":false,"
keepOriginalHtml":false,"
currentTemplate":"---\n\n
{source-url-block}source: {source-url}{end-source-url-block}\n
{created-at-block}created: {created-at}{end-created-at-block}\n
{updated-at-block}modified: {updated-at}{end-updated-at-block}\n
{tags-block}tags: {tags}{end-tags-block}\n
{notebook-block}notebook: {notebook}{end-notebook-block}\n
{location-block}location: {location}{end-location-block}\n\n
---\n\n
{title-block}# {title}{end-title-block}\n\n
{content-block}{content}{end-content-block}\n
***\n
{evernotelink-block}{evernotelink}{end-evernotelink-block}\n\n
{evernoteguid-block}{evernoteguid}{end-evernoteguid-block}","
resourcesDir":"_resources","
trimStartingTabs":false,"
convertPlainHtmlNewlines":false,"
encryptionPasswords":[""],"
nestedTags":{"separatorInEN":"_","
replaceSeparatorWith":"---","
replaceSpaceWith":"-"},"
logseqSettings":{"journalNotes":false},"
obsidianSettings":{"omitLinkDisplayName":true},"
dateFormat":"YYYY-MM-DDTHH:mm:ssZ","
imageSizeFormat":"ObsidianMD","
keepImageSize":true,"
keepOriginalAmountOfNewlines":false,"
urlEncodeFileNamesAndLinks":false,"
haveEnexLevelResources":true,"
haveGlobalResources":false,"
useUniqueUnknownFileNames":true,"
useLevenshteinForLinks":false,"
keepFontColors":false,"
sanitizeResourceNameSpaces":true,"
replacementChar":"_","
replacementCharacterMap":{"<":"_","
>":"_","
:":"-","
\"":"_","
/":"_","
\\":"_","
|":"_","
?":"_","
*":"_"}
}

@akos0215 does anything appear evidently wrong with the config above ^

FWIW for anybody who ends up here in the future, my fundamental issue was that the links in notes had different text than the names of the notes/files they linked to. These accounted for about .5% of my 100,000+ notes. :melting_face:

This was the config that worked 95% for me:


Current config is: {
    "enexSources": [
        "/Volumes/Media/Evernote/IFTTT.enex"
    ],
    "outputDir": "/Volumes/Media/Obsidian/IFTTT",
    "keepOriginalHtml": false,
    "posixHtmlPath": false,
    "isMetadataNeeded": true,
    "isNotebookNameNeeded": true,
    "isZettelkastenNeeded": false,
    "useZettelIdAsFilename": false,
    "plainTextNotesOnly": false,
    "skipWebClips": false,
    "useHashTags": true,
    "trimStartingTabs": false,
    "convertPlainHtmlNewlines": false,
    "encryptionPasswords": [
        ""
    ],
    "nestedTags": {
        "separatorInEN": "_",
        "replaceSeparatorWith": "---",
        "replaceSpaceWith": "-"
    },
    "outputFormat": "ObsidianMD",
    "taskOutputFormat": "ObsidianMD",
    "obsidianTaskTag": "",
    "urlEncodeFileNamesAndLinks": false,
    "sanitizeResourceNameSpaces": true,
    "replacementChar": "-",
    "replacementCharacterMap": {
        "<": "_",
        ">": "_",
        ":": " -",
        "\"": "_",
        "/": "_",
        "\\": "_",
        "|": " -",
        "?": "_",
        "*": "_"
    },
    "globalReplacementSettings": [
        {
            "type": "title",
            "regex": "[^a-zA-Z0-9&?!., -]",
            "replace": ""
        }
    ],
    "pathSeparator": "/",
    "resourcesDir": "_resources",
    "turndownOptions": {
        "headingStyle": "atx"
    },
    "skipEnexFileNameFromOutputPath": false,
    "keepMDCharactersOfENNotes": false,
    "monospaceIsCodeBlock": false,
    "currentTemplate": "---\n{title-block}title: {title}{end-title-block}\n{source-url-block}source: {source-url}{end-source-url-block}\n{created-at-block}created: {created-at}{end-created-at-block}\n{updated-at-block}modified: {updated-at}{end-updated-at-block}\n{tags-block}tags: {tags}{end-tags-block}\n{notebook-block}notebook: {notebook}{end-notebook-block}\n{location-block}location: {location}{end-location-block}\n{evernotelink-block}EN Source: {evernotelink}{end-evernotelink-block}\n{evernoteguid-block}EN GUID: {evernoteguid}{end-evernoteguid-block}\n\n---\n{content-block}{content}{end-content-block}\n\n\n",
    "logseqSettings": {
        "journalNotes": false
    },
    "obsidianSettings": {
        "omitLinkDisplayName": false
    },
    "dateFormat": "YYYY-MM-DDTHH:mm:ssZ",
    "imageSizeFormat": "ObsidianMD",
    "keepImageSize": true,
    "keepOriginalAmountOfNewlines": false,
    "addExtensionToInternalLinks": true,
    "generateNakedUrls": false,
    "haveEnexLevelResources": false,
    "haveGlobalResources": true,
    "useUniqueUnknownFileNames": true,
    "useLevenshteinForLinks": false,
    "convertColorsToMDHighlight": false,
    "keepEvernoteLinkIfNoNoteFound": false,
    "skipCreationTime": false,
    "skipLocation": false,
    "skipSourceUrl": false,
    "skipTags": false,
    "skipUpdateTime": false
}

Notes wouldn’t form internal links correctly when "keepEvernoteLinkIfNoNoteFound" : true. I’d get Evernote source links everywhere when I expected only the unlinkable notes would retain a link back to Evernote. Still, I found having the Evernote link was useful when I needed to refer to original note that didn’t import correctly, so I kept those in Properties.

Having "addExtensionToInternalLinks": true was also necessary otherwise the internal linking wouldn’t work.

Rewriting for unusable characters was the only way to get many notes to import.

A Global resource folder made for more reliable reorganization in post-import cleanup.

YMMV


Post-import

Finding where I needed to relink was made easier using reports from the Consistent Links and Attachments plugin, which identified where broken links existed in imported notes.

Consistent Links could also identify notes which didn’t import, which Yarle logs but doesn’t identify clearly. The imported Table of Contents files, required for Yarle to correctly link anything, showed broken links representing missing notes in Consistent Link reports. Sometimes this was the result of using replacement characters in filenames. Sometimes Yarle just couldn’t convert a note - characters are allowed in Evernote note titles that shouldn’t be in filenames. The only way I found around this was to run the import with regex replacements then manually relink where needed.

For the manual relinking I used Various Complements to make it easier to type the note/filename and create a link.

When notes failed to import at all, I could copy/paste from an HTML export I made of my Evernote notes and hosted locally. Local Images Plus put everything in the right place. I used Chrome. I prefer Firefox, but it doesn’t encode spaces in URLs and that seemed to prevent Local Images Plus from finding the image assets. Chrome links had the %20 everywhere it was needed.

I could use Linter to change filenames and Title properties to fix names post-import.


Best of luck and hopes for a frustration-free migration to whoever might end up reading. :grimacing:

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.