本文整理匯總了Python中invenio.htmlutils.X.setDescription方法的典型用法代碼示例。如果您正苦於以下問題:Python X.setDescription方法的具體用法?Python X.setDescription怎麽用?Python X.setDescription使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類invenio.htmlutils.X
的用法示例。
在下文中一共展示了X.setDescription方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: oai_list_sets
# 需要導入模塊: from invenio.htmlutils import X [as 別名]
# 或者: from invenio.htmlutils.X import setDescription [as 別名]
def oai_list_sets(argd):
"""
Lists available sets for OAI metadata harvesting.
"""
out = ""
# note: no flow control in ListSets
sets = get_all_sets().values()
if not sets:
return oai_error(argd, [("noSetHierarchy", "No sets have been configured for this repository")])
for set_ in sets:
out += " <set>\n"
out += X.setSpec()(set_[0]) + X.setName()(set_[1])
if set_[2]:
out += X.setDescription()(set_[2])
out = out + " </set>\n"
return oai_header(argd, "ListSets") + out + oai_footer("ListSets")