chowdown import folder syntax support

This commit is contained in:
vabene1111 2021-02-18 09:36:13 +01:00
parent 73a24a8ef0
commit fef6f695ce
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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/