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