コード例 #1
0
def yield_recipe_toc(root, chapter):
    for recipe in iter_recipes(root, chapter):
        file = op.join(root, chapter, recipe)
        recipe_name = get_recipe_name(file)
        url = urlparse.urljoin(urlbase, chapter + '/' + recipe)
        yield '* [{recipe_name}]({url})\n'.format(
            recipe_name=recipe_name,
            url=url,
        )
コード例 #2
0
ファイル: gentoc.py プロジェクト: 2dpodcast/cookbook-code
def yield_recipe_toc(root, chapter):
    for recipe in iter_recipes(root, chapter):
        file = op.join(root, chapter, recipe)
        recipe_name = get_recipe_name(file)
        url = urlparse.urljoin(urlbase, chapter + '/' + recipe)
        yield '* [{recipe_name}]({url})\n'.format(
            recipe_name=recipe_name,
            url=url,
        )
コード例 #3
0
def get_title(notebook_filename):
    return get_recipe_name(op.join(featured_dir, notebook_filename))