Created
June 25, 2013 08:09
-
-
Save muzizongheng/5856812 to your computer and use it in GitHub Desktop.
use evernote api to get every note(include: tilte, content, resource)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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