Skip to content

Instantly share code, notes, and snippets.

@bamanzi bamanzi/gist:3121820
Created Jul 16, 2012

Embed
What would you like to do?
Extract notes' title & url from Evernote exported file (*.enex)
from lxml import etree
def enex_list_notes_info(enex_file_name):
f = file(enex_file_name, "r")
enex = etree.parse(f)
notes = enex.xpath("//note")
for note in notes:
title = url = ""
etitle = note.xpath("title")
if len(etitle)>0:
title = etitle[0].text
eurl = note.xpath("note-attributes/source-url")
if len(eurl)>0:
url = eurl[0].text
print(" - [[%(url)s][%(title)s]]" % locals())
enex_list_notes_info("emacs-2evernote.enex")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.