Grocery app with OCR recognition

Posted on
  • Hey,

    I got my Bangle 2 last week and I really love it :) For my first app I wanted to do something practical. My grandma sends me a (handwritten) shopping list every week and I thought it would be really cool to semi-automatically send it to my watch. I modified the Grocery app by Dimitri Gigot and added OCR capabilities. I found a nice API to do the job (https://rapidapi.com/serendi/api/pen-to-­print-handwriting-ocr). You get 100 API calls a month for free.

    I recorded a little preview:

    You can check out the code here: https://github.com/fapeg/BangleApps/tree­/master/apps/groceryaug

    Can I/should I upload it to the official repo? I'm not sure since I'm using an external API.

    You can try it out here: https://fapeg.github.io/BangleApps/?id=g­roceryaug

  • excellent !

  • Wow, that looks great!

    Normally I have no problem with including apps that use a third party API, but in this case I'm a little concerned that the 100/month API limit would run out too quickly - I think very soon the app wouldn't be usable by anyone :(

    It's a real shame though - I wonder if there's a JS-only option. There is https://antimatter15.com/ocrad.js/demo.h­tml but it seems (at least from the demo!) like it won't do anything like as good a job as what you found!

  • @nicoboss @Gordon thanks! :)

    @Gordon it prompts you for the first time for your API key and saves it in local storage, so my key is not uploaded in the repository. Would that be okay if I create a Readme on how to register for your own API key and use the app?

  • I may be missing the point but aren't 100 grocery lists by month quite enough, unless you need 3 times a day, every day, to go to the shop ? ;-)

  • Haha yeah of course ;) I think Gordon was referring to uploading the API key into the repository so that it would be the same one for all Bangle users. But like I said, I wouldn't do that, everyone would have to create their own key.

  • ok, got it
    As I did create mine as well, I missed the sharing point Gordon was suggesting
    The Readme could be really usefull though

  • it prompts you for the first time for your API key and saves it in local storage, so my key is not uploaded in the repository. Would that be okay if I create a Readme on how to register for your own API key and use the app?

    Ahh, sorry - misunderstood. Then yes, this looks like a great idea to have in the app store!

    Rather than having a mostly duplicated app, does it make sense to just combine this with the normal Grocery app customizer so there's a new way to import grocery lists?

  • Hm, it works a little differently since I don't have quantities. And I'd rather keep the code simple. So if it's ok I will look into creating a pull request for the separate app in the next few days

  • @Gordon @fapeg aside topic, which is almost unrelated, but the API key request is not done in the WebBLE app on iOS. I only managed to get this pop-up showing to insert the key in the other browser versions

  • Idea: if the first word of a line is a number then that value is the quantity. Does it make sense?

  • @nicoboss Thanks, I could change it to a form field and not a Javascript prompt.
    @Alessandro To be honest, I kind of don't like the idea of quantities as an extra property anyways because you can just write it in the normal text. It complicates things and I really don't see an added value.

  • Thanks, I could change it to a form field and not a Javascript prompt.

    Nice ! Thank you

  • I finally made the API field mobile-friendly, you can find the app now in the app loader :)
    https://banglejs.com/apps/?q=groceryaug

  • Using the API you mentioned sounds like a great way to implement OCR in your app, and it's awesome that you get 100 API calls a month for free.
    It's always exciting to see new apps with innovative features like this, and I think it could be really useful for people who have trouble reading their own handwriting or for those who want to keep their shopping lists on their watch. And who knows, it might inspire others to try their hand at creating something new with Smart Engines OCR or other OCR tools.
    Thanks for sharing your work, and I wish you all the best with your app development!

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Grocery app with OCR recognition

Posted by Avatar for fapeg @fapeg

Actions