突然之间,我的数百条笔记被分享到了Evernote上。可能是某个第三方产品的故障。我以前没有为Evernote编写过程序。有没有人有一小段可执行代码,用于关闭我所有笔记本中所有笔记的笔记共享?
发布于 2013-06-25 02:19:06
您可以使用search grammar:“findNotes notes:*”共享,然后使用stopSharing接口停止共享笔记。
发布于 2013-06-29 07:04:36
您需要获取每个共享笔记的GUID并调用NoteStore.stopSharingNote(guid)。这是一个未经测试的快速实用的Python解决方案,但应该非常接近您正在寻找的解决方案。请注意,要使用此代码,您需要Python SDK (可通过pip安装)。
import evernote.edam.notestore.ttypes as NoteStoreTypes
from evernote.api.client import EvernoteClient
auth_token = "" # set this to your dev token
useSandbox = True # change to False if you want to access your production account
client = EvernoteClient(token=auth_token, sandbox=True)
note_store = client.get_note_store()
offset = 0
chunkSize = 50
nFilter = NoteStoreTypes.NoteFilter()
nFilter.words = "sharedDate:*"
rSpec = NoteStoreTypes.NotesMetadataResultSpec()
while len(sharedGuids) % chunkSize == 0:
nmd = note_store.findNotesMetaData(nFilter, offset, chunkSize, rSpec)
for n in nmd.notes:
note_store.stopSharingNote(n.guid)
offset += chunkSize如果您在这方面有任何问题,请访问我们的support page并与我们联系,我们将帮助您解决问题。
祝好运!
https://stackoverflow.com/questions/17272415
复制相似问题