コード例 #1
0
ファイル: export.py プロジェクト: ngocthanhit/Sefaria-Project
def export_toc():
    """
	Exports the TOC to a JSON file.
	"""
    toc = get_toc()
    with open(SEFARIA_EXPORT_PATH + "/table_of_contents.json", "w") as f:
        f.write(make_json(toc).encode('utf-8'))
コード例 #2
0
ファイル: export.py プロジェクト: abloch/Sefaria-Project
def export_toc():
	"""
	Exports the TOC to a JSON file.
	"""
	toc = get_toc()
	with open(SEFARIA_DATA_PATH + "/export/table_of_contents.json", "w") as f:
		f.write(make_json(toc))
コード例 #3
0
def toc(request):
    return {"toc": get_toc()}
コード例 #4
0
def toc(request):
    return {"toc": get_toc()}