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

ENEX import tool ignores line breaks and bullet points #3

Open
CR0CKER opened this issue Feb 26, 2017 · 9 comments
Open

ENEX import tool ignores line breaks and bullet points #3

CR0CKER opened this issue Feb 26, 2017 · 9 comments

Comments

@CR0CKER
Copy link

CR0CKER commented Feb 26, 2017

Importing notes from Evernote ends up removing line breaks, paragraphs and bullet points

@nickAtWybar
Copy link

Just started trying out this tool and am running into the same issue. This is probably a roadblock for quite a few users switching from evernote to standard notes, as I write many notes with many line breaks, paragraphs, and most of all bullet points.

@ElCoyote27
Copy link

ElCoyote27 commented Jun 14, 2017

Same here.. my line breaks are gone. I went to the Slack server of Standard Notes and it seems Evernote creates .enex files that carry HTML. Line breaks are in fact exported this way:
<div>line1</div><div>line2</div>, which the ENEX import tool doesn't like. I'm currently trying to figure an alternate solution..

@ElCoyote27
Copy link

ElCoyote27 commented Jun 14, 2017

Small workaround that works for me on simple text notes:

  1. export your notebook to .enex from EverNote, take a backup copy.
    $ cp -a MyNotebook.enex.orig MyNotebook.enex

  2. Post-process your .enex using 'sed' and change </div><div> AND <br/> to a random string (I'm using WANAFOOBAR)

$ sed -i -e 's@</div><div>@WANAFOOBAR@g' MyNotebook.enex
  1. Process the resulting .enex on https://dashboard.standardnotes.org/tools

  2. Post-process the resulting evernote-to-sn.txt once more to replace WANAFOOBAR with '\n'

$ sed -i -e 's@WANAFOOBAR@\\n@g' evernote-to-sn.txt
  1. Import your Data Archive in Standard Notes.

@nickAtWybar
Copy link

nickAtWybar commented Jul 4, 2017

@ElCoyote27 Thanks for responding back here - your post inspired some work between myself and a friend of mine to create a set of python scripts which convert Evernote notes --> standard notes Plus Editor. We took your code, converted it into Python, and made it for several cases - line breaks, bold, and unordered lists (these were my deal breakers for evernote import).

Flow:
export.enex - convert_before.py - output pre_output.enex.
take pre_output.enex, upload to standard note conversion tool - get evernote-to-sn.txt
run convert_after.py on evernote-to-sn.txt

Consequently, my notes all have html tags in the plain editor, as I write mainly in bullet points (< ul > and < li > tags everywhere)
In the plus editor it is a proper bulleted list.
Another consequence is no real mobile reading, as mobile does not currently support plus editor.

However it's a workable solution for now, so glad I have switched now, so thanks!

@moughxyz
Copy link
Member

moughxyz commented Jul 6, 2017

Hey @nickAtWybar, do you have a link to the Python script?

@ErikBjare
Copy link

I'd like a little more formatting preserved before running the converter tool myself.

Not sure what is working, feel free to check the boxes @mobitar:

  • Paragraphs & linebreaks
  • Lists (ul and ol)
  • Titles (h*)
  • Bold & italics
  • Formatted links

I'm assuming the note format should be Markdown.

Started using SN exclusively in June, just did my ENEX export from Evernote yesterday. Might be interested in fixing what's missing and sending a PR.

@nickAtWybar
Copy link

Hey guys, I've been meaning to post those files, thanks for the prod @mobitar and @ErikBjare .

Erik, you can edit the 2 py files to correctly convert. Please note that this is for the Plus Editor of Standard Notes, not the simple editor.

Rough process:

  • export .enex. Must do each notebook on itself to get tagging right
  • change convert_before.py to accept the right incoming file
  • make sure .enex is in same folder as .py files
  • run convert_before.py
    • if it errors out because of charmap, go look in binary viewer to see where the offending hexadecimal pattern is (in enex file)
    • in sublime, replace that character with the correct one and save
    • certain characters are really finnicky!
  • take pre_output.enex and put in stdtool (standard notes enex converter online)
    • (output is evernote-sn.txt in same folder)
  • run convert_after.py

I'm a bit new to this, so hopefully this works for you guys:
https://gist.github.com/nickAtWybar/d7129b379d15d6d7b89b9c12a00a1e7e

@ErikBjare
Copy link

@nickAtWybar Thanks for the script!

I will take a look but would prefer to see the "official" converter improve before resorting to non-userfriendly hacks.

@moughxyz
Copy link
Member

I think an Evernote to Markdown converter might be a good tool to add to this toolchain. Currently the converter only preserves newlines and paragraphs since the default editor is plaintext, and things like bold and italics can't be properly expressed.

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

5 participants