Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate from OneNote to Trilium #1013

Closed
DimitriyPro opened this issue May 12, 2020 · 17 comments
Closed

Migrate from OneNote to Trilium #1013

DimitriyPro opened this issue May 12, 2020 · 17 comments

Comments

@DimitriyPro
Copy link

DimitriyPro commented May 12, 2020

So... There is a question - how to do it?
There is a similar program with this feature: https://github.com/laurent22/joplin
Did you know a way to migrate on Trilium?

@zadam
Copy link
Owner

zadam commented May 12, 2020

There isn't any specific OneNote import.

Trilium supports importing (zipped) directory structure with HTML/Markdown files with images etc. But I don't know if OneNote can export such directory structure.

@DimitriyPro
Copy link
Author

DimitriyPro commented May 12, 2020

Thank you @zadam
But I think there is a way to use already done solution:
https://github.com/laurent22/joplin/blob/e399474b4e2e2dffc625a0414232031ed290b81c/ReactNativeClient/lib/import-enex-md-gen.js
https://github.com/laurent22/joplin/blob/e399474b4e2e2dffc625a0414232031ed290b81c/ReactNativeClient/lib/import-enex.js
Import from Evernote (Evernote can import from many other programs for note taking). We have solution for Evernote but do you know how to integrate it to Trilium? I have some skills in web-programming but not in so complecated projects. Thank you!

@zadam
Copy link
Owner

zadam commented May 12, 2020

ENEX is already supported as an import format so if you have ENEX, just use import dialog ...

@DimitriyPro
Copy link
Author

Wow! Brilliant!
But I can't find Import page on https://github.com/zadam/trilium/wiki

@zadam
Copy link
Owner

zadam commented May 12, 2020

Just right click on a note where you want to import the ENEX:

 

@meichthys
Copy link
Collaborator

meichthys commented May 15, 2020

@DimitriyPro There is this script as well. I used a slightly modified version of it a few months ago to migrate from Onenote to Trilium. Three were a few side-effects, but nothing that couldn't be cleaned up once imported into Trilium.

@DimitriyPro
Copy link
Author

@meichthys thank you! It's very useful script!

@meichthys
Copy link
Collaborator

@DimitriyPro If the above links helped, could you mark this issue as resolved?

@tejasvi
Copy link

tejasvi commented Jun 20, 2020

After trying multiple methods, I can attest to the superior conversion using Evernote's .enex as the intermediary. I had reasonably complex note structures, and the translation has been much better than I could expect.

@yllekz
Copy link

yllekz commented Feb 5, 2021

Putting in a +1 for looking into a cleaner way to import OneNote content. I've been manually migrating pages, but it very quickly became clear that it would be cumbersome; a lot of formatting either gets changed or doesn't paste in correctly.

OneNote on the desktop has a decent amount of export options, including the .mht format which is html-adjacent. Perhaps an import utility can be leveraged by that?

@meichthys
Copy link
Collaborator

@yllekz If you're willing to put in a bit of work, this script should help out significantly. I used it with some modifications to export Onenote to HTML and then import into Trilium.

@meichthys
Copy link
Collaborator

meichthys commented May 2, 2023

To follow up here, I've done migrations from Onenote to Trilium a few times now and the best method (by a considerable margin) is to first export Onenote to Legacy Evernote. Here's the steps:

Migration Notes

Prep Onenote notes for best compatibility:

  • Remove Onenote Tags and replace with Emoji if possible (Onenote Tags will get imported into trilium as an image which clutters the Trilium tree somewhat)
  • Make sure to use Onenote headings where applicable (These will be carried over correctly into Trilium)
  • Remove extra whitespace in Onenote (Whitespace seems to be more noticible in Trilium, so removing it now will make it look nicer in trilium)
  • If possible, try to avoid very long Onenote pages. Trilium works best with shorter concise pages with any number of sub or (sub-sub...) pages.
  • Make sure numbered lists don't have unusual spaces between items in the list (Sometimes the numbered list will be start at 1 again in Trilum if there is an extra space in the list in OneNote.

Migration Procedure

Import into Evernote from OneNote:

  • Install Evernote Legacy. Current versions of Evernote do not have this functionality. (Requires Evernote account, but import works without internet connection - be sure to NOT sync notes to Evernote!).
  • In evernote navigate to File > Import > Onenote > Notebook > Section > OK

If exporting all sections at a time, they will not be grouped in folders - they will all be added to a single folder, but the order will be kept, so you can re-group into folders after importing to Trilium

Export from Evernote

  • Right click on the created notebook in Evernote and choose "Export Notes…"
  • Use the default export format of .enex

Cleanup enex file (optional)

If the Onenote header (that is at the top of each Onenote page) is not desired, you can use the following regex to remove them in a text editor like VsCode:

  • Find: .<div.><h1
  • Replace with: <h1

Import into Trilium

  • In Trilium, right click on the root node and choose Import (all default options should be fine).
  • Select the .enex file exported from Evernote
  • Be patient. Large .enex files may take a few minutes to process
  • Repeat import for each .enex file

Other importing notes:

  • Centered text in Onenote will be left-justified after importing into Trilium
  • Internal onenote links will obviously be broken, but the link still exists so you can do a search in Trilium to find all onenote:// links and then re-link to the proper Trilium page (there is no way to link to a paragraph in trilium, so it's good to keep trilium pages short so links point to a small chunk of information instead of a massive note)
  • Text colors, highlights, and formatting generally carries over well
  • Revision history will be lost, but any new revisions will be tracked in Trilium
  • The structure of notes are not maintained exactly, so if you had sub-notes in Onenote, you may have to re-arrange the notes accordingly (This is easy since the order of the notes is preserved).
  • Evernote tags are created for each "section" in OneNote and these tags are carried over to Trilium as attributes
    • If the tags are not desired, you can turn them off in the Evernote export options.
  • If the "Created with OneNote" text is not desired, do a find/replace in the enex files before importing to Trilium
  • Some links will be disabled (not clickable) when importing from enex.
  • Files, screenshots, and attachments are all preserved (This is the only one-note export option that seems to preserve all of these).

@meichthys
Copy link
Collaborator

@zadam I'm not sure if it would be helpful or not, but the above steps may be worth including in the Wiki?
https://github.com/zadam/trilium/wiki/Evernote-import

@zadam
Copy link
Owner

zadam commented May 3, 2023

I've added the content, also added you as a collaborator, so you can update the wiki if you wish. Feel free to make changes, I've just pasted it there.

@Beexx
Copy link

Beexx commented Jun 8, 2023

Hello,
The link to download Evernote Legacy no longer exists. The page may have been deleted by Evernote.
I was able to download the Evernote Legacy installer though, by fetching a cached version on https://web.archive.org.
You might want to try the same, until Evernote decides to publish it again...
https://web.archive.org/web/20230327110646/https://help.evernote.com/hc/en-us/articles/360052560314
Cheers,

@meichthys
Copy link
Collaborator

Thanks for reporting.
Don't count on Evernote publishing it again! I'll add the web archive link to the wiki.

@swissbuechi
Copy link

Windows:
https://cdn1.evernote.com/win6/public/Evernote_6.25.3.9348.exe

Mac:
https://cdn1.evernote.com/mac-smd/public/EvernoteLegacy_RELEASE_7.14.1_458325.zip

Check sum (md5):
6f77a09b933ad0b895b10fad137dcee1 *Evernote_6.25.3.9348.exe
5feefa52d54ac6ef09bd9017814a17dd *EvernoteLegacy_RELEASE_7.14.1_458325.zip

The web page:
https://web.archive.org/web/20230326100256/https://help.evernote.com/hc/en-us/articles/360052560314-Install-an-older-version-of-Evernote

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants