From 364d804d7b0deb177d9e6569526b811e5fab83d4 Mon Sep 17 00:00:00 2001 From: Francesco Luzzana Date: Tue, 31 May 2022 16:24:53 +0200 Subject: [PATCH] documentation --- cookbook.py | 15 ++------------- recipes/test-test-test_31-05-2022_01-38-40.md | 10 ---------- 2 files changed, 2 insertions(+), 23 deletions(-) delete mode 100644 recipes/test-test-test_31-05-2022_01-38-40.md diff --git a/cookbook.py b/cookbook.py index fe24547..02f158c 100644 --- a/cookbook.py +++ b/cookbook.py @@ -73,7 +73,7 @@ def get_recipes(): recipes.append(meta) return recipes - +# post the recipe in the wiki def update_wiki(recipe): import mwclient @@ -85,7 +85,6 @@ def update_wiki(recipe): page = site.pages['Week Six: Diffractive reading methods'] text = page.text() - steps = '\n'.join([f"# {log}" for log in recipe["logs"]]) # PROV TEMPLATE @@ -105,21 +104,11 @@ def update_wiki(recipe): {recipe['who']} """ - # mi disp + # delete multiline indentation text += '\n'.join([line.strip() for line in content.splitlines()]) - - page.edit(text, f'Added a new recipe! {recipe["title"]}') -# sample object to test the md output -r = { - "title": "Test test test", - "description": "A super simple description", - "logs": ["first step", "second step", "third step"], - "who": "a friend of mine", -} - # TODO: get data from client @app.route("/", methods=["GET", "POST"]) diff --git a/recipes/test-test-test_31-05-2022_01-38-40.md b/recipes/test-test-test_31-05-2022_01-38-40.md deleted file mode 100644 index e0a8865..0000000 --- a/recipes/test-test-test_31-05-2022_01-38-40.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -date: 2022-05-31 01:38:40.484897 -description: A super simple description -logs: -- first step -- second step -- third step -title: Test test test -who: a friend of mine ---- \ No newline at end of file