BoostIO / ever2boost

https://rubygems.org/gems/ever2boost
MIT License
63 stars 13 forks source link

convert error #14

Closed foxmask closed 5 years ago

foxmask commented 6 years ago

When running ever2boost on debian 9.4 :

ever2boost convert --directory=$PWD Evernote.enex 
converting...
/usr/lib/ruby/2.3.0/rexml/parsers/baseparser.rb:362:in `pull_event': Declarations can only occur in the doctype declaration. (REXML::ParseException)
Line: 1
Position: 306
Last 80 unconsumed characters:
<!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd"><en-note><div><a
    from /usr/lib/ruby/2.3.0/rexml/parsers/baseparser.rb:185:in `pull'
    from /usr/lib/ruby/2.3.0/rexml/parsers/treeparser.rb:23:in `parse'
    from /usr/lib/ruby/2.3.0/rexml/document.rb:288:in `build'
    from /usr/lib/ruby/2.3.0/rexml/document.rb:45:in `initialize'
    from /var/lib/gems/2.3.0/gems/ever2boost-0.1.5/lib/ever2boost/md_converter.rb:15:in `new'
    from /var/lib/gems/2.3.0/gems/ever2boost-0.1.5/lib/ever2boost/md_converter.rb:15:in `convert'
    from /var/lib/gems/2.3.0/gems/ever2boost-0.1.5/lib/ever2boost/note.rb:9:in `initialize'
    from /var/lib/gems/2.3.0/gems/ever2boost-0.1.5/lib/ever2boost/enex_converter.rb:30:in `new'
    from /var/lib/gems/2.3.0/gems/ever2boost-0.1.5/lib/ever2boost/enex_converter.rb:30:in `block in parse_plural_notes'
    from /usr/lib/ruby/2.3.0/rexml/parent.rb:40:in `each'
    from /usr/lib/ruby/2.3.0/rexml/parent.rb:40:in `each'
    from /var/lib/gems/2.3.0/gems/ever2boost-0.1.5/lib/ever2boost/enex_converter.rb:27:in `map'
    from /var/lib/gems/2.3.0/gems/ever2boost-0.1.5/lib/ever2boost/enex_converter.rb:27:in `parse_plural_notes'
    from /var/lib/gems/2.3.0/gems/ever2boost-0.1.5/lib/ever2boost/enex_converter.rb:9:in `convert'
    from /var/lib/gems/2.3.0/gems/ever2boost-0.1.5/lib/ever2boost/cli.rb:26:in `convert'
    from /var/lib/gems/2.3.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
    from /var/lib/gems/2.3.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
    from /var/lib/gems/2.3.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
    from /var/lib/gems/2.3.0/gems/thor-0.20.0/lib/thor/base.rb:466:in `start'
    from /var/lib/gems/2.3.0/gems/ever2boost-0.1.5/exe/ever2boost:4:in `<top (required)>'
    from /usr/local/bin/ever2boost:22:in `load'
    from /usr/local/bin/ever2boost:22:in `<main>'

the ever2boost import can't work as there is no more allowed developer tokens

My Evernote.enex size is 600Mo

muhammad-saleh commented 6 years ago

I'm trying to import my notes as well and yes there's no more developer tokens available But you could create one on the sandbox environment: https://sandbox.evernote.com/ https://sandbox.evernote.com/api/DeveloperToken.action

And then import your notes there (by changing to the sandbox environment for Evernote app)

And then change the Evernote host here to point to sandbox.evernote.com instead of the production one

Then run ./bin/ever2boost import again

I see the API limit reached message so I'm going to try tomorrow :( to see if it will work or not

Update: I was able to do it 👍 I had to change the code a bit to reference the sandbox environment (all of the requires were referencing the installed gem and not the local files which I changed)

But to be honest the result is not that good :)

In the next few days I will work on a solution (a local one so no need of API or anything) to import a combination of HTML and ENEX into Boostnote (Images should be included)

But my concern is that the imported HTML will work only for reading and not editing the notes but this will work at least for me since I just want a reference to my old notes and I don't need to edit them anymore

muhammad-saleh commented 6 years ago

I've created a new tool to import HTML notes into Boostnote Please let me know what you think: https://github.com/muhammad-saleh/evernote2boostnote

foxmask commented 5 years ago

i've left boostio