diff --git a/apps/groceryaug/ChangeLog b/apps/groceryaug/ChangeLog new file mode 100644 index 000000000..906046782 --- /dev/null +++ b/apps/groceryaug/ChangeLog @@ -0,0 +1,2 @@ +0.01: New App! +0.02: Refactor code to store grocery list in separate file diff --git a/apps/groceryaug/README.md b/apps/groceryaug/README.md index 8b1378917..6b3fa7b2f 100644 --- a/apps/groceryaug/README.md +++ b/apps/groceryaug/README.md @@ -1 +1,6 @@ +Modified version of the Grocery App - lets you upload an image with the products you need to shop - Display a list of product and track if you already put them in your cart. +Uses this API to do the OCR: https://rapidapi.com/serendi/api/pen-to-print-handwriting-ocr +With a free account you get 100 API calls a month. + + diff --git a/apps/groceryaug/app.js b/apps/groceryaug/app.js new file mode 100644 index 000000000..00408abba --- /dev/null +++ b/apps/groceryaug/app.js @@ -0,0 +1,25 @@ +var filename = 'grocery_list_aug.json'; +var settings = require("Storage").readJSON(filename,1)|| { products: [] }; + +function updateSettings() { + require("Storage").writeJSON(filename, settings); + Bangle.buzz(); +} + + +const mainMenu = settings.products.reduce(function(m, p, i){ +const name = p.name; + m[name] = { + value: p.ok, + format: v => v?'[x]':'[ ]', + onchange: v => { + settings.products[i].ok = v; + updateSettings(); + } + }; + return m; +}, { + '': { 'title': 'Grocery list' } +}); +mainMenu['< Back'] = ()=>{load();}; +E.showMenu(mainMenu); diff --git a/apps/groceryaug/groceryaug-icon.js b/apps/groceryaug/groceryaug-icon.js new file mode 100644 index 000000000..33b649647 --- /dev/null +++ b/apps/groceryaug/groceryaug-icon.js @@ -0,0 +1 @@ +E.toArrayBuffer(atob("MDCEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAiAAMAADAAAwAAMAAiAAMAAAAAAAA/8zP/Mz/zM/8z/zM/8zP/Mz/zAAAAAAA////////////////////////zAAAAAAA////////////////////////zAAAAAAA////////////////////////zAAAAAAA////////////////////////zAAAAAAA////////////////////////zAAAAAAA////////////////////////zAAAAAAA////////////////////////zAAAAAAA///MzMzMzMzMzM/////8zP//zAAAAAAA////////////////////////zAAAAAAA////////////////////////zAAAAAAA////////////////////////zAAAAAAA////////////////////////zAAAAAAA///MzMzMzMzMz//////8zP//zAAAAAAA////////////////////////zAAAAAAA////////////////////////zAAAAAAA////////////////////////zAAAAAAA///MzMzMzMzMzM/////8zP//zAAAAAAA////////////////////////zAAAAAAA////////////////////////zAAAAAAA////////////////////////zAAAAAAA////////////////////////zAAAAAAA///MzMzMzMzMz//////8zP//zAAAAAAA////////////////////////zAAAAAAA////////////////////////zAAAAAAA////////////////////////zAAAAAAA////////////////////////zAAAAAAA////////////////////////zAAAAAAA////////////////////////zAAAAAAA////////////////////////zAAAAAAA////////////////////////zAAAAAAA////////////////////////zAAAAAAA////////////////////////zAAAAAAA////////////////////////zAAAAAAA/////////////MzMzMzMzP//zAAAAAAA////////////////////////zAAAAAAA////////////////////////zAAAAAAA////////////////////////zAAAAAAA////////////////////////zAAAAARE////////////////////////zERAAARE////////////////////////zERAAERE////////////////////////zEREAERE////////////////////////zEREAAREzMzMzMzMzMzMzMzMzMzMzMzMzERAAABEREREREREREREREREREREREREREQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==")) diff --git a/apps/groceryaug/groceryaug.html b/apps/groceryaug/groceryaug.html new file mode 100644 index 000000000..beb3848e2 --- /dev/null +++ b/apps/groceryaug/groceryaug.html @@ -0,0 +1,143 @@ + +
+ + + + Enter/change API key +