From fef6f695ce0bfcf4f7e6a4b30071220a35437d84 Mon Sep 17 00:00:00 2001 From: vabene1111 Date: Thu, 18 Feb 2021 09:36:13 +0100 Subject: [PATCH] chowdown import folder syntax support --- cookbook/integration/chowdown.py | 2 +- docs/features/import_export.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cookbook/integration/chowdown.py b/cookbook/integration/chowdown.py index ecd2c45e1..f7a21b5b5 100644 --- a/cookbook/integration/chowdown.py +++ b/cookbook/integration/chowdown.py @@ -12,7 +12,7 @@ class Chowdown(Integration): def import_file_name_filter(self, zip_info_object): print("testing", zip_info_object.filename) - return re.match(r'^_recipes/([A-Za-z\d\s-])+.md$', zip_info_object.filename) + return re.match(r'^(_)*recipes/([A-Za-z\d\s-])+.md$', zip_info_object.filename) def get_recipe_from_file(self, file): ingredient_mode = False diff --git a/docs/features/import_export.md b/docs/features/import_export.md index 4f81d8012..069687ebe 100644 --- a/docs/features/import_export.md +++ b/docs/features/import_export.md @@ -64,9 +64,9 @@ Images are saved in a directory called `images`. In order to import your Chowdown recipes simply create a `.zip` file from those two folders and import them. The folder structure should look as follows -!!! warning "_recipes" - Make sure to add have the `_` before the `recipes` folder but not the `images` folder. This is because chowdown does it - this way by default. +!!! info "_recipes" + For some reason chowdown uses `_` before the `recipes` folder. To avoid confusion the import supports both + `_recipes` and `recipes` ``` Recipes.zip/