Concatenate String to Evernote Markup Language (ENML) in python
- by Adam the Mediocre
I am looking to add a string containing the user's text input to the note.content of my note. After reading, I have found how to add resources, but I don't want the resource to be an attachment, I want it to be the actual text.
Here is some of the code:
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
Any advice would be great, as I'm just starting out with this api and it looks like it's full of potential once I figure it out! Here is what I have been mostly reading from: http://dev.evernote.com/documentation/cloud/chapters/ENML.php