openfoodfacts / openfoodfacts-server

Open Food Facts database, API server and web interface - 🐪🦋 Perl, CSS and JS coders welcome 😊 For helping in Python, see Robotoff or taxonomy-editor
http://openfoodfacts.github.io/openfoodfacts-server/
GNU Affero General Public License v3.0
647 stars 374 forks source link

Create script to generate "Made of" taxonomy entries in all languages for all countries #5991

Open teolemon opened 2 years ago

teolemon commented 2 years ago
en:Made in Italy, product of Italy
ca:Fet a Itàlia
cs:Vyrobeno v Itálii
da:Fremstillet i Italien
de:Hergestellt in Italien
es:Fabricado en Italia, Producido en Italia
fi:Valmistettu Italiassa
fr:Fabriqué en Italie
he:נוצר באיטליה
hu:Olaszországban készült
it:Prodotto in Italia, fatto in Italia
nl:Geproduceerd in Italië
pl:Wyprodukowano we Włoszech
pt:Feito na Itália
sv:Tillverkad i Italien
th:ผลิตในอิตาลี
country:en:Italy
label_categories:en: en:Geographic label
github-actions[bot] commented 2 years ago

This issue is stale because it has been open 90 days with no activity.

chiragksharma commented 2 years ago

Hey I am new to open source contributions. I have so far fetched all the country names from the JSON file:

async function fetchdata(){
    const url = 'https://static.openfoodfacts.org/data/taxonomies/countries.json';
    const response = await fetch(url);
    // Wait until the request is completed
    const datapoints =  await response.json();
    console.log(datapoints);

    return datapoints;
}

fetchdata().then((datapoint)=>{
    for(const item of Object.keys(datapoint)){
        console.log(item)
    }

})