diff --git a/cookbook/forms.py b/cookbook/forms.py index d96ba1648..23171d292 100644 --- a/cookbook/forms.py +++ b/cookbook/forms.py @@ -126,12 +126,13 @@ class ImportExportBase(forms.Form): DOMESTICA = 'DOMESTICA' MEALMASTER = 'MEALMASTER' REZKONV = 'REZKONV' + OPENEATS = 'OPENEATS' type = forms.ChoiceField(choices=( (DEFAULT, _('Default')), (PAPRIKA, 'Paprika'), (NEXTCLOUD, 'Nextcloud Cookbook'), (MEALIE, 'Mealie'), (CHOWDOWN, 'Chowdown'), (SAFRON, 'Safron'), (CHEFTAP, 'ChefTap'), (PEPPERPLATE, 'Pepperplate'), (RECETTETEK, 'RecetteTek'), (RECIPESAGE, 'Recipe Sage'), (DOMESTICA, 'Domestica'), - (MEALMASTER, 'MealMaster'), (REZKONV, 'RezKonv'), + (MEALMASTER, 'MealMaster'), (REZKONV, 'RezKonv'), (OPENEATS, 'Openeats'), )) diff --git a/cookbook/integration/openeats.py b/cookbook/integration/openeats.py new file mode 100644 index 000000000..ca4c75bac --- /dev/null +++ b/cookbook/integration/openeats.py @@ -0,0 +1,17 @@ +import re + +from django.utils.translation import gettext as _ + +from cookbook.helper.ingredient_parser import parse, get_food, get_unit +from cookbook.integration.integration import Integration +from cookbook.models import Recipe, Step, Food, Unit, Ingredient + + +class OpenEats(Integration): + + def get_recipe_from_file(self, file): + + return None + + def get_file_from_recipe(self, recipe): + raise NotImplementedError('Method not implemented in storage integration') diff --git a/cookbook/templates/url_import.html b/cookbook/templates/url_import.html index 23dd86ff0..c1f5f67b3 100644 --- a/cookbook/templates/url_import.html +++ b/cookbook/templates/url_import.html @@ -88,6 +88,9 @@ + @@ -110,6 +113,7 @@ RecetteTek + diff --git a/cookbook/views/import_export.py b/cookbook/views/import_export.py index 92a821942..3482f2b79 100644 --- a/cookbook/views/import_export.py +++ b/cookbook/views/import_export.py @@ -18,6 +18,7 @@ from cookbook.integration.domestica import Domestica from cookbook.integration.mealie import Mealie from cookbook.integration.mealmaster import MealMaster from cookbook.integration.nextcloud_cookbook import NextcloudCookbook +from cookbook.integration.openeats import OpenEats from cookbook.integration.paprika import Paprika from cookbook.integration.recettetek import RecetteTek from cookbook.integration.recipesage import RecipeSage @@ -53,6 +54,8 @@ def get_integration(request, export_type): return RezKonv(request, export_type) if export_type == ImportExportBase.MEALMASTER: return MealMaster(request, export_type) + if export_type == ImportExportBase.OPENEATS: + return OpenEats(request, export_type) @group_required('user')