mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-08-05 05:25:26 +02:00
feat (WIP): bring png OCR scanning support (#1670)
* Add pytesseract * Add simple ocr endpoint replace extension argument * feat/ocr-editor gui * fix frontend linting issues * Add service unit tests * Add split text modes & single ingredient/instruction editing * make split mode really reactive * Remove default step and ingredient * make the linter haappy * Accept only image uploads * Add automatic recipe title suggestion * Correct regex * fix incorrect array.map method usage * make the linter happy again * Swap route to use asset name * Rearange buttons * fix test data * feat: Allow making image the recipe image * Add translation * Make the linter happy * Restrict function setPropertyValueByPath generic * Restrict template literal type * Add a more friendly icon to creation page * update poetry lock file * Correct sloppy ocr classes * Make MyPy happy * Rewrite safer tests * Add tesseract to backend test CI container dependencies * Make canvas element a component global * Remove unwanted spaces in selected text * Add way to know if recipe was created with ocr * Access to ocr-editor for ocr recipes * Update Alembic revision * Make the frontend build * Fix scrolling offset bug * Allow creation of recipes with custom settings * Fix rebasing mistakes * Add format_tsv_output test * Exclude the tests data directory only * Enforce camelCase for frontend functions * Remove import of unused component * Fix type and class initialization * Add multi-language support * Highlight words in mount * Fix image ratio bug * Better ocr creation page * Revert awkward feature to scroll in Selection mode * Rebasing alembic migrations sux * Remove obsolete getShared function * Add function docstring * Move down ocr creation option * Make toolbar icons more generic * Show help at the bottom of the page * move ocr types to own file * Use template ref for the canvas * Use i18n.tc to get strings directly * Correct naming mistake * Move Ocr editor to own directory * Create Ocr Editor parts * Safeguard recipe properties access * Add loading frontend animation due to longer request time * minor cleanup chores Co-authored-by: Miroito <alban.vachette@gmail.com>
This commit is contained in:
parent
a8f3922907
commit
39adea4ee3
44 changed files with 1659 additions and 34 deletions
|
@ -248,7 +248,8 @@
|
|||
"trim-prefix-description": "Trim first character from each line",
|
||||
"split-by-numbered-line-description": "Attempts to split a paragraph by matching '1)' or '1.' patterns",
|
||||
"import-by-url": "Import a recipe by URL",
|
||||
"create-manually": "Create a recipe manually"
|
||||
"create-manually": "Create a recipe manually",
|
||||
"make-recipe-image": "Make this the recipe image"
|
||||
},
|
||||
"page": {
|
||||
"404-page-not-found": "404 Page not found",
|
||||
|
@ -660,5 +661,34 @@
|
|||
"info_message_with_version": "This is a Demo for version: {version}",
|
||||
"demo_username": "Username: {username}",
|
||||
"demo_password": "Password: {password}"
|
||||
},
|
||||
"ocr-editor": {
|
||||
"ocr-editor": "Ocr editor",
|
||||
"selection-mode": "Selection mode",
|
||||
"pan-and-zoom-picture": "Pan and zoom picture",
|
||||
"split-text": "Split text",
|
||||
"preserve-line-breaks": "Preserve original line breaks",
|
||||
"split-by-block": "Split by text block",
|
||||
"flatten": "Flatten regardless of original formating",
|
||||
"help": {
|
||||
"selection-mode": "Selection Mode (default)",
|
||||
"selection-mode-desc": "The selection mode is the main mode that can be used to enter data:",
|
||||
"selection-mode-steps": {
|
||||
"draw": "Draw a rectangle on the text you want to select.",
|
||||
"click": "Click on any field on the right and then click back on the rectangle above the image.",
|
||||
"result": "The selected text will appear inside the previously selected field."
|
||||
},
|
||||
"pan-and-zoom-mode": "Pan and Zoom Mode",
|
||||
"pan-and-zoom-desc": "Select pan and zoom by clicking the icon. This mode allows to zoom inside the image and move around to make using big images easier.",
|
||||
"split-text-mode": "Split Text modes",
|
||||
"split-modes": {
|
||||
"line-mode": "Line mode (default)",
|
||||
"line-mode-desc": "In line mode, the text will be propagated by keeping the original line breaks. This mode is useful when using bulk add on a list of ingredients where one ingredient is one line.",
|
||||
"block-mode": "Block mode",
|
||||
"block-mode-desc": "In block mode, the text will be split in blocks. This mode is useful when bulk adding instructions that are usually written in paragraphs.",
|
||||
"flat-mode": "Flat mode",
|
||||
"flat-mode-desc": "In flat mode, the text will be added to the selected recipe field with no line breaks."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue