-
Notifications
You must be signed in to change notification settings - Fork 0
Description
An overarching issue that encapsulates the scope of what I want the next OCR app to be. In general, I want to streamline the OCR'ing so I need to jump out to external programs and processes less. Ideally, not at all. I'd also like this version to be compatible with other people really using it to OCR recipes, and have it "just work" as expected.
Requirements
This update will need a new uploads table for tracking User Uploaded files that need to be OCR'ed. Something like:
-- Not Final
CREATE TABLE uploads (
id SERIAL PRIMARY KEY,
user_id integer NOT NULL,
status integer NOT NULL,
file_location varchar NOT NULL,
-- The created recipe from this file
recipe_id integer NULL,
-- Who OCR'ed this file
signed_off_by integer NULL,
-- Note/Communication
user_notes varchar NULL,
platezero_notes varchar NULL,
error_reason varchar NULL,
created_at timestamp without time zone NOT NULL DEFAULT now(),
updated_at timestamp without time zone,
deleted_at timestamp without time zone
);
Files uploaded are given a PENDING status and can be viewed in the user profile. When OCR'ed, the record is updated and connects the original asset to the new recipe, and gives credit to the PlateZero person who did the OCR'ing. If any issue occurs during the process, we can try to communicate back to the person (maybe email is fine), or if no recipe was found, a reason is given and the import "fails".
Flow
On startup, login to PlateZero (or remembers your session) and checks if you are authorized to OCR recipes. Adds a Menu Icon to the MacOS bar that "lights up" when new recipes have been uploaded that need OCRing.
Main page is the list of recipes that need to be OCR'ed. Grouped by user, but remove the user_id for another identifier to increase anonymity. You can use Quick Look to take a... quick look at a file before OCRing. You can archive and link to a recipe or archive and write an error message.
When selecting a recipe to OCR, it brings you to the OCR step. You can always go back to the main list of recipes from this page. You can also select another image to load into the OCR page if a recipe spans multiple images. OCRing works mostly as it currently does, except with the new upgraded Ingredient/Procedure lines. Add in Preheats (try to guess from procedure line text still). Add in Image.
When finished, add in a new step for "preview" the recipe. Show the details as they will roughly appear on PlateZero. The user can press "back" and go back and correct any details. When the recipe looks correct, the user can:
- Create recipe & send email
- Create recipe and delay sending email
- Cancel and go back to recipe selection
Option 2 adds a new "bucketing" feature, allowing you to OCR multiple recipes by the same user. When you decide to bucket recipes, it delays sending an email until you have reached a stopping point and then you send one email containing the links to all the recipes you just OCR'ed. (Bucketing only delays sending the email, the recipes are still created immediately after the OCRing).