- The
shrimpcomponent is called from/recipe/frontend/server/api/importer.ts, in the handler invoked after a file has been uploaded to S3. shrimpdownloads the file from S3 and selects a handler based on the file name extension. If no handler is found, no further processing takes place.- The handler reads the file and returns the text.
- The text is parsed by scanning for keywords and extracting the text between those that are found.
A
PostRecipeobject is built from the parsed text. - The recipe is validated, then uploaded to the database.
docxMS WordodtOpen Office / Libre Officepdftxt
New formats can be added by writing a handler and adding it to loader.ts