Giter Site home page Giter Site logo

evernote-bookmarks's Introduction

evernote-bookmarks

Convert Evernote XML Format (.enx) to the Netscape Bookmark File Format (bookmarks.html).

Usage

usage: evernote-bookmarks [-h] input output

Convert Evernote XML Format (.enx) to the Netscape Bookmark File Format
(bookmarks.html).

positional arguments:
  input       Evernote .enx file to convert
  output      Output bookmarks.html file

optional arguments:
  -h, --help  show this help message and exit

Changelog

Version 1.0.1

  • FIX: Crashes on notes with no source URL.

Version 1.0.0

  • Initial release.

Thanks

Many thanks to:

License

evernote-bookmarks is available under the MIT license. See the LICENSE file for more info.

evernote-bookmarks's People

Contributors

geekarist avatar jbmorley avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

evernote-bookmarks's Issues

xml.etree.ElementTree.ParseError: undefined entity  

Got another one for ya:

Traceback (most recent call last):
  File "./evernote-bookmarks", line 124, in <module>
    main()
  File "./evernote-bookmarks", line 120, in main
    convert(options.input, options.output)
  File "./evernote-bookmarks", line 72, in convert
    en_note = ElementTree.fromstring(content.encode('utf-8'))
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1311, in XML
    parser.feed(text)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1653, in feed
    self._raiseerror(v)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1517, in _raiseerror
    raise err
xml.etree.ElementTree.ParseError: undefined entity &nbsp;: line 4, column 964

The Evernote files I'm trying to import to Pinboard is 300+ MB each (1,000 bookmarks each file), so I'll not upload unless necessary. Suffice it to say, if the Evernote entry has &nbsp in it, the parsing fails.

I found one of the offending Evernote entries and did the following:

grep -i -n

Output: A6grep.log.zip

As you can see, &nbsp; is present. I fixed a few of the Evernote Exported files manually, replacing &nbsp; with a space. This enabled parsing to complete successfully, unless another html encoded character caused problems. Sadly, I have several thousand more bookmarks to export, so doing this manually is a pain in the neck.

Suggestions:

Decode all html entities / escape-characters.

http://stackoverflow.com/questions/628332/decoding-html-entities-with-python
http://stackoverflow.com/questions/11405996/how-can-i-use-python-to-replace-html-escape-characters

My Python is not up to par, so I'll leave the code modifications to you.

Content to description

Sorry if this a stupid question (newbie alert), but I'm wondering if there is a way to pull in the content of the note (under ) to a description field so that the full text can be imported into Pinboard? I'd be very grateful, thanks!

AttributeError: 'NoneType' object has no attribute 'find'

The script worked on about half of my Evernote Exports, the other half had this error:

Traceback (most recent call last):
File "./evernote-bookmarks", line 88, in
main()
File "./evernote-bookmarks", line 85, in main
convert(options.input, options.output)
File "./evernote-bookmarks", line 52, in convert
source_url = note.find('note-attributes').find('source-url')
AttributeError: 'NoneType' object has no attribute 'find'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.