Comments (3)
This is now also done - I added a kind of plugin like system to lookup products by barcodes, see the reference implementation of such a plugin in data/plugins/DemoBarcodeLookupPlugin.php
In short:
Via the REST API at /api/stock/external-barcode-lookup/123456 products can be looked up by barcode via the configured plugin.
Additionally when also ?add=true is provided, on a successful lookup the product is also added to the database and in the output the new product id is included.
Direct link to the API documentation: https://demo-en.grocy.info/api#/Stock/get_stock_external_barcode_lookup__barcode_
Maybe this works for you...
:)
from grocy.
Yes, it would better to establish a modular way.
The API of opengtindb.org is not free, right. But all datasets are licensed under GNU. Some times ago i build a wrapper for this website to extract all neccesarry data out of the source code.
If you provice a plugin api for grocy, i would create a plugin for opengtindb.org.
Edit: https://github.com/gruessung/IntelliFridge/blob/master/eanApi.php
from grocy.
It seems that the API of opengtindb.org is not free and also only available for commercial purposes.
When doing this, it would be best to do it in an "plugin like" way, not hardcode to a specific service...
The information to get would be currently only the name and the quantity unit (would need a mapping to own quantity units).
When the major bunch of products are added to the database, from my personal experience with grocy in nearly 1 year daily use, it's not a big problem:
- I keep generic named products only in my database (means for example I only have "Chocolate", although I buy it from different brands)
- To a product multiple barcodes can be assigned (different brands of chocolate...)
- Assigning unknown barcodes and creating products can be directly done in a kind of "workflow" during purchase scanning (a popup appears when you leave the product input field when something unknown was entered)
from grocy.
Related Issues (20)
- Feature Request: Automatic Number Format Recognition HOT 1
- Feature Request: Shopping list dropdown on /shoppinglist: Show the number of items per shopping list HOT 1
- Feature Request: Simplify adding items on /shoppinglist HOT 3
- Bug: Last price should ignore `0` (or `null`) prices HOT 9
- Feature Request (very minor): Meal plan item button order consistency HOT 1
- Feature Request: "Add to shopping list" from context menu: Default shopping list HOT 3
- Re-enable PHP 8.1 support HOT 1
- Feature Request: full inventory management system HOT 1
- Bug: /data/grocy/viewcache/fbf71db0bf421e50b4f55fb6c45f4d10.php:254 HOT 1
- Bug: Modals with no height HOT 1
- Bug: Copying item does not copy value of "Move on open" checkbox
- Feature Request: Set "Desired Servings" to recipe servings by default HOT 5
- Bug: Modal dialogs empty / too small (this time in Chrome/Edge) HOT 8
- Feature Request: Transfer a specific stock entry from its current location instead of product's default location HOT 1
- Feature Request: Unidirectional unit conversions/abstract units HOT 3
- Bug: HOT 3
- Feature Request: Allow filenames with non-ASCII characters HOT 1
- Feature request: Fridge camera with ai object recognition HOT 1
- Bug: SQLSTATE[HY000]: General error: 1 duplicate column name: qu_id_consume HOT 3
- Bug: Android App crashes when adding a new product group HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grocy.