本文整理汇总了Python中sefaria.model.schema.JaggedArrayNode.toc_zoom方法的典型用法代码示例。如果您正苦于以下问题:Python JaggedArrayNode.toc_zoom方法的具体用法?Python JaggedArrayNode.toc_zoom怎么用?Python JaggedArrayNode.toc_zoom使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sefaria.model.schema.JaggedArrayNode
的用法示例。
在下文中一共展示了JaggedArrayNode.toc_zoom方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: create_commentary_node
# 需要导入模块: from sefaria.model.schema import JaggedArrayNode [as 别名]
# 或者: from sefaria.model.schema.JaggedArrayNode import toc_zoom [as 别名]
def create_commentary_node():
commentary = JaggedArrayNode()
commentary.default = True
commentary.key = 'default'
commentary.depth = 3
commentary.addressTypes = ["Integer", "Integer", "Integer"]
commentary.sectionNames = ["Perek", "Pasuk", "Comment"]
commentary.toc_zoom = 2
return commentary
示例2: post_simple_commentaries
# 需要导入模块: from sefaria.model.schema import JaggedArrayNode [as 别名]
# 或者: from sefaria.model.schema.JaggedArrayNode import toc_zoom [as 别名]
def post_simple_commentaries():
ramban_node, rasag_node = JaggedArrayNode(), JaggedArrayNode()
ramban_text = parse_general('yitzira_ramban.txt')
rasag_text = parse_general('yitzira_rasag.txt')
ramban_node.add_title("Ramban on Sefer Yetzirah", 'en', primary=True)
ramban_node.add_title(u'רמב"ן על ספר יצירה', 'he', primary=True)
ramban_node.key = "Ramban on Sefer Yetzirah"
ramban_node.addressTypes = ['Integer', 'Integer', 'Integer']
ramban_node.sectionNames = ["Chapter", "Mishnah", "Comment"]
ramban_node.toc_zoom = 2
ramban_node.depth = 3
ramban_node.validate()
rasag_node.add_title("Rasag on Sefer Yetzirah", 'en', primary=True)
rasag_node.add_title(u'רס"ג על ספר יצירה', 'he', primary=True)
rasag_node.key = "Rasag on Sefer Yetzirah"
rasag_node.addressTypes = ['Integer', 'Integer', 'Integer']
rasag_node.sectionNames = ["Chapter", "Mishnah", "Comment"]
rasag_node.toc_zoom = 2
rasag_node.depth = 3
rasag_node.validate()
ramban_index = {
"title": "Ramban on Sefer Yetzirah",
"categories": ["Commentary2", "Kabbalah", "Ramban"],
"language": "he",
"schema": ramban_node.serialize()
}
post_index(ramban_index)
post_text("Ramban on Sefer Yetzirah", {
'versionTitle': 'Ramban on Sefer Yetzirah, Warsaw 1884',
'versionSource': 'http://primo.nli.org.il/primo_library/libweb/action/dlDisplay.do?vid=NLI&docId=NNL_ALEPH001310968',
'language': 'he',
'text': ramban_text
})
rasag_index = {
"title": "Rasag on Sefer Yetzirah",
"categories": ["Commentary2", "Kabbalah", "Rasag"],
"language": "he",
"schema": rasag_node.serialize()
}
post_index(rasag_index)
post_text("Rasag on Sefer Yetzirah", {
'versionTitle': 'Rasage on Sefer Yetzirah, Warsaw 1884',
'versionSource': 'http://primo.nli.org.il/primo_library/libweb/action/dlDisplay.do?vid=NLI&docId=NNL_ALEPH001310968',
'language': 'he',
'text': rasag_text
})
links = linker(ramban_text, "Ramban on Sefer Yetzirah")
links.extend(linker(rasag_text, "Rasag on Sefer Yetzirah"))
post_link(links)
示例3: create_book_ja_node
# 需要导入模块: from sefaria.model.schema import JaggedArrayNode [as 别名]
# 或者: from sefaria.model.schema.JaggedArrayNode import toc_zoom [as 别名]
def create_book_ja_node(english_book_name, hebrew_book_name):
en_name = english_book_name[0]
he_name = hebrew_book_name[0]
book_node = JaggedArrayNode()
book_node.key = en_name
book_node.add_title(en_name, 'en', primary=True)
book_node.add_title(he_name, 'he', primary=True)
book_node.depth = 3
book_node.addressTypes = ["Integer", "Integer", "Integer"]
book_node.sectionNames = ["Chapter", "Verse", "Comment"]
book_node.toc_zoom = 2
return book_node