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, )
def get_title(notebook_filename): return get_recipe_name(op.join(featured_dir, notebook_filename))