importer openeats basics
This commit is contained in:
parent
061aefd233
commit
a0b6261275
@ -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'),
|
||||
))
|
||||
|
||||
|
||||
|
17
cookbook/integration/openeats.py
Normal file
17
cookbook/integration/openeats.py
Normal file
@ -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')
|
@ -88,6 +88,9 @@
|
||||
<label class="btn btn-outline-info btn-sm" @click="recipe_app='SAFRON'">
|
||||
<input type="radio" autocomplete="off"> Safron
|
||||
</label>
|
||||
<label class="btn btn-outline-info btn-sm" @click="recipe_app='OPENEATS'">
|
||||
<input type="radio" autocomplete="off"> Openeats
|
||||
</label>
|
||||
<label class="btn btn-outline-info btn-sm" @click="recipe_app='CHEFTAP'">
|
||||
<input type="radio" autocomplete="off"> Cheftap
|
||||
</label>
|
||||
@ -110,6 +113,7 @@
|
||||
<input type="radio" autocomplete="off"> RecetteTek
|
||||
</label>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<b-form-checkbox v-model="import_duplicates" name="check-button" switch style="margin-top: 1vh">
|
||||
|
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user