diff --git a/cookbook.py b/cookbook.py index b420228..fe7ae1b 100644 --- a/cookbook.py +++ b/cookbook.py @@ -87,9 +87,7 @@ def update_wiki(recipe): text = page.text() - steps = '' - for log in recipe['logs']: - steps+= f'# {log}\n' + steps = [f"# {log}" for log in recipe["logs"]].join('\n') # PROV TEMPLATE content = f""" @@ -102,13 +100,14 @@ def update_wiki(recipe):
''' Process Log'''
- {[f"# {log}" for log in recipe["logs"]].join('\n')} + {steps} '''Who'''
{recipe['who']} """ - - text += textwrap.dedent(content) + + # mi disp + text += [line.strip() for line in content.splitlines()].join('\n') print(text)