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: Ability to schedule chores with cron expression HOT 2
- Feature Request: User groups for chores HOT 3
- Feature Request: Edit dates that get used in calculations HOT 4
- Bug: Shelf Life is calculated incorrectly if items are already purchased expired HOT 2
- Bug: Product editing form quantity units HOT 2
- Feature Request: Support filenames with none English chars HOT 1
- Feature Request: Product Barcodes: Allow "no unit" on editing HOT 8
- Feature Request: Deactivate some functions for clarity HOT 1
- Bug: Userentity row invisible (wrongly assigned `d-none`) HOT 5
- Bug: "Only check if any amount is in stock" recipe ingredients: Wrong costs/calories when using deviating QU HOT 3
- Bug: composer tries to install an old version of slim/http and slim/rs7 HOT 1
- Feature Request: print note when opening stock entry label in browser HOT 1
- Feature Request: Stock report / spendings: Keep selected date range when change grouping HOT 2
- Bug: Cannot consume recipe if ingredients with disabled stock fulfillment checking (inventory check) in there (aka how to handle optional ingredients?) HOT 1
- Feature Request: Second home support HOT 1
- Bug: Same ingredient in parent/sub recipe breaks recipe stock fulfillment checking HOT 1
- Feature Request: Consume ingredients for a recipe based on number of servings HOT 1
- Bug: no shoppinglist after install latest docker image HOT 1
- Bug: "This page does not exist" rewrite loop after installation (Debian 12/nginx/PHP 8.x) HOT 3
- Feature Request: Roles for chores HOT 2
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.