mirror of
https://github.com/SinTan1729/recipe-box-for-wikijs.git
synced 2024-12-26 10:08:37 -06:00
change: Change in formatting
This commit is contained in:
parent
bc76fa4da0
commit
14b77385c7
1 changed files with 4 additions and 8 deletions
|
@ -113,20 +113,16 @@ def process_recipe(config, scraper, url, verbose=False):
|
||||||
if verbose:
|
if verbose:
|
||||||
print('Saving {url} -> {path}'.format(url=image_url, path=filepath))
|
print('Saving {url} -> {path}'.format(url=image_url, path=filepath))
|
||||||
|
|
||||||
recipe.write('# {title}\n'.format(title=scraper.title()))
|
|
||||||
if filename:
|
if filename:
|
||||||
recipe.write('![[{filename}]]\n'.format(filename=filename))
|
recipe.write('![{filename}]("/images/recipe/{filename}")\n'.format(filename=filename))
|
||||||
recipe.write('\n')
|
recipe.write('\n')
|
||||||
# This is a placeholder for the user's own notes about the recipe.
|
recipe.write('## Information\n')
|
||||||
recipe.write('## Notes\n')
|
|
||||||
recipe.write('\n')
|
|
||||||
recipe.write('## Metadata\n')
|
|
||||||
recipe.write('Yields: {yields}\n'.format(yields=scraper.yields()))
|
recipe.write('Yields: {yields}\n'.format(yields=scraper.yields()))
|
||||||
recipe.write('Total Time: {total_time}\n'.format(total_time=scraper.total_time()))
|
recipe.write('Total Time: {total_time}\n'.format(total_time=scraper.total_time()))
|
||||||
recipe.write('\n')
|
recipe.write('\n')
|
||||||
recipe.write('## Ingredients\n')
|
recipe.write('## Ingredients\n')
|
||||||
for ingredient in scraper.ingredients():
|
for ingredient in scraper.ingredients():
|
||||||
recipe.write('* {ingredient}\n'.format(ingredient=ingredient))
|
recipe.write('1. {ingredient}\n'.format(ingredient=ingredient))
|
||||||
|
|
||||||
recipe.write('\n')
|
recipe.write('\n')
|
||||||
recipe.write('## Instructions\n')
|
recipe.write('## Instructions\n')
|
||||||
|
@ -138,7 +134,7 @@ def process_recipe(config, scraper, url, verbose=False):
|
||||||
else:
|
else:
|
||||||
recipe.write('1. {instruction}\n'.format(instruction=instruction))
|
recipe.write('1. {instruction}\n'.format(instruction=instruction))
|
||||||
|
|
||||||
recipe.write('\n')
|
recipe.write('\n#### URL\n')
|
||||||
recipe.write('[{url}]({url})\n'.format(url=url))
|
recipe.write('[{url}]({url})\n'.format(url=url))
|
||||||
recipe.close()
|
recipe.close()
|
||||||
# if verbose:
|
# if verbose:
|
||||||
|
|
Loading…
Reference in a new issue