Skip to content

Instantly share code, notes, and snippets.

@muzizongheng
Created June 25, 2013 08:09
Show Gist options
  • Save muzizongheng/5856812 to your computer and use it in GitHub Desktop.
Save muzizongheng/5856812 to your computer and use it in GitHub Desktop.
use evernote api to get every note(include: tilte, content, resource)
# List all of the notebooks in the user's account
notebooks = noteStore.listNotebooks(authToken)
print("Found ", len(notebooks), " notebooks:")
for notebook in notebooks:
print(" * ", notebook.name)
filter = NoteStore.NoteFilter()
filter.notebookGuid = notebook.guid
noteList = noteStore.findNotes(authToken, filter, 0, 50)
#print noteList
for n in noteList.notes:
print(n.title)
print("content is: ", noteStore.getNoteContent(authToken, n.guid))
print("content length is: ", n.contentLength)
try:
for tag in n.tagNames:
print("tag name is: ", tag)
except Exception as err:
print(err)
try:
for res in n.resources:
print("width is: ", res.width)
print("height is: ", res.height)
except Exception as e:
print(e)
finally:
pass
print()
print()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment