text wrap

master
km0 3 years ago
parent f3e197cff6
commit afc1c3a16f

@ -76,6 +76,7 @@ def get_recipes():
def update_wiki(recipe):
import mwclient
import textwrap
site = mwclient.Site('pzwiki.wdka.nl', path='/mw-mediadesign/')
site.login(
@ -91,7 +92,7 @@ def update_wiki(recipe):
steps+= f'# {log}\n'
# PROV TEMPLATE
content = f"""
content = f"""\
=== {recipe['title']} ===
''{recipe['description']}''
<br>
@ -106,7 +107,7 @@ def update_wiki(recipe):
<br>
{recipe['who']}
"""
text += content
text += textwrap.dedent(content)
page.edit(text, f'Added a new recipe! {recipe["title"]}')

Loading…
Cancel
Save