Access to External Data Sources: Open Food Fact

333 views
Skip to first unread message

Alessandro DETOMMASO

unread,
May 21, 2023, 7:36:30 AM5/21/23
to mementodatabase
I ask you for a big help.

I use Memento database a lot and I manage a huge amount of data of different types; so much so that this need is driving me to study database development environments (but the road is still long).

I often find myself creating lists of data that I could actually simply retrieve from the WEB through the APIs of some Open Data services.

For example, one of these is Open Food Fact (https://world.openfoodfacts.org/)

This highly community-supported project maintains a database of hundreds of thousands of commercial products across the world market.

So learning how to make API calls to one of these External Data Sources would drastically reduce database management time and the amount of data that the App stores.

"Memento Database" I saw that it is a very versatile software (that's why I continue to use it even if my needs grow).

In its "Autofill" function it allows you to add calls to External Data Sources by inserting a specific script for the API Request.

For me it would be a great growth to be able to integrate and implement this function in my projects.


If any of you could give me some pointers on how I can approach achieving this result, I would be really grateful.

The specific site of the Open Food Fact API documentation is this:

https://openfoodfacts.github.io/api-documentation/

(I have to study it too!!! :-D )


I apologize if my English is unclear... I'll improve on this too!!!

Thanks again! 🙏

Er Mo

unread,
May 21, 2023, 9:11:23 AM5/21/23
to mementodatabase
Hallo
Auch meine Muttersprache ist nicht Englisch , Ich lasse alles Übersetzen . Ich habe schon Erfahrung mit API in Memento einbinden . Habe Daten in eine Bibliothek mittesl API erstellen lassen . Habe eine Bibliothek für die Beta 5.0 Version die die Wetterdaten holt und anzeigt . Wenn sie Betatester sind können sie die Bibliothek nutzen und Stutiren .

Hello
English isn't my mother tongue either, I have everything translated. I already have experience with embedding API in Memento. I had data created in a library using an API. Have a library for the beta 5.0 version that fetches and displays the weather data. If you are a beta tester you can use the library and study .


Ernst

Bill Crews

unread,
May 21, 2023, 12:29:26 PM5/21/23
to Er Mo, mementodatabase
How did you create the entries that are later to be filled?


--
You received this message because you are subscribed to the Google Groups "mementodatabase" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mementodataba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mementodatabase/ba299dcc-f19f-45e9-ad96-deff476e17e6n%40googlegroups.com.

Alessandro DETOMMASO

unread,
May 21, 2023, 5:41:50 PM5/21/23
to mementodatabase
Thanks Ernst,

I verified your library and the idea is very interesting.
Unfortunately, however, the only thing I can view are the fields related to the "weather", "temperature" and "location".

I can't find no access scripts to outdoor data sources.
I also tried to insert a new item to check if the autofill function is detected; it does not work.

Perhaps it depends on the permits set on the library, I can't tell you.

If you know where I can find some documentation useful to work with this function it would be fine.

Thank you again for your availability!

Alessandro DETOMMASO

unread,
May 21, 2023, 5:49:00 PM5/21/23
to mementodatabase
Hi Bill,

below is the link with the main fields of the library. I made a copy with an English version, unfortunately the original one I could not upload to the cloud because there are too many entries.


However, I list the main fields below:

  • Barcode (barcode)
  • Article Name (text)
  • Description (text)
  • Picture (image)
  • Store (link to entry)
  • Brand (link to entry)
  • Bulk product (checkbox)
  • Cost €/Kg (currency)

of course, if necessary, I will adapt the fields according to the contents of the JSON keys of the external data source.

Thanks also to you for your helpfulness.

Er Mo

unread,
May 22, 2023, 2:20:14 PM5/22/23
to mementodatabase
Hallo
Wenn du die Skripte sehen willst, musst du die Bibliothek kopieren . Das ist Freigegeben .Die Kopie ist dann bearbeitbar und du muss vieleicht der NEUEN Bibliothek die Berechtigung für " Netzwerk " geben . Sonst sende ich die den Text .

Hello
If you want to see the scripts you have to copy the library. This is Shared. The copy will then be editable and you may need to give the NEW library "Network" permissions. Otherwise I will send you the text.

Ernst

pa po

unread,
Dec 25, 2023, 3:43:46 AM12/25/23
to mementodatabase
Hallo, ich versuche ebenfalls daten von Open Food Fact mittels Barcode in felder einer Datenbank einzulesen. Hat da jemand schon ein Skript ?

Hello, I am also trying to read data from Open Food Fact into fields of a database using barcodes. Does anyone already have a script?

Er Mo

unread,
Dec 25, 2023, 6:21:46 AM12/25/23
to mementodatabase
Hallo
Wenn du den Inhalt des Coudes kennst kann ich die was Machen .

Hello
If you know the contents of the code I can do something about it.

Ernst

pa po

unread,
Dec 25, 2023, 6:39:39 AM12/25/23
to mementodatabase
Vermutlich ist es gar nicht so schwierig, wenn man sich damit auskennt:-). Die Beschreibung ist sicher gut, allerdings sind weder meine Englisch Kenntnisse noch meine javascript Kenntnisse ausreichend...
Ich hatte versucht das DISCOGS Skript anzupassen - aber wie gesagt...
Vielleicht findest Du hier etwas:

It's probably not that difficult if you're familiar with it:-). The description is certainly good, but neither my English skills nor my javascript skills are sufficient...
I tried to adapt the DISCOGS script - but as I said...
Maybe you can find something here:

Tutorial on using the Open Food Facts API - Product Opener (Open Food Facts Server) 


Vielen Dank, und schöne Feiertage.
Reply all
Reply to author
Forward
0 new messages