evernote的python客户端包装器
enno的Python项目详细描述
包装evernote的python客户机,使它更 使用方便。
获取访问令牌
转到here并单击获取api 键。
填写Oauth应用程序的信息
在development server上创建帐户
将密钥和机密添加到环境:
$ export ENNO_CONSUMER_KEY=... $ export ENNO_CONSUMER_SECRET=...
创建访问令牌:
$ enno oauth --sandbox
导出沙盒访问令牌:
$ export ENNO_SANDBOX=1 $ export ENNO_SANDBOX_ACCESS_TOKEN=...
当你准备好在你的实时Evernote上使用你的应用时,去 here然后单击激活 API键。
当您的api密钥被激活时,您可以获得一个真正的访问令牌:
$ enno oauth $ export ENNO_SANDBOX=0 $ export ENNO_ACCESS_TOKEN=...
查询注释
fromennoimportNote# get the first 10 notes containing foo in the titleq=Note.query.in_title("foo").limit(10)forninq.get():print(n.title)
创建注释
保存文本:
fromennoimportNoten=Note()n.title="this is the title"n.plain="this is the content"n.save()print(n.guid)
保存HTML:
n=Note()n.title="this is the title"n.html="<p>this is the content</p>"n.save()print(n.guid)
Evernote以一种称为 ENML这是 在.content属性中可用:
n=Note()n.title="this is the title"n.html="<p>this is the content</p>"print(n.content)# the html will have been converted to enml
创建笔记本
fromennoimportNotebooknb=Notebook()nb.name="foo bar"nb.save()print(nb.guid)
安装
使用pip:
$ pip install enno
要获得最新和最棒的:
$ pip install git+https://github.com/jaymon/enno#egg=enno