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
| #init evernote client | |
| def initEvernote(self): | |
| # Real applications authenticate with Evernote using OAuth, but for the | |
| # purpose of exploring the API, you can get a developer token that allows | |
| # you to access your own Evernote account. To get a developer token, visit | |
| # https://sandbox.evernote.com/api/DeveloperToken.action | |
| if self.authToken == "": | |
| self.authToken = input("Please input your dev token: ") | |
| if self.authToken == "": |
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
| from evernote.api.client import EvernoteClient | |
| client = EvernoteClient(token="token", sandbox=False) | |
| def createNewNote(): | |
| noteTemplateGuid = "GUID of note to be copied" | |
| notebookGUID = "GUID of notebook to which the note should be copied" | |
| note = client.get_note_store().copyNote(noteTemplateGuid, notebookGUID) | |
| note.title = "New Note Title" |
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
| def _connect_to_evernote(self, dev_token): | |
| user = None | |
| try: | |
| self.client = EvernoteClient(token=dev_token) | |
| self.user_store = self.client.get_user_store() | |
| user = self.user_store.getUser() | |
| except EDAMUserException as e: | |
| err = e.errorCode | |
| print("Error attempting to authenticate to Evernote: %s - %s" % (EDAMErrorCode._VALUES_TO_NAMES[err], e.parameter)) | |
| return False |
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
| import cgi | |
| import urlparse | |
| tests = [ | |
| 'http://www.evernote.com/about/kb/search?lang=en&q=test', | |
| 'http://www.evernote.com/about/kb/search?q=foo+bar&lang=en', | |
| 'http://www.evernote.com/about/kb/search?lang=en', | |
| 'I AM A FAKE URL', | |
| 'http://www.evernote.com' | |
| ] |
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
| import sys | |
| import re | |
| from enauath import client | |
| from string import Template | |
| #Accepts the GUID(string) of the note you want to append | |
| def appendNote(guid): | |
| #Get the note to be updated using the note's guid http://dev.evernote.com/documentation/reference/NoteStore.html#Fn_NoteStore_getNote |
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
| import clipboard | |
| import sys | |
| import webbrowser | |
| import console | |
| import urllib | |
| print('Parsing URL') | |
| s = (sys.argv[1]) | |
| mytext = clipboard.get() | |
| head, sep, tail = mytext.rpartition('/') |
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
| #!/usr/bin/python | |
| import cgi, cgitb | |
| # Uncomment this to view errors | |
| # cgitb.enable() | |
| import urlparse | |
| import urllib | |
| import sys | |
| import oauth2 as oauth |
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
| #!/usr/bin/env python | |
| # $Id$ | |
| import sys | |
| import hashlib | |
| import time | |
| import copy | |
| from string import Template | |
| import thrift.protocol.TBinaryProtocol as TBinaryProtocol |
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
| #!/usr/bin/python | |
| #search evernote notes keywords in title | |
| import sqlite3 | |
| def main(endbfile, keywords): | |
| conn = sqlite3.connect(endbfile) | |
| cursor = conn.cursor() | |
| sql = """SELECT title, date_created, date_updated, source_url, uid |