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

Evernote import? #332

Closed
michael-rowe opened this Issue Sep 19, 2016 · 44 comments

Comments

Projects
None yet
5 participants
@michael-rowe

michael-rowe commented Sep 19, 2016

Hi there

Is there any plan to add the option to import Evernote (enex) files? I have about 750 notes in Evernote and am really reluctant to add them all to QownNotes manually.

Regards,
Michael

@pbek

This comment has been minimized.

Owner

pbek commented Sep 19, 2016

Is there a specification for that format? Isn't it possible to export plain text files in Evernote? If not, maybe there already is a 3rd party tool for exporting notes from Evernote.

@michael-rowe

This comment has been minimized.

michael-rowe commented Sep 19, 2016

From what I can tell, Evernote will export to HTML and enex but not to plain text, which is one of the reasons that I wanted to move away from Evernote. enex is an XML file that is described in the file I've attached here
evernote-export3.txt. There is more here: https://blog.evernote.com/tech/2013/08/08/evernote-export-format-enex/.

I played around with exporting an enex file from Evernote and then importing it to OneNote, which actually worked quite well but I decided that I didn't really like OneNote either. Either way, OneNote doesn't export to plain text either.

I found this php script (https://github.com/panicsteve/enex-dump) that takes the enex file and converts it to folders with plain text files. But I have no idea how this works. I can't find any other services that seem able to do something with the enex files.

Sorry if this is not very helpful. I appreciate your time.

@pbek

This comment has been minimized.

@michael-rowe

This comment has been minimized.

michael-rowe commented Sep 19, 2016

Thanks for that. The tools are a bit above my technical level of expertise but I'll see how far I can get with the suggestions you made. Also, once the Evernote notes are in markdown format, how do I get them into QownNotes in bulk? Can I just place the markdown files into the folder I use for QownNotes files?

@pbek

This comment has been minimized.

Owner

pbek commented Sep 19, 2016

Exactly. The notes are just simple markdown files in a folder. By default the headline will be used as filename (ownCloud notes convention), but you can tell QOwnNotes in the settings that you want different filenames from the headline.

@pbek

This comment has been minimized.

Owner

pbek commented Sep 19, 2016

Be sure to let us know how your Evernote import worked out. Maybe you even want to write a how to on https://github.com/pbek/QOwnNotes/wiki.

@pbek pbek closed this Sep 19, 2016

@pbek

This comment has been minimized.

Owner

pbek commented Sep 20, 2016

@michael-rowe could you please export me some notes from your Evernote desktop app (maybe also a note with an image), so I can have a proper look at the format... maybe I really write an importer ;)
As far as I could see it you need the desktop app to export notes...

@michael-rowe

This comment has been minimized.

michael-rowe commented Sep 20, 2016

No problem. I have a machine that I dual boot Ubuntu / Windows. I'll install the evernote client for Windows (no Linux client) and export you a variety of notes. I use the web app on laptops and until recently the mobile app. You can only export from the desktop app. I'll share the exported notes here when it's done. Thanks very much.

@pbek

This comment has been minimized.

Owner

pbek commented Sep 21, 2016

16.09.12

  • first alpha version of the Evernote note import
    • export an enex file (export notes) from your Evernote desktop client
    • click Import / Import notes from Evernote in the QOwnNotes main menu
    • please give feedback on how it worked out

There now is a new release, could you please test it and report if the new features work for you?

@pbek

This comment has been minimized.

Owner

pbek commented Sep 21, 2016

You might need to reload your note folder manually after importing.

@pbek pbek reopened this Sep 21, 2016

@pbek pbek added this to the 16.09.12 milestone Sep 21, 2016

@pbek pbek added enhancement and removed question labels Sep 21, 2016

@michael-rowe

This comment has been minimized.

michael-rowe commented Sep 21, 2016

OK. Installed the new version and the import option reported that it was successful. Initially there were no changes to my list of notes. I opened the Settings dialog and couldn't find any option to manually reload the note folder. When I closed Settings by clicking OK, the new note appeared in the list. I thought I had done something else so I deleted the note, imported it again (no note in the list), opened Settings, and just clicked OK. The new note appeared. Does that sound right?

Then I tried importing a folder with an image. The text appeared perfectly but the image wasn't there.

Then I imported a large, complex note with hyperlinks and images, which had originally been typed in markdown...everything worked perfectly, except for the embedded images. All the links were there. There were some issues with formatting but that was probably due to how I wrote the markdown.

I have to say, this is awesome. Even if you do nothing else with this, this is going to make a huge difference for me. I'm going to begin moving all my stuff from Evernote to QownNotes seriously now. Thank you very much. If you do decide to keep working on it (e.g. import whole Evernote folders) that would be amazing, but like I said, this is already fantastic.

@michael-rowe

This comment has been minimized.

michael-rowe commented Sep 21, 2016

I tried to upload an enex file with an image embedded but GitHub doesn't support it the enex extension. Can I email it to you (if you still want it)?

@pbek

This comment has been minimized.

Owner

pbek commented Sep 21, 2016

I opened the Settings dialog and couldn't find any option to manually reload the note folder.

It's in the note menu of the main menu.

The text appeared perfectly but the image wasn't there.

Image are still on my todo list, will take a while...

import whole Evernote folders

As I now see the export format there are no folders, just a list of notes...

Can I email it to you (if you still want it)?

Yes, please email them. I still need some examples. Thanks a lot!

@michael-rowe

This comment has been minimized.

michael-rowe commented Sep 21, 2016

Evernote exports folders as HTML, and individual notes as enex. Should I
export a folder as well, or do you want to wait with that?

Here are three notes that I exported:

  • simple text
  • simple image
  • large, relatively complex with hyperlinks and images

Let me know if you need more examples. I can also do more testing if
necessary.

Thanks again.

On Wed, 21 Sep 2016 at 20:44 Patrizio Bekerle notifications@github.com
wrote:

I opened the Settings dialog and couldn't find any option to manually
reload the note folder.

It's in the note menu of the main menu.

The text appeared perfectly but the image wasn't there.

Image are still on my todo list, will take a while...

import whole Evernote folders

As I now see the export format there are no folders, just a list of
notes...

Can I email it to you (if you still want it)?

Yes, please email them. I still need some examples. Thanks a lot!


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#332 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AFbRpJOAP-mbUc0CN-iSrfYMwQbOMOk5ks5qsXsngaJpZM4KA3bg
.

Dr Michael Rowe
Senior Lecturer
Department of Physiotherapy
Faculty of Community and Health Sciences
University of the Western Cape
blog http://www.mrowe.co.za/blog/ | research
http://www.mrowe.co.za/blog/research-profile/ | twitter
http://twitter.com/michael_rowe

@pbek

This comment has been minimized.

Owner

pbek commented Sep 21, 2016

The exported html files, with separate folders for images and so on would be a mess to import. We'll have to stick with the enex import where all the meta data is still intact.

Did you already send me a file? Because I didn't get one yet...

@pbek

This comment has been minimized.

Owner

pbek commented Sep 22, 2016

@michael-rowe Thank you for your exports, did you always export single notes on purpose? Because you can select multiple notes and export them too... Do you also have notes where you did more formatting?

@pbek

This comment has been minimized.

Owner

pbek commented Sep 22, 2016

16.09.13

  • more Evernote note import features
    • the note folder is now reloaded when closing the import dialog
      if notes were imported
    • you can now also import the images of your notes
    • some line break improvements were made

There now is a new release, could you please test it and report if the new features work for you?

@pbek pbek added this to the 16.09.13 milestone Sep 22, 2016

@jd666

This comment has been minimized.

jd666 commented Sep 22, 2016

  • The images work well and the line breaks seem to work mostly.
  • I have some lists that are breaking - I can see in the editor that the empty line above the list items is missing, causing the renderer to not see it as a list.
  • Verbatim text/source code is not recognized.
  • Evernote had a notion of calendars.. I don't know how these are stored and how to render them - possibly try to convert to a table (?)

Thanks for this 👍 I almost forgot that I still had some old note backups lying around. 👍 👍

@michael-rowe

This comment has been minimized.

michael-rowe commented Sep 22, 2016

I'm not sure that Evernote really has a calendar system, but it does have reminders (so I suppose that needs a calendar). You could set up reminders so that certain notes would be "surfaced" on the due date.

@pbek

This comment has been minimized.

Owner

pbek commented Sep 22, 2016

@jd666 images need one fix where it didn't import for me, lists are very tricky, can you please send me a note with verbatim text / source and a calendar (if that really exists), so I can take a look at it?

@pbek

This comment has been minimized.

Owner

pbek commented Sep 24, 2016

16.09.14

  • more Evernote note import features
    • some instances where images weren't detected were fixed
    • images that are not used in the note text can now also be imported
    • code block import

There now is a new release, could you please test it and report if the new features work for you?

@pbek pbek modified the milestones: 16.09.14, 16.09.13 Sep 24, 2016

@MathiasRenner

This comment has been minimized.

MathiasRenner commented Sep 25, 2016

I wrote a small tool that exports notes from Evernote's enex file to simple markdown files – independently of the app that you wanna use aftewards to organize the notes. https://github.com/MathiasRenner/evernote_to_markdown

I use QOwnNotes as well and love it. Thank you @pbek for this first viable Evernote alternative!

@pbek

This comment has been minimized.

Owner

pbek commented Sep 26, 2016

I use QOwnNotes as well and love it. Thank you @pbek for this first viable Evernote alternative!

Thank you for your kind words, @MathiasRenner!

https://github.com/MathiasRenner/evernote_to_markdown

Thanks! Seems to do about the same things I was doing in QOwnNotes, or am I missing something?

@MathiasRenner

This comment has been minimized.

MathiasRenner commented Sep 26, 2016

@pbek You definitely deserve these kind words, esp. because you're doing the most work for this project by far.

Yeah, I think my project solves the same problem as your implementation, but I did not look into the import features in detail that you implemented. From the discussion above it seems that you already have a richer features set than my tool. And I like if this functionality is built into QOwnNotes directly.

I just wanted to make sure that this project is mentioned in this related discussion, it might help someone or inspire and by that reduce your dev effort.

@pbek

This comment has been minimized.

Owner

pbek commented Sep 26, 2016

Thank you, @MathiasRenner!

Currently missing in QOwnNotes's implementation are nested lists, like:

  • level 1
    • level 2

...and making sure html inside code-blocks doesn't get converted to markdown.
From what I could see from your implementation you're not currently addressing that neither.

@MathiasRenner

This comment has been minimized.

MathiasRenner commented Sep 26, 2016

@pbek You're right, I don't address this...

@msbentley

This comment has been minimized.

msbentley commented Sep 27, 2016

I'm just testing this with my (large, ~2GB) .enex file. Once I select the file, I have a progress bar bouncing back and forth on my screen, but no new files have yet been created in the Notes directory - does the initial parse take some time? Also the OK button is still available, and if I click this the import window closes, with no notes imported...

@pbek

This comment has been minimized.

Owner

pbek commented Sep 27, 2016

@msbentley, thank you for your report. To be frank I have no idea how Qt's XML parser will react on such big files. I guess the whole process might take more memory than available. Could you please try to import smaller files?

@msbentley

This comment has been minimized.

msbentley commented Sep 27, 2016

OK, I tested on a ~150MB file. This time the progress bar correctly counts all of the notes, and the media directly is populated with image files. But no notes are generated, even when I refresh...

@pbek

This comment has been minimized.

Owner

pbek commented Sep 27, 2016

What happens if you restart QOwnNotes?

@pbek

This comment has been minimized.

Owner

pbek commented Sep 27, 2016

And can you please post the output from the debug settings so I can take a look at your configuration.

@msbentley

This comment has been minimized.

msbentley commented Sep 27, 2016

Thanks for your fast feedback! Restarting doesn't help, debug info is attached...
QOwnNotes Debug Information.txt

@msbentley

This comment has been minimized.

msbentley commented Sep 27, 2016

FYI, I also tried importing but deselecting "Import images". Again, the import seemed to work, but no new files were created, and the database file is untouched.

@pbek

This comment has been minimized.

Owner

pbek commented Sep 27, 2016

I can't see anything out of order in your config. Could you please try to import just a few (non-sensitive) notes and if the import fails send me the enex file, so that can take a look at it?

@msbentley

This comment has been minimized.

msbentley commented Sep 27, 2016

Sure, here is a sample with just 4 notes - it shows the same behaviour - the media folder is created, and images added, but no notes are added...
maya_4notes.enex.zip

@pbek

This comment has been minimized.

Owner

pbek commented Sep 27, 2016

The enex file imported flawlessly for me:

  • Places to go staycampswimetc. not too far away
  • Pitsche, patsche
  • Meine Hände sind verschwunden - Kinderlieder und Singspiele | Labbé Verlag
  • Kites

These four notes were generated...
Do you get any log messages when importing if you turn on the log dialog in the Windows-menu?

@msbentley

This comment has been minimized.

msbentley commented Sep 27, 2016

Interestingly it works perfectly on my laptop, but not my desktop. I'll get back to you with the log info when I'm back at my work machine again next week - thanks for looking into it!

@pbek

This comment has been minimized.

Owner

pbek commented Sep 27, 2016

No problem. Maybe you have no write permissions to the notes folder? (...would be a bit strange since you can write to the media folder in it)

Just report back when you have more information.

@pbek pbek closed this Sep 27, 2016

@michael-rowe

This comment has been minimized.

michael-rowe commented Sep 29, 2016

Just a quick update from my side. I'm importing folders of notes that I exported from Evernote into single enex files. The notes are imported almost perfectly into QownNotes, including images, lists and links.

Thanks again for adding this feature. Awesome stuff.

@pbek

This comment has been minimized.

Owner

pbek commented Sep 29, 2016

Great to hear, @michael-rowe. Thank you for your feedback!

@msbentley

This comment has been minimized.

msbentley commented Dec 28, 2016

Hi @pbek - I just tried this again today (latest version) and Evernote import now doesn't work on either of my machines. I checked the log, and for each note in my .enex file I see to get a line in the log:

[19:55:41] [critical] "Is a directory"

Does this give any hints as to the problem?

@pbek

This comment has been minimized.

Owner

pbek commented Dec 28, 2016

Sorry, I've no idea. The text Is a directory isn't event in the source code of QOwnNotes.
The only critical error message you can get in the Evernote dialog is when the enex file is opened.

            QFile file(fileName);

            if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
                qCritical() << file.errorString();
                return;
            }

Are you sure you selected the file correctly?

@pbek

This comment has been minimized.

Owner

pbek commented Dec 28, 2016

And can you copy the text from the file name line edit in the dialog and post it here?

@msbentley

This comment has been minimized.

msbentley commented Dec 28, 2016

OK, when I zapped all my settings and started afresh, it works OK on my laptop at least - sorry for the bother!

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