mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-24 15:49:42 +02:00
feat: Remove OCR Support (#2838)
* remove ocr package * remove tesseract * remove OCR from app * remove OCR from tests * fix docs
This commit is contained in:
parent
c48680374d
commit
ca9f66ee24
34 changed files with 29 additions and 1570 deletions
|
@ -38,7 +38,6 @@ const routes = {
|
|||
recipesCategory: `${prefix}/recipes/category`,
|
||||
recipesParseIngredient: `${prefix}/parser/ingredient`,
|
||||
recipesParseIngredients: `${prefix}/parser/ingredients`,
|
||||
recipesCreateFromOcr: `${prefix}/recipes/create-ocr`,
|
||||
recipesTimelineEvent: `${prefix}/recipes/timeline/events`,
|
||||
|
||||
recipesRecipeSlug: (recipe_slug: string) => `${prefix}/recipes/${recipe_slug}`,
|
||||
|
@ -159,15 +158,6 @@ export class RecipeAPI extends BaseCRUDAPI<CreateRecipe, Recipe, Recipe> {
|
|||
return `${routes.recipesRecipeSlugExportZip(recipeSlug)}?token=${token}`;
|
||||
}
|
||||
|
||||
async createFromOcr(file: File, makeFileRecipeImage: boolean) {
|
||||
const formData = new FormData();
|
||||
formData.append("file", file);
|
||||
formData.append("extension", file.name.split(".").pop() ?? "");
|
||||
formData.append("makefilerecipeimage", String(makeFileRecipeImage));
|
||||
|
||||
return await this.requests.post(routes.recipesCreateFromOcr, formData);
|
||||
}
|
||||
|
||||
async updateLastMade(recipeSlug: string, timestamp: string) {
|
||||
return await this.requests.patch<Recipe, RecipeLastMade>(routes.recipesSlugLastMade(recipeSlug), { timestamp })
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue