当前位置: 首页>>代码示例>>Python>>正文


Python Note.create_note方法代码示例

本文整理汇总了Python中note.Note.create_note方法的典型用法代码示例。如果您正苦于以下问题:Python Note.create_note方法的具体用法?Python Note.create_note怎么用?Python Note.create_note使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在note.Note的用法示例。


在下文中一共展示了Note.create_note方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1:

# 需要导入模块: from note import Note [as 别名]
# 或者: from note.Note import create_note [as 别名]
# Now, add the new Resource to the note's list of resources
note.resources = [resource]

# To display the Resource as part of the note's content, include an <en-media>
# tag in the note's ENML content. The en-media tag identifies the corresponding
# Resource using the MD5 hash.
hash_hex = binascii.hexlify(hash)
hash_str = hash_hex.decode("UTF-8")

# The content of an Evernote note is represented using Evernote Markup Language
# (ENML). The full ENML specification can be found in the Evernote API Overview
# at http://dev.evernote.com/documentation/cloud/chapters/ENML.php
# Sample note content
# note.content = '<?xml version="1.0" encoding="UTF-8"?>'
# note.content += '<!DOCTYPE en-note SYSTEM ' \
#                 '"http://xml.evernote.com/pub/enml2.dtd">'
# note.content += '<en-note>Here is the Evernote logo:<br/>'
# note.content += '<en-media type="image/png" hash="{}"/>'.format(hash_str)
# note.content += '</en-note>'

note.content = notes.set_xml_header('Hello Evernote')

# Finally, send the new note to Evernote using the createNote method
# The new Note object that is returned will contain server-generated
# attributes such as the new note's unique GUID.
# created_note = note_store.createNote(note)
created_note = notes.create_note(note_store, note)

print("Successfully created a new note with GUID: ", created_note.guid)
开发者ID:raghavan-rahul,项目名称:evernote-integration-python,代码行数:31,代码来源:main.py


注:本文中的note.Note.create_note方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。