mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-09 03:04:54 -04:00
feat: Implemented Plan to Eat migration (#2635)
Co-authored-by: Michael Genson <71845777+michael-genson@users.noreply.github.com>
This commit is contained in:
parent
e8b5d8d66f
commit
f72fcc3031
File diff suppressed because one or more lines are too long
@ -345,7 +345,11 @@
|
||||
"recipe-1": "Recipe 1",
|
||||
"recipe-2": "Recipe 2",
|
||||
"paprika-text": "Mealie can import recipes from the Paprika application. Export your recipes from paprika, rename the export extension to .zip and upload it below.",
|
||||
"mealie-text": "Mealie can import recipes from the Mealie application from a pre v1.0 release. Export your recipes from your old instance, and upload the zip file below. Note that only recipes can be imported from the export."
|
||||
"mealie-text": "Mealie can import recipes from the Mealie application from a pre v1.0 release. Export your recipes from your old instance, and upload the zip file below. Note that only recipes can be imported from the export.",
|
||||
"plantoeat": {
|
||||
"title": "Plan to Eat",
|
||||
"description-long": "Mealie can import recipies from Plan to Eat."
|
||||
}
|
||||
},
|
||||
"new-recipe": {
|
||||
"bulk-add": "Bulk Add",
|
||||
|
@ -345,7 +345,11 @@
|
||||
"recipe-1": "Recipe 1",
|
||||
"recipe-2": "Recipe 2",
|
||||
"paprika-text": "Mealie can import recipes from the Paprika application. Export your recipes from paprika, rename the export extension to .zip and upload it below.",
|
||||
"mealie-text": "Mealie can import recipes from the Mealie application from a pre v1.0 release. Export your recipes from your old instance, and upload the zip file below. Note that only recipes can be imported from the export."
|
||||
"mealie-text": "Mealie can import recipes from the Mealie application from a pre v1.0 release. Export your recipes from your old instance, and upload the zip file below. Note that only recipes can be imported from the export.",
|
||||
"plantoeat": {
|
||||
"title": "Plan to Eat",
|
||||
"description-long": "Mealie can import recipies from Plan to Eat."
|
||||
}
|
||||
},
|
||||
"new-recipe": {
|
||||
"bulk-add": "Bulk Add",
|
||||
|
@ -345,7 +345,11 @@
|
||||
"recipe-1": "Recipe 1",
|
||||
"recipe-2": "Recipe 2",
|
||||
"paprika-text": "Mealie can import recipes from the Paprika application. Export your recipes from paprika, rename the export extension to .zip and upload it below.",
|
||||
"mealie-text": "Mealie can import recipes from the Mealie application from a pre v1.0 release. Export your recipes from your old instance, and upload the zip file below. Note that only recipes can be imported from the export."
|
||||
"mealie-text": "Mealie can import recipes from the Mealie application from a pre v1.0 release. Export your recipes from your old instance, and upload the zip file below. Note that only recipes can be imported from the export.",
|
||||
"plantoeat": {
|
||||
"title": "Plan to Eat",
|
||||
"description-long": "Mealie can import recipies from Plan to Eat."
|
||||
}
|
||||
},
|
||||
"new-recipe": {
|
||||
"bulk-add": "Bulk Add",
|
||||
|
@ -345,7 +345,11 @@
|
||||
"recipe-1": "Recepta 1",
|
||||
"recipe-2": "Recepta 2",
|
||||
"paprika-text": "Mealie can import recipes from the Paprika application. Export your recipes from paprika, rename the export extension to .zip and upload it below.",
|
||||
"mealie-text": "Mealie can import recipes from the Mealie application from a pre v1.0 release. Export your recipes from your old instance, and upload the zip file below. Note that only recipes can be imported from the export."
|
||||
"mealie-text": "Mealie can import recipes from the Mealie application from a pre v1.0 release. Export your recipes from your old instance, and upload the zip file below. Note that only recipes can be imported from the export.",
|
||||
"plantoeat": {
|
||||
"title": "Plan to Eat",
|
||||
"description-long": "Mealie can import recipies from Plan to Eat."
|
||||
}
|
||||
},
|
||||
"new-recipe": {
|
||||
"bulk-add": "Afegiu tot d'una",
|
||||
|
@ -345,7 +345,11 @@
|
||||
"recipe-1": "Recept 1",
|
||||
"recipe-2": "Recept 2",
|
||||
"paprika-text": "Mealie může importovat recepty z aplikace Paprika. Exportujte své recepty z papriky, přejmenujte příponu exportovaného souboru na .zip a nahrajte jej níže.",
|
||||
"mealie-text": "V Mealie může importovat recepty z aplikace Mealie z v1.0 a starší. Exportujte své recepty ze staré verze a nahrajte zip soubor níže. Všimněte si, že lze importovat pouze recepty."
|
||||
"mealie-text": "V Mealie může importovat recepty z aplikace Mealie z v1.0 a starší. Exportujte své recepty ze staré verze a nahrajte zip soubor níže. Všimněte si, že lze importovat pouze recepty.",
|
||||
"plantoeat": {
|
||||
"title": "Plan to Eat",
|
||||
"description-long": "Mealie can import recipies from Plan to Eat."
|
||||
}
|
||||
},
|
||||
"new-recipe": {
|
||||
"bulk-add": "Hromadné přidání",
|
||||
|
@ -345,7 +345,11 @@
|
||||
"recipe-1": "Opskrift 1",
|
||||
"recipe-2": "Opskrift 2",
|
||||
"paprika-text": "Mealie kan importere opskrifter fra Paprika applikationen. Eksporter dine opskrifter fra paprika, omdøbe eksportudvidelsen til .zip og uploade den nedenfor.",
|
||||
"mealie-text": "Mealie kan importere opskrifter fra Mealie applikationen fra en pre v1.0 udgivelse. Eksporter dine opskrifter fra din gamle installation, og upload zip-filen nedenfor. Bemærk, at kun opskrifter kan importeres fra eksport."
|
||||
"mealie-text": "Mealie kan importere opskrifter fra Mealie applikationen fra en pre v1.0 udgivelse. Eksporter dine opskrifter fra din gamle installation, og upload zip-filen nedenfor. Bemærk, at kun opskrifter kan importeres fra eksport.",
|
||||
"plantoeat": {
|
||||
"title": "Plan to Eat",
|
||||
"description-long": "Mealie can import recipies from Plan to Eat."
|
||||
}
|
||||
},
|
||||
"new-recipe": {
|
||||
"bulk-add": "Bulk Tilføj",
|
||||
|
@ -345,7 +345,11 @@
|
||||
"recipe-1": "Rezept 1",
|
||||
"recipe-2": "Rezept 2",
|
||||
"paprika-text": "Mealie kann Rezepte aus der Paprika-App importieren. Exportiere deine Rezepte in Paprika, ändere die Endung der Export-Datei in .zip und lade sie unten hoch.",
|
||||
"mealie-text": "Mealie kann Rezepte aus der Mealie-App in einer Version vor v1.0 importieren. Exportiere deine Rezepte aus deiner alten Instanz und lade die Zip-Datei unten hoch. Bitte beachte, dass nur Rezepte aus dem Export importiert werden können."
|
||||
"mealie-text": "Mealie kann Rezepte aus der Mealie-App in einer Version vor v1.0 importieren. Exportiere deine Rezepte aus deiner alten Instanz und lade die Zip-Datei unten hoch. Bitte beachte, dass nur Rezepte aus dem Export importiert werden können.",
|
||||
"plantoeat": {
|
||||
"title": "Plan to Eat",
|
||||
"description-long": "Mealie can import recipies from Plan to Eat."
|
||||
}
|
||||
},
|
||||
"new-recipe": {
|
||||
"bulk-add": "Mehrere hinzufügen",
|
||||
|
@ -345,7 +345,11 @@
|
||||
"recipe-1": "Recipe 1",
|
||||
"recipe-2": "Recipe 2",
|
||||
"paprika-text": "Mealie can import recipes from the Paprika application. Export your recipes from paprika, rename the export extension to .zip and upload it below.",
|
||||
"mealie-text": "Mealie can import recipes from the Mealie application from a pre v1.0 release. Export your recipes from your old instance, and upload the zip file below. Note that only recipes can be imported from the export."
|
||||
"mealie-text": "Mealie can import recipes from the Mealie application from a pre v1.0 release. Export your recipes from your old instance, and upload the zip file below. Note that only recipes can be imported from the export.",
|
||||
"plantoeat": {
|
||||
"title": "Plan to Eat",
|
||||
"description-long": "Mealie can import recipies from Plan to Eat."
|
||||
}
|
||||
},
|
||||
"new-recipe": {
|
||||
"bulk-add": "Μαζική Προσθήκη",
|
||||
|
@ -345,7 +345,11 @@
|
||||
"recipe-1": "Recipe 1",
|
||||
"recipe-2": "Recipe 2",
|
||||
"paprika-text": "Mealie can import recipes from the Paprika application. Export your recipes from paprika, rename the export extension to .zip and upload it below.",
|
||||
"mealie-text": "Mealie can import recipes from the Mealie application from a pre v1.0 release. Export your recipes from your old instance, and upload the zip file below. Note that only recipes can be imported from the export."
|
||||
"mealie-text": "Mealie can import recipes from the Mealie application from a pre v1.0 release. Export your recipes from your old instance, and upload the zip file below. Note that only recipes can be imported from the export.",
|
||||
"plantoeat": {
|
||||
"title": "Plan to Eat",
|
||||
"description-long": "Mealie can import recipies from Plan to Eat."
|
||||
}
|
||||
},
|
||||
"new-recipe": {
|
||||
"bulk-add": "Bulk Add",
|
||||
|
@ -345,7 +345,11 @@
|
||||
"recipe-1": "Recipe 1",
|
||||
"recipe-2": "Recipe 2",
|
||||
"paprika-text": "Mealie can import recipes from the Paprika application. Export your recipes from paprika, rename the export extension to .zip and upload it below.",
|
||||
"mealie-text": "Mealie can import recipes from the Mealie application from a pre v1.0 release. Export your recipes from your old instance, and upload the zip file below. Note that only recipes can be imported from the export."
|
||||
"mealie-text": "Mealie can import recipes from the Mealie application from a pre v1.0 release. Export your recipes from your old instance, and upload the zip file below. Note that only recipes can be imported from the export.",
|
||||
"plantoeat": {
|
||||
"title": "Plan to Eat",
|
||||
"description-long": "Mealie can import recipies from Plan to Eat."
|
||||
}
|
||||
},
|
||||
"new-recipe": {
|
||||
"bulk-add": "Bulk Add",
|
||||
|
@ -345,7 +345,11 @@
|
||||
"recipe-1": "Receta 1",
|
||||
"recipe-2": "Receta 2",
|
||||
"paprika-text": "Mealie puede importar recetas de la aplicación Paprika. Exporta tus recetas de paprika, renombra la extensión del fichero a .zip y súbelo a continuación.",
|
||||
"mealie-text": "Mealie puede importar recetas de la aplicación Mealie desde una versión anterior a v1.0. Exporta tus recetas de tu antigua instancia y sube el archivo zip a continuación. Ten en cuenta que solo se pueden importar recetas de la exportación."
|
||||
"mealie-text": "Mealie puede importar recetas de la aplicación Mealie desde una versión anterior a v1.0. Exporta tus recetas de tu antigua instancia y sube el archivo zip a continuación. Ten en cuenta que solo se pueden importar recetas de la exportación.",
|
||||
"plantoeat": {
|
||||
"title": "Plan to Eat",
|
||||
"description-long": "Mealie can import recipies from Plan to Eat."
|
||||
}
|
||||
},
|
||||
"new-recipe": {
|
||||
"bulk-add": "Añadir en masa",
|
||||
|
@ -345,7 +345,11 @@
|
||||
"recipe-1": "Resepti 1",
|
||||
"recipe-2": "Resepti 2",
|
||||
"paprika-text": "Mealie voi tuoda reseptejä Paprika-sovelluksesta. Vie reseptisi ohjelmasta ulos, nimeä tiedoston pääte uudelleen .zip ja lataa se alla.",
|
||||
"mealie-text": "Mealie voi tuoda reseptejä Mealie sovelluksesta ennen v1.0 julkaisua. Vie reseptisi vanhasta asennuksesta ja lataa zip-tiedosto. Huomaa, että viennistä voidaan tuoda vain reseptejä."
|
||||
"mealie-text": "Mealie voi tuoda reseptejä Mealie sovelluksesta ennen v1.0 julkaisua. Vie reseptisi vanhasta asennuksesta ja lataa zip-tiedosto. Huomaa, että viennistä voidaan tuoda vain reseptejä.",
|
||||
"plantoeat": {
|
||||
"title": "Plan to Eat",
|
||||
"description-long": "Mealie can import recipies from Plan to Eat."
|
||||
}
|
||||
},
|
||||
"new-recipe": {
|
||||
"bulk-add": "Lisää useita kerralla",
|
||||
|
@ -345,7 +345,11 @@
|
||||
"recipe-1": "Recette 1",
|
||||
"recipe-2": "Recette 2",
|
||||
"paprika-text": "Mealie peut importer des recettes depuis l'application Paprika. Exportez vos recettes de paprika, renommez l'extension d'exportation en .zip et téléchargez-les ci-dessous.",
|
||||
"mealie-text": "Mealie peut importer des recettes depuis l'application Mealie depuis une version antérieure à 1.0. Exportez vos recettes depuis votre ancienne instance, et téléchargez le fichier zip ci-dessous. Notez que seules les recettes peuvent être importées à partir de l'exportation."
|
||||
"mealie-text": "Mealie peut importer des recettes depuis l'application Mealie depuis une version antérieure à 1.0. Exportez vos recettes depuis votre ancienne instance, et téléchargez le fichier zip ci-dessous. Notez que seules les recettes peuvent être importées à partir de l'exportation.",
|
||||
"plantoeat": {
|
||||
"title": "Plan to Eat",
|
||||
"description-long": "Mealie can import recipies from Plan to Eat."
|
||||
}
|
||||
},
|
||||
"new-recipe": {
|
||||
"bulk-add": "Ajouter en masse",
|
||||
|
@ -345,7 +345,11 @@
|
||||
"recipe-1": "Recette 1",
|
||||
"recipe-2": "Recette 2",
|
||||
"paprika-text": "Mealie peut importer des recettes depuis l'application Paprika. Exportez vos recettes de paprika, renommez l'extension d'exportation en .zip et téléchargez-les ci-dessous.",
|
||||
"mealie-text": "Mealie peut importer des recettes depuis l'application Mealie depuis une version antérieure à 1.0. Exportez vos recettes depuis votre ancienne instance, et téléchargez le fichier zip ci-dessous. Notez que seules les recettes peuvent être importées à partir de l'exportation."
|
||||
"mealie-text": "Mealie peut importer des recettes depuis l'application Mealie depuis une version antérieure à 1.0. Exportez vos recettes depuis votre ancienne instance, et téléchargez le fichier zip ci-dessous. Notez que seules les recettes peuvent être importées à partir de l'exportation.",
|
||||
"plantoeat": {
|
||||
"title": "Plan to Eat",
|
||||
"description-long": "Mealie can import recipies from Plan to Eat."
|
||||
}
|
||||
},
|
||||
"new-recipe": {
|
||||
"bulk-add": "Ajouter en masse",
|
||||
|
@ -345,7 +345,11 @@
|
||||
"recipe-1": "Recipe 1",
|
||||
"recipe-2": "Recipe 2",
|
||||
"paprika-text": "Mealie can import recipes from the Paprika application. Export your recipes from paprika, rename the export extension to .zip and upload it below.",
|
||||
"mealie-text": "Mealie can import recipes from the Mealie application from a pre v1.0 release. Export your recipes from your old instance, and upload the zip file below. Note that only recipes can be imported from the export."
|
||||
"mealie-text": "Mealie can import recipes from the Mealie application from a pre v1.0 release. Export your recipes from your old instance, and upload the zip file below. Note that only recipes can be imported from the export.",
|
||||
"plantoeat": {
|
||||
"title": "Plan to Eat",
|
||||
"description-long": "Mealie can import recipies from Plan to Eat."
|
||||
}
|
||||
},
|
||||
"new-recipe": {
|
||||
"bulk-add": "Bulk Add",
|
||||
|
@ -345,7 +345,11 @@
|
||||
"recipe-1": "מתכון 1",
|
||||
"recipe-2": "מתכון 2",
|
||||
"paprika-text": "מילי יכולה לייבא מתכונים מאפליקציית Paprika. ייצא את המתכונים מהאפליקציה, שנה את סיומת הקובץ ל- zip והעלה אותו למטה.",
|
||||
"mealie-text": "Mealie יכול לייבא מתכונים מגרסאות ישנות של Mealie מתחת ל- v1.0. ייצא את המתכונים מהסביבה הישנה והעלה את קובץ ה- zip למטה. ניתן לייבא רק מתכונים מתהליך הייצוא."
|
||||
"mealie-text": "Mealie יכול לייבא מתכונים מגרסאות ישנות של Mealie מתחת ל- v1.0. ייצא את המתכונים מהסביבה הישנה והעלה את קובץ ה- zip למטה. ניתן לייבא רק מתכונים מתהליך הייצוא.",
|
||||
"plantoeat": {
|
||||
"title": "Plan to Eat",
|
||||
"description-long": "Mealie can import recipies from Plan to Eat."
|
||||
}
|
||||
},
|
||||
"new-recipe": {
|
||||
"bulk-add": "הוספה כמותית",
|
||||
|
@ -345,7 +345,11 @@
|
||||
"recipe-1": "Recept 1",
|
||||
"recipe-2": "Recept 2",
|
||||
"paprika-text": "Mealie može uvesti recepte iz aplikacije Paprika. Izvezite svoje recepte iz Paprike, preimenujte ekstenziju izvoza u .zip i učitajte je u nastavku.",
|
||||
"mealie-text": "Mealie može uvesti recepte iz Mealie aplikacije iz verzije prije v1.0. Izvezite svoje recepte iz starog primjerka i učitajte zip datoteku u nastavku. Napomena: Samo recepti mogu biti uvezeni iz izvoza."
|
||||
"mealie-text": "Mealie može uvesti recepte iz Mealie aplikacije iz verzije prije v1.0. Izvezite svoje recepte iz starog primjerka i učitajte zip datoteku u nastavku. Napomena: Samo recepti mogu biti uvezeni iz izvoza.",
|
||||
"plantoeat": {
|
||||
"title": "Plan to Eat",
|
||||
"description-long": "Mealie can import recipies from Plan to Eat."
|
||||
}
|
||||
},
|
||||
"new-recipe": {
|
||||
"bulk-add": "Dodajte više recepata odjednom",
|
||||
|
@ -345,7 +345,11 @@
|
||||
"recipe-1": "Recept 1",
|
||||
"recipe-2": "Recept 2",
|
||||
"paprika-text": "Mealie képes recepteket importálni a Paprika alkalmazásból. Exportálja a receptjeit a Paprikából, nevezze át az export kiterjesztést .zip-re, és töltse fel alább.",
|
||||
"mealie-text": "Mealie képes a v1.0 előtti kiadású Mealie alkalmazásból származó receptek importálására. Exportálja a receptjeit a régi példányából, és töltse fel a zip fájlt alább. Vegye figyelembe, hogy az exportból csak receptek importálhatók."
|
||||
"mealie-text": "Mealie képes a v1.0 előtti kiadású Mealie alkalmazásból származó receptek importálására. Exportálja a receptjeit a régi példányából, és töltse fel a zip fájlt alább. Vegye figyelembe, hogy az exportból csak receptek importálhatók.",
|
||||
"plantoeat": {
|
||||
"title": "Plan to Eat",
|
||||
"description-long": "Mealie can import recipies from Plan to Eat."
|
||||
}
|
||||
},
|
||||
"new-recipe": {
|
||||
"bulk-add": "Tömeges hozzáadás",
|
||||
|
@ -345,7 +345,11 @@
|
||||
"recipe-1": "Ricetta 1",
|
||||
"recipe-2": "Ricetta 2",
|
||||
"paprika-text": "Mealie può importare ricette dall'applicazione Paprika. Esporta le tue ricette da paprika, rinomina l'estensione di esportazione in .zip e caricala qui sotto.",
|
||||
"mealie-text": "Mealie può importare ricette dall'applicazione Mealie da un versione pre v1.0. Esporta le tue ricette dalla tua vecchia istanza e carica il file zip qui sotto. Nota che solo le ricette possono essere importate dall'esportazione."
|
||||
"mealie-text": "Mealie può importare ricette dall'applicazione Mealie da un versione pre v1.0. Esporta le tue ricette dalla tua vecchia istanza e carica il file zip qui sotto. Nota che solo le ricette possono essere importate dall'esportazione.",
|
||||
"plantoeat": {
|
||||
"title": "Plan to Eat",
|
||||
"description-long": "Mealie can import recipies from Plan to Eat."
|
||||
}
|
||||
},
|
||||
"new-recipe": {
|
||||
"bulk-add": "Inserimento Multiplo",
|
||||
|
@ -345,7 +345,11 @@
|
||||
"recipe-1": "レシピ1",
|
||||
"recipe-2": "レシピ2",
|
||||
"paprika-text": "Mealie can import recipes from the Paprika application. Export your recipes from paprika, rename the export extension to .zip and upload it below.",
|
||||
"mealie-text": "Mealie can import recipes from the Mealie application from a pre v1.0 release. Export your recipes from your old instance, and upload the zip file below. Note that only recipes can be imported from the export."
|
||||
"mealie-text": "Mealie can import recipes from the Mealie application from a pre v1.0 release. Export your recipes from your old instance, and upload the zip file below. Note that only recipes can be imported from the export.",
|
||||
"plantoeat": {
|
||||
"title": "Plan to Eat",
|
||||
"description-long": "Mealie can import recipies from Plan to Eat."
|
||||
}
|
||||
},
|
||||
"new-recipe": {
|
||||
"bulk-add": "Bulk Add",
|
||||
|
@ -345,7 +345,11 @@
|
||||
"recipe-1": "Recipe 1",
|
||||
"recipe-2": "Recipe 2",
|
||||
"paprika-text": "Mealie can import recipes from the Paprika application. Export your recipes from paprika, rename the export extension to .zip and upload it below.",
|
||||
"mealie-text": "Mealie can import recipes from the Mealie application from a pre v1.0 release. Export your recipes from your old instance, and upload the zip file below. Note that only recipes can be imported from the export."
|
||||
"mealie-text": "Mealie can import recipes from the Mealie application from a pre v1.0 release. Export your recipes from your old instance, and upload the zip file below. Note that only recipes can be imported from the export.",
|
||||
"plantoeat": {
|
||||
"title": "Plan to Eat",
|
||||
"description-long": "Mealie can import recipies from Plan to Eat."
|
||||
}
|
||||
},
|
||||
"new-recipe": {
|
||||
"bulk-add": "Bulk Add",
|
||||
|
@ -345,7 +345,11 @@
|
||||
"recipe-1": "Receptas 1",
|
||||
"recipe-2": "Receptas 2",
|
||||
"paprika-text": "Į Mealie galima importuoti receptus iš \"Paprika\" sistemos. Eksportuokite duomenis iš \"Paprika\", pervadinkite failo plėtinį į .ZIP ir įkelkite žemiau.",
|
||||
"mealie-text": "Į Mealie galima importuoti receptus iš senesnių už v1.0 Mealie versijų. Eksportuokite receptus iš senosios sistemos ir įkelkite .ZIP failą žemiau. Svarbu: perkeliami tik receptų duomenys."
|
||||
"mealie-text": "Į Mealie galima importuoti receptus iš senesnių už v1.0 Mealie versijų. Eksportuokite receptus iš senosios sistemos ir įkelkite .ZIP failą žemiau. Svarbu: perkeliami tik receptų duomenys.",
|
||||
"plantoeat": {
|
||||
"title": "Plan to Eat",
|
||||
"description-long": "Mealie can import recipies from Plan to Eat."
|
||||
}
|
||||
},
|
||||
"new-recipe": {
|
||||
"bulk-add": "Pridėti urmu",
|
||||
|
@ -345,7 +345,11 @@
|
||||
"recipe-1": "Recipe 1",
|
||||
"recipe-2": "Recipe 2",
|
||||
"paprika-text": "Mealie can import recipes from the Paprika application. Export your recipes from paprika, rename the export extension to .zip and upload it below.",
|
||||
"mealie-text": "Mealie can import recipes from the Mealie application from a pre v1.0 release. Export your recipes from your old instance, and upload the zip file below. Note that only recipes can be imported from the export."
|
||||
"mealie-text": "Mealie can import recipes from the Mealie application from a pre v1.0 release. Export your recipes from your old instance, and upload the zip file below. Note that only recipes can be imported from the export.",
|
||||
"plantoeat": {
|
||||
"title": "Plan to Eat",
|
||||
"description-long": "Mealie can import recipies from Plan to Eat."
|
||||
}
|
||||
},
|
||||
"new-recipe": {
|
||||
"bulk-add": "Bulk Add",
|
||||
|
@ -345,7 +345,11 @@
|
||||
"recipe-1": "Eerste recept",
|
||||
"recipe-2": "Tweede recept",
|
||||
"paprika-text": "Mealie kan recepten uit het programma Paprika importeren. Exporteer je recepten uit Paprika, hernoem de exportuitbreiding naar .zip en upload ze hieronder.",
|
||||
"mealie-text": "Mealie kan recepten importeren uit oude versies van Mealie (voor versie 1.0). Exporteer je recepten vanuit de oude versie, en upload het zip-bestand hieronder. Let op dat alleen recepten uit de export kunnen worden geïmporteerd."
|
||||
"mealie-text": "Mealie kan recepten importeren uit oude versies van Mealie (voor versie 1.0). Exporteer je recepten vanuit de oude versie, en upload het zip-bestand hieronder. Let op dat alleen recepten uit de export kunnen worden geïmporteerd.",
|
||||
"plantoeat": {
|
||||
"title": "Plan to Eat",
|
||||
"description-long": "Mealie can import recipies from Plan to Eat."
|
||||
}
|
||||
},
|
||||
"new-recipe": {
|
||||
"bulk-add": "Bulk toevoegen",
|
||||
|
@ -345,7 +345,11 @@
|
||||
"recipe-1": "Oppskrift 1",
|
||||
"recipe-2": "Oppskrift 2",
|
||||
"paprika-text": "Mealie kan importere oppskrifter fra Paprika. Eksporter oppskriftene fra paprika, gi den et nytt navn til .zip-eksportutvidelsen og last den opp nedenfor.",
|
||||
"mealie-text": "Mealie kan importere oppskrifter fra Mealie-appen fra versjoner før v1.0. Eksporter oppskriftene fra din gamle versjon, og last opp zip-filen under. Merk at bare oppskrifter kan importeres fra eksporten."
|
||||
"mealie-text": "Mealie kan importere oppskrifter fra Mealie-appen fra versjoner før v1.0. Eksporter oppskriftene fra din gamle versjon, og last opp zip-filen under. Merk at bare oppskrifter kan importeres fra eksporten.",
|
||||
"plantoeat": {
|
||||
"title": "Plan to Eat",
|
||||
"description-long": "Mealie can import recipies from Plan to Eat."
|
||||
}
|
||||
},
|
||||
"new-recipe": {
|
||||
"bulk-add": "Opprett flere",
|
||||
|
@ -345,7 +345,11 @@
|
||||
"recipe-1": "Przepis 1",
|
||||
"recipe-2": "Przepis 2",
|
||||
"paprika-text": "Mealie może importować przepisy z aplikacji Paprika. Eksportuj swoje przepisy z papriki, zmień nazwę rozszerzenia eksportu na .zip i prześlij je poniżej.",
|
||||
"mealie-text": "Mealie może importować receptury z aplikacji Mealie z wersji przed v1.0. Wyeksportuj swoje przepisy ze starej instancji i prześlij plik zip poniżej. Pamiętaj, że tylko receptury mogą być zaimportowane z eksportu."
|
||||
"mealie-text": "Mealie może importować receptury z aplikacji Mealie z wersji przed v1.0. Wyeksportuj swoje przepisy ze starej instancji i prześlij plik zip poniżej. Pamiętaj, że tylko receptury mogą być zaimportowane z eksportu.",
|
||||
"plantoeat": {
|
||||
"title": "Plan to Eat",
|
||||
"description-long": "Mealie can import recipies from Plan to Eat."
|
||||
}
|
||||
},
|
||||
"new-recipe": {
|
||||
"bulk-add": "Dodanie zbiorcze",
|
||||
|
@ -345,7 +345,11 @@
|
||||
"recipe-1": "Receita 1",
|
||||
"recipe-2": "Receita 2",
|
||||
"paprika-text": "Mealie pode importar receitas do aplicativo Paprika. Exporte suas receitas do Paprika, renomeie a extensão do arquivo para .zip e carregue-o abaixo.",
|
||||
"mealie-text": "Mealie pode importar receitas do aplicativo Mealie a partir de uma versão pré-v1.0. Exporte suas receitas de sua instância antiga e carregue o arquivo zip abaixo. Note que apenas as receitas podem ser importadas da exportação."
|
||||
"mealie-text": "Mealie pode importar receitas do aplicativo Mealie a partir de uma versão pré-v1.0. Exporte suas receitas de sua instância antiga e carregue o arquivo zip abaixo. Note que apenas as receitas podem ser importadas da exportação.",
|
||||
"plantoeat": {
|
||||
"title": "Plan to Eat",
|
||||
"description-long": "Mealie can import recipies from Plan to Eat."
|
||||
}
|
||||
},
|
||||
"new-recipe": {
|
||||
"bulk-add": "Adicionar em Massa",
|
||||
|
@ -345,7 +345,11 @@
|
||||
"recipe-1": "Receita 1",
|
||||
"recipe-2": "Receita 2",
|
||||
"paprika-text": "O Mealie pode importar receitas da app Paprika. Exporte as suas receitas do Paprika, renomeie a extensão do ficheiro exportado para .zip e carregue-o mais abaixo.",
|
||||
"mealie-text": "O Mealie pode importar receitas de versões do Mealie anteriores à 1.0. Exporte as suas receitas na instância antiga e carregue o ficheiro zip mais abaixo. Note que só podem ser importadas as receitas dessa exportação."
|
||||
"mealie-text": "O Mealie pode importar receitas de versões do Mealie anteriores à 1.0. Exporte as suas receitas na instância antiga e carregue o ficheiro zip mais abaixo. Note que só podem ser importadas as receitas dessa exportação.",
|
||||
"plantoeat": {
|
||||
"title": "Plan to Eat",
|
||||
"description-long": "Mealie can import recipies from Plan to Eat."
|
||||
}
|
||||
},
|
||||
"new-recipe": {
|
||||
"bulk-add": "Adicionar Vários",
|
||||
|
@ -345,7 +345,11 @@
|
||||
"recipe-1": "Recipe 1",
|
||||
"recipe-2": "Recipe 2",
|
||||
"paprika-text": "Mealie can import recipes from the Paprika application. Export your recipes from paprika, rename the export extension to .zip and upload it below.",
|
||||
"mealie-text": "Mealie can import recipes from the Mealie application from a pre v1.0 release. Export your recipes from your old instance, and upload the zip file below. Note that only recipes can be imported from the export."
|
||||
"mealie-text": "Mealie can import recipes from the Mealie application from a pre v1.0 release. Export your recipes from your old instance, and upload the zip file below. Note that only recipes can be imported from the export.",
|
||||
"plantoeat": {
|
||||
"title": "Plan to Eat",
|
||||
"description-long": "Mealie can import recipies from Plan to Eat."
|
||||
}
|
||||
},
|
||||
"new-recipe": {
|
||||
"bulk-add": "Bulk Add",
|
||||
|
@ -345,7 +345,11 @@
|
||||
"recipe-1": "Рецепт 1",
|
||||
"recipe-2": "Рецепт 2",
|
||||
"paprika-text": "Mealie может импортировать рецепты из приложения Paprika. Экспортируйте рецепты из paprika, измените расширение для экспорта в .zip и загрузить его ниже.",
|
||||
"mealie-text": "Mealie может импортировать рецепты из приложения Mealie из версии до версии 1.0. Экспортируйте рецепты из старой версии приложения и загрузите zip-файл ниже. Заметьте, что только рецепты могут быть импортированы из экспорта."
|
||||
"mealie-text": "Mealie может импортировать рецепты из приложения Mealie из версии до версии 1.0. Экспортируйте рецепты из старой версии приложения и загрузите zip-файл ниже. Заметьте, что только рецепты могут быть импортированы из экспорта.",
|
||||
"plantoeat": {
|
||||
"title": "Plan to Eat",
|
||||
"description-long": "Mealie can import recipies from Plan to Eat."
|
||||
}
|
||||
},
|
||||
"new-recipe": {
|
||||
"bulk-add": "Массовое добавление",
|
||||
|
@ -345,7 +345,11 @@
|
||||
"recipe-1": "Recept 1",
|
||||
"recipe-2": "Recept 2",
|
||||
"paprika-text": "Mealie dokáže importovať recepty z aplikácie Paprika. Exportujte vaše recepty z Papriky, premenujte príponu exportovaného súboru na .zip a nahrajte ho nižšie.",
|
||||
"mealie-text": "Mealie dokáže importovať recepty z Mealie verzie pre v1.0. Exportujte vaše recepty z vašej starej inštalácie a nižšie nahrajte zip-súbor. Týmto spôsobom je možné z exportu importovať iba recepty."
|
||||
"mealie-text": "Mealie dokáže importovať recepty z Mealie verzie pre v1.0. Exportujte vaše recepty z vašej starej inštalácie a nižšie nahrajte zip-súbor. Týmto spôsobom je možné z exportu importovať iba recepty.",
|
||||
"plantoeat": {
|
||||
"title": "Plan to Eat",
|
||||
"description-long": "Mealie can import recipies from Plan to Eat."
|
||||
}
|
||||
},
|
||||
"new-recipe": {
|
||||
"bulk-add": "Hromadné pridanie",
|
||||
|
@ -345,7 +345,11 @@
|
||||
"recipe-1": "Recipe 1",
|
||||
"recipe-2": "Recipe 2",
|
||||
"paprika-text": "Mealie can import recipes from the Paprika application. Export your recipes from paprika, rename the export extension to .zip and upload it below.",
|
||||
"mealie-text": "Mealie can import recipes from the Mealie application from a pre v1.0 release. Export your recipes from your old instance, and upload the zip file below. Note that only recipes can be imported from the export."
|
||||
"mealie-text": "Mealie can import recipes from the Mealie application from a pre v1.0 release. Export your recipes from your old instance, and upload the zip file below. Note that only recipes can be imported from the export.",
|
||||
"plantoeat": {
|
||||
"title": "Plan to Eat",
|
||||
"description-long": "Mealie can import recipies from Plan to Eat."
|
||||
}
|
||||
},
|
||||
"new-recipe": {
|
||||
"bulk-add": "Množično dodajanje",
|
||||
|
@ -345,7 +345,11 @@
|
||||
"recipe-1": "Recipe 1",
|
||||
"recipe-2": "Recipe 2",
|
||||
"paprika-text": "Mealie can import recipes from the Paprika application. Export your recipes from paprika, rename the export extension to .zip and upload it below.",
|
||||
"mealie-text": "Mealie can import recipes from the Mealie application from a pre v1.0 release. Export your recipes from your old instance, and upload the zip file below. Note that only recipes can be imported from the export."
|
||||
"mealie-text": "Mealie can import recipes from the Mealie application from a pre v1.0 release. Export your recipes from your old instance, and upload the zip file below. Note that only recipes can be imported from the export.",
|
||||
"plantoeat": {
|
||||
"title": "Plan to Eat",
|
||||
"description-long": "Mealie can import recipies from Plan to Eat."
|
||||
}
|
||||
},
|
||||
"new-recipe": {
|
||||
"bulk-add": "Bulk Add",
|
||||
|
@ -345,7 +345,11 @@
|
||||
"recipe-1": "Recept 1",
|
||||
"recipe-2": "Recept 2",
|
||||
"paprika-text": "Mealie can import recipes from the Paprika application. Export your recipes from paprika, rename the export extension to .zip and upload it below.",
|
||||
"mealie-text": "Mealie can import recipes from the Mealie application from a pre v1.0 release. Export your recipes from your old instance, and upload the zip file below. Note that only recipes can be imported from the export."
|
||||
"mealie-text": "Mealie can import recipes from the Mealie application from a pre v1.0 release. Export your recipes from your old instance, and upload the zip file below. Note that only recipes can be imported from the export.",
|
||||
"plantoeat": {
|
||||
"title": "Plan to Eat",
|
||||
"description-long": "Mealie can import recipies from Plan to Eat."
|
||||
}
|
||||
},
|
||||
"new-recipe": {
|
||||
"bulk-add": "Lägg till flera",
|
||||
|
@ -345,7 +345,11 @@
|
||||
"recipe-1": "Tarif 1",
|
||||
"recipe-2": "Tarif 2",
|
||||
"paprika-text": "Mealie, Paprika uygulamasından tarifleri içe aktarabilir. Tariflerinizi paprika'dan dışa aktarın, dışa aktarma uzantısını .zip olarak yeniden adlandırın ve aşağıda yükleyin.",
|
||||
"mealie-text": "Mealie, v1.0 öncesi bir sürümden Mealie uygulamasından tarifleri içe aktarabilir. Tariflerinizi eski örneğinizden dışa aktarın ve aşağıdaki zip dosyasını yükleyin. Dışa aktarmadan yalnızca tariflerin içe aktarılabileceğini unutmayın."
|
||||
"mealie-text": "Mealie, v1.0 öncesi bir sürümden Mealie uygulamasından tarifleri içe aktarabilir. Tariflerinizi eski örneğinizden dışa aktarın ve aşağıdaki zip dosyasını yükleyin. Dışa aktarmadan yalnızca tariflerin içe aktarılabileceğini unutmayın.",
|
||||
"plantoeat": {
|
||||
"title": "Plan to Eat",
|
||||
"description-long": "Mealie can import recipies from Plan to Eat."
|
||||
}
|
||||
},
|
||||
"new-recipe": {
|
||||
"bulk-add": "Toplu Ekle",
|
||||
|
@ -345,7 +345,11 @@
|
||||
"recipe-1": "Рецепт 1",
|
||||
"recipe-2": "Рецепт 2",
|
||||
"paprika-text": "Mealie може імпортувати рецепти з додатку Paprika. Експортуйте ваші рецепти з Paprika, перейменуйте розширення експорту в .zip та відвантажте його нижче.",
|
||||
"mealie-text": "Mealie може імпортувати рецепти з Mealie до версії 1.0. Експортуйте свої рецепти зі старої Mealie і відвантажте zip-файл нижче. Зверніть увагу, що тільки рецепти можуть бути імпортовані з експорту."
|
||||
"mealie-text": "Mealie може імпортувати рецепти з Mealie до версії 1.0. Експортуйте свої рецепти зі старої Mealie і відвантажте zip-файл нижче. Зверніть увагу, що тільки рецепти можуть бути імпортовані з експорту.",
|
||||
"plantoeat": {
|
||||
"title": "Plan to Eat",
|
||||
"description-long": "Mealie can import recipies from Plan to Eat."
|
||||
}
|
||||
},
|
||||
"new-recipe": {
|
||||
"bulk-add": "Масове додавання",
|
||||
|
@ -345,7 +345,11 @@
|
||||
"recipe-1": "Recipe 1",
|
||||
"recipe-2": "Recipe 2",
|
||||
"paprika-text": "Mealie can import recipes from the Paprika application. Export your recipes from paprika, rename the export extension to .zip and upload it below.",
|
||||
"mealie-text": "Mealie can import recipes from the Mealie application from a pre v1.0 release. Export your recipes from your old instance, and upload the zip file below. Note that only recipes can be imported from the export."
|
||||
"mealie-text": "Mealie can import recipes from the Mealie application from a pre v1.0 release. Export your recipes from your old instance, and upload the zip file below. Note that only recipes can be imported from the export.",
|
||||
"plantoeat": {
|
||||
"title": "Plan to Eat",
|
||||
"description-long": "Mealie can import recipies from Plan to Eat."
|
||||
}
|
||||
},
|
||||
"new-recipe": {
|
||||
"bulk-add": "Bulk Add",
|
||||
|
@ -345,7 +345,11 @@
|
||||
"recipe-1": "食谱 1",
|
||||
"recipe-2": "食谱 2",
|
||||
"paprika-text": "Mealie 可以从 Paprika 导入食谱。请从paprika 导出食谱,重命名导出文件并压缩成.zip格式后,在下方上传",
|
||||
"mealie-text": "Mealie can import recipes from the Mealie application from a pre v1.0 release. Export your recipes from your old instance, and upload the zip file below. Note that only recipes can be imported from the export."
|
||||
"mealie-text": "Mealie can import recipes from the Mealie application from a pre v1.0 release. Export your recipes from your old instance, and upload the zip file below. Note that only recipes can be imported from the export.",
|
||||
"plantoeat": {
|
||||
"title": "Plan to Eat",
|
||||
"description-long": "Mealie can import recipies from Plan to Eat."
|
||||
}
|
||||
},
|
||||
"new-recipe": {
|
||||
"bulk-add": "批量添加",
|
||||
|
@ -345,7 +345,11 @@
|
||||
"recipe-1": "Recipe 1",
|
||||
"recipe-2": "Recipe 2",
|
||||
"paprika-text": "Mealie can import recipes from the Paprika application. Export your recipes from paprika, rename the export extension to .zip and upload it below.",
|
||||
"mealie-text": "Mealie can import recipes from the Mealie application from a pre v1.0 release. Export your recipes from your old instance, and upload the zip file below. Note that only recipes can be imported from the export."
|
||||
"mealie-text": "Mealie can import recipes from the Mealie application from a pre v1.0 release. Export your recipes from your old instance, and upload the zip file below. Note that only recipes can be imported from the export.",
|
||||
"plantoeat": {
|
||||
"title": "Plan to Eat",
|
||||
"description-long": "Mealie can import recipies from Plan to Eat."
|
||||
}
|
||||
},
|
||||
"new-recipe": {
|
||||
"bulk-add": "批量添加",
|
||||
|
@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
export type WebhookType = "mealplan";
|
||||
export type SupportedMigrations = "nextcloud" | "chowdown" | "copymethat" | "paprika" | "mealie_alpha" | "tandoor";
|
||||
export type SupportedMigrations = "nextcloud" | "chowdown" | "copymethat" | "paprika" | "mealie_alpha" | "tandoor" | "plantoeat";
|
||||
|
||||
export interface CreateGroupPreferences {
|
||||
privateGroup?: boolean;
|
||||
|
@ -81,6 +81,7 @@ const MIGRATIONS = {
|
||||
paprika: "paprika",
|
||||
mealie: "mealie_alpha",
|
||||
tandoor: "tandoor",
|
||||
plantoeat: "plantoeat",
|
||||
};
|
||||
|
||||
export default defineComponent({
|
||||
@ -123,6 +124,10 @@ export default defineComponent({
|
||||
text: i18n.tc("migration.tandoor.title"),
|
||||
value: MIGRATIONS.tandoor,
|
||||
},
|
||||
{
|
||||
text: i18n.tc("migration.plantoeat.title"),
|
||||
value: MIGRATIONS.plantoeat,
|
||||
},
|
||||
];
|
||||
|
||||
const _content = {
|
||||
@ -311,6 +316,19 @@ export default defineComponent({
|
||||
}
|
||||
],
|
||||
},
|
||||
[MIGRATIONS.plantoeat]: {
|
||||
text: i18n.tc("migration.plantoeat.description-long"),
|
||||
tree: [
|
||||
{
|
||||
id: 1,
|
||||
icon: $globals.icons.zip,
|
||||
name: "plantoeat-recipes-508318_10-13-2023.zip",
|
||||
children: [
|
||||
{ id: 9, name: "plantoeat-recipes-508318_10-13-2023.csv", icon: $globals.icons.codeJson },
|
||||
],
|
||||
}
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
function setFileObject(fileObject: File) {
|
||||
|
@ -16,6 +16,7 @@ from mealie.services.migrations import (
|
||||
MealieAlphaMigrator,
|
||||
NextcloudMigrator,
|
||||
PaprikaMigrator,
|
||||
PlanToEatMigrator,
|
||||
TandoorMigrator,
|
||||
)
|
||||
|
||||
@ -52,6 +53,7 @@ class GroupMigrationController(BaseUserController):
|
||||
SupportedMigrations.nextcloud: NextcloudMigrator,
|
||||
SupportedMigrations.paprika: PaprikaMigrator,
|
||||
SupportedMigrations.tandoor: TandoorMigrator,
|
||||
SupportedMigrations.plantoeat: PlanToEatMigrator,
|
||||
}
|
||||
|
||||
constructor = table.get(migration_type, None)
|
||||
|
@ -10,6 +10,7 @@ class SupportedMigrations(str, enum.Enum):
|
||||
paprika = "paprika"
|
||||
mealie_alpha = "mealie_alpha"
|
||||
tandoor = "tandoor"
|
||||
plantoeat = "plantoeat"
|
||||
|
||||
|
||||
class DataMigrationCreate(MealieModel):
|
||||
|
@ -3,4 +3,5 @@ from .copymethat import *
|
||||
from .mealie_alpha import *
|
||||
from .nextcloud import *
|
||||
from .paprika import *
|
||||
from .plantoeat import *
|
||||
from .tandoor import *
|
||||
|
117
mealie/services/migrations/plantoeat.py
Normal file
117
mealie/services/migrations/plantoeat.py
Normal file
@ -0,0 +1,117 @@
|
||||
import asyncio
|
||||
import csv
|
||||
import tempfile
|
||||
import zipfile
|
||||
from pathlib import Path
|
||||
|
||||
from slugify import slugify
|
||||
|
||||
from mealie.pkgs.cache import cache_key
|
||||
from mealie.services.scraper import cleaner
|
||||
|
||||
from ._migration_base import BaseMigrator
|
||||
from .utils.migration_alias import MigrationAlias
|
||||
from .utils.migration_helpers import scrape_image, split_by_comma
|
||||
|
||||
|
||||
def plantoeat_recipes(file: Path):
|
||||
"""Yields all recipes inside the export file as dict"""
|
||||
with tempfile.TemporaryDirectory() as tmpdir:
|
||||
with zipfile.ZipFile(file) as zip_file:
|
||||
zip_file.extractall(tmpdir)
|
||||
|
||||
for name in Path(tmpdir).glob("**/[!.]*.csv"):
|
||||
with open(name, newline="") as csvfile:
|
||||
reader = csv.DictReader(csvfile)
|
||||
for row in reader:
|
||||
yield row
|
||||
|
||||
|
||||
def get_value_as_string_or_none(dictionary: dict, key: str):
|
||||
value = dictionary.get(key)
|
||||
if value is not None:
|
||||
try:
|
||||
return str(value)
|
||||
except Exception:
|
||||
return None
|
||||
else:
|
||||
return None
|
||||
|
||||
|
||||
class PlanToEatMigrator(BaseMigrator):
|
||||
def __init__(self, **kwargs):
|
||||
super().__init__(**kwargs)
|
||||
|
||||
self.name = "plantoeat"
|
||||
|
||||
self.key_aliases = [
|
||||
MigrationAlias(key="name", alias="Title"),
|
||||
MigrationAlias(key="description", alias="Description"),
|
||||
MigrationAlias(
|
||||
key="recipeIngredient",
|
||||
alias="Ingredients",
|
||||
func=lambda x: [z for z in x.splitlines() if z.strip() and not z.startswith(", ")],
|
||||
),
|
||||
MigrationAlias(key="recipeInstructions", alias="Directions"),
|
||||
MigrationAlias(key="recipeYield", alias="Servings"),
|
||||
MigrationAlias(key="orgURL", alias="Url"),
|
||||
MigrationAlias(key="rating", alias="Rating"),
|
||||
MigrationAlias(key="prepTime", alias="Prep Time"),
|
||||
MigrationAlias(key="performTime", alias="Cook Time"),
|
||||
MigrationAlias(key="totalTime", alias="Total Time"),
|
||||
MigrationAlias(key="tags", alias="Tags", func=split_by_comma),
|
||||
MigrationAlias(key="dateAdded", alias="Created At", func=lambda x: x[: x.find(" ")]),
|
||||
]
|
||||
|
||||
def _parse_recipe_nutrition_from_row(self, row: dict) -> dict:
|
||||
"""Parses the nutrition data from the row"""
|
||||
|
||||
nut_dict: dict = {}
|
||||
|
||||
nut_dict["calories"] = get_value_as_string_or_none(row, "Calories")
|
||||
nut_dict["fatContent"] = get_value_as_string_or_none(row, "Fat")
|
||||
nut_dict["proteinContent"] = get_value_as_string_or_none(row, "Protein")
|
||||
nut_dict["carbohydrateContent"] = get_value_as_string_or_none(row, "Carbohydrate")
|
||||
nut_dict["fiberContent"] = get_value_as_string_or_none(row, "Fiber")
|
||||
nut_dict["sodiumContent"] = get_value_as_string_or_none(row, "Sodium")
|
||||
nut_dict["sugarContent"] = get_value_as_string_or_none(row, "Sugar")
|
||||
|
||||
return cleaner.clean_nutrition(nut_dict)
|
||||
|
||||
def _process_recipe_row(self, row: dict) -> dict:
|
||||
"""Reads a single recipe's row, parses its nutrition, and converts it to a dictionary"""
|
||||
|
||||
recipe_dict: dict = row
|
||||
|
||||
recipe_dict["nutrition"] = self._parse_recipe_nutrition_from_row(row)
|
||||
|
||||
return recipe_dict
|
||||
|
||||
def _migrate(self) -> None:
|
||||
recipe_image_urls = {}
|
||||
|
||||
recipes = []
|
||||
for recipe in plantoeat_recipes(self.archive):
|
||||
if "Title" not in recipe:
|
||||
continue
|
||||
|
||||
if "Photo Url" in recipe:
|
||||
recipe_image_urls[slugify(recipe["Title"])] = recipe["Photo Url"]
|
||||
recipe["image"] = cache_key.new_key(4)
|
||||
|
||||
preprocess_recipe = self._process_recipe_row(recipe)
|
||||
|
||||
recipe_model = self.clean_recipe_dictionary(preprocess_recipe)
|
||||
|
||||
recipes.append(recipe_model)
|
||||
|
||||
results = self.import_recipes_to_database(recipes)
|
||||
|
||||
for slug, recipe_id, status in results:
|
||||
if not status:
|
||||
continue
|
||||
|
||||
try:
|
||||
asyncio.run(scrape_image(recipe_image_urls[slug], recipe_id))
|
||||
except Exception as e:
|
||||
self.logger.error(f"Failed to download image for {slug}: {e}")
|
@ -100,3 +100,20 @@ def import_image(src: str | Path, recipe_id: UUID4):
|
||||
data_service.write_image(src, src.suffix)
|
||||
except UnidentifiedImageError:
|
||||
return
|
||||
|
||||
|
||||
async def scrape_image(image_url: str, recipe_id: UUID4):
|
||||
"""Read the successful migrations attribute and for each scrape the image
|
||||
appropriately into the image directory. Minification is done in mass
|
||||
after the migration occurs.
|
||||
"""
|
||||
|
||||
if not isinstance(image_url, str):
|
||||
return
|
||||
|
||||
data_service = RecipeDataService(recipe_id=recipe_id)
|
||||
|
||||
try:
|
||||
await data_service.scrape_image(image_url)
|
||||
except UnidentifiedImageError:
|
||||
return
|
||||
|
@ -260,7 +260,7 @@ def clean_ingredients(ingredients: list | str | None, default: list | None = Non
|
||||
case [str()]:
|
||||
return [clean_string(ingredient) for ingredient in ingredients]
|
||||
case str(ingredients):
|
||||
return [clean_string(ingredient) for ingredient in ingredients.splitlines()]
|
||||
return [clean_string(ingredient) for ingredient in ingredients.splitlines() if ingredient.strip()]
|
||||
case _:
|
||||
raise TypeError(f"Unexpected type for ingredients: {type(ingredients)}, {ingredients}")
|
||||
|
||||
|
@ -16,6 +16,8 @@ migrations_nextcloud = CWD / "migrations/nextcloud.zip"
|
||||
|
||||
migrations_tandoor = CWD / "migrations/tandoor.zip"
|
||||
|
||||
migrations_plantoeat = CWD / "migrations/plantoeat.zip"
|
||||
|
||||
images_test_image_1 = CWD / "images/test-image-1.jpg"
|
||||
|
||||
images_test_image_2 = CWD / "images/test-image-2.png"
|
||||
|
BIN
tests/data/migrations/plantoeat.zip
Normal file
BIN
tests/data/migrations/plantoeat.zip
Normal file
Binary file not shown.
@ -24,6 +24,7 @@ test_cases = [
|
||||
MigrationTestData(typ=SupportedMigrations.copymethat, archive=test_data.migrations_copymethat),
|
||||
MigrationTestData(typ=SupportedMigrations.mealie_alpha, archive=test_data.migrations_mealie),
|
||||
MigrationTestData(typ=SupportedMigrations.tandoor, archive=test_data.migrations_tandoor),
|
||||
MigrationTestData(typ=SupportedMigrations.plantoeat, archive=test_data.migrations_plantoeat),
|
||||
]
|
||||
|
||||
test_ids = [
|
||||
@ -33,6 +34,7 @@ test_ids = [
|
||||
"copymethat_archive",
|
||||
"mealie_alpha_archive",
|
||||
"tandoor_archive",
|
||||
"plantoeat_archive",
|
||||
]
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user