Nutrition Label

Sharp Cooking now displays nutrition labels

Sharp Cooking has reached its fourth anniversary! To mark this significant milestone, we’re thrilled to introduce a highly anticipated feature: Nutrition Labels. Now, not only can you input nutrition values manually, but recipes imported from websites supporting nutrition values will also display them in the recipe view. To generate these labels, we first need to gather the nutritional data for each recipe. Fortunately, many websites offer this information, and recipe-scrapers, the python package utilized by Sharp Cooking to extract recipes from the web, already supports it too....

March 26, 2024 · 2 min · LPains
JavaScript code

Converting sharp-recipe-parser from typescript to javascript + jsdoc

Introduction I should start by saying that I am a big proponent of TypeScript. I have been using it since version 1.5 back in 2015. Coming from a backend background with typed languages, not having types in JavaScript was an interesting experience for me. As a developer, the two aspects of typed languages that help me the most are intellisense and the compiler. Intellisense helps me write code faster, and the compiler helps me catch errors before runtime....

January 1, 2024 · 6 min · LPains
Self destruct

Self destructing data with Cosmos DB

I am working on a share feature for Sharp Cooking that will allow users to share recipes online. This is the first time a feature will require storing data outside of the local app context, and Cosmos DB is a great option for implementing it. First, it provides a free tier that should be sufficient for my users. Second, Sharp Cooking already stores recipes as documents in the browser, so it should be easy to send the same data to Cosmos DB....

August 25, 2023 · 2 min · LPains
Recipe UOMs

Introducing sharp-recipe-parser

For almost four years now, I have maintained the Sharp Cooking app. From the beginning, one of the features I wanted to provide was ingredient UOM conversion. In version 1.4 of the app, a preview of the UOM conversion feature was made available. In this post, I will describe the process and how it was achieved. Before we get into UOM conversion, we first need to break down an ingredient line into its components....

August 5, 2023 · 3 min · LPains
Recipe Book

Using OCR to scan recipes into Sharp Cooking

Sharp Cooking app can currently import recipes directly from websites and backup files, making it easy to create a personal collection of recipes. However, it does not currently provide an option to scan recipes from a book or an image. This has been a long-requested feature that I am now attempting to add to the app, and will document the experience in this post. How? The first thing that comes to mind when trying to extract text from images is OCR....

March 12, 2023 · 9 min · LPains