0
我正在尋找將包含用戶文本輸入的字符串添加到筆記的note.content中。閱讀後,我發現如何添加資源,但我不希望資源成爲附件,我希望它成爲實際的文本。將字符串連接到Python中的印象筆記標記語言(ENML)
下面是一些代碼:
title= self.textEditTitle.text()
body= self.textEditBody.text()
auth_token = "secret stuff!"
client = EvernoteClient(token=auth_token, sandbox=True)
note_store = client.get_note_store()
nBody = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
nBody += "<!DOCTYPE en-note SYSTEM \"http://xml.evernote.com/pub/enml2.dtd\">"
nBody += "<en-note>%s</en-note>" % body
note = Types.Note()
note.title = title
note.content= nBody
任何意見將是巨大的,因爲我剛剛開始使用這個API,它看起來就像是充滿潛力,一旦我看着辦吧!這裏是我一直主要閱讀:http://dev.evernote.com/documentation/cloud/chapters/ENML.php