{"id":15566853,"url":"https://github.com/aquilax/nutriscore","last_synced_at":"2025-03-29T05:15:31.653Z","repository":{"id":57645181,"uuid":"440918977","full_name":"aquilax/nutriscore","owner":"aquilax","description":"Go library for calculating the Nutri-Score of foods and beverages.","archived":false,"fork":false,"pushed_at":"2021-12-23T12:15:09.000Z","size":10,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-03T14:50:13.827Z","etag":null,"topics":["go","golang","library","nutriscore","nutrition"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aquilax.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-12-22T16:26:27.000Z","updated_at":"2021-12-23T12:15:14.000Z","dependencies_parsed_at":"2022-09-08T15:10:15.223Z","dependency_job_id":null,"html_url":"https://github.com/aquilax/nutriscore","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aquilax%2Fnutriscore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aquilax%2Fnutriscore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aquilax%2Fnutriscore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aquilax%2Fnutriscore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aquilax","download_url":"https://codeload.github.com/aquilax/nutriscore/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246140591,"owners_count":20729802,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","golang","library","nutriscore","nutrition"],"created_at":"2024-10-02T17:07:32.308Z","updated_at":"2025-03-29T05:15:31.615Z","avatar_url":"https://github.com/aquilax.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nutriscore [![Go Reference](https://pkg.go.dev/badge/github.com/aquilax/nutriscore.svg)](https://pkg.go.dev/github.com/aquilax/nutriscore)\n\nGo library for calculating the Nutri-Score\n\nBased on https://www.santepubliquefrance.fr/content/download/150263/file/2021_07_21_QR_scientifique_et_technique_V41_EN.pdf\n\n## Usage\n\n```go\npackage nutriscore_test\n\nimport (\n\t\"fmt\"\n\n\tns \"github.com/aquilax/nutriscore\"\n)\n\nfunc ExampleGetNutritionalScore() {\n\tns := ns.GetNutritionalScore(ns.NutritionalData{\n\t\tEnergy:              ns.EnergyFromKcal(0),\n\t\tSugars:              ns.SugarGram(10),\n\t\tSaturatedFattyAcids: ns.SaturatedFattyAcidsGram(2),\n\t\tSodium:              ns.SodiumMilligram(500),\n\t\tFruits:              ns.FruitsPercent(60),\n\t\tFibre:               ns.FibreGram(4),\n\t\tProtein:             ns.ProteinGram(2),\n\t}, ns.Food)\n\tfmt.Printf(\"Nutritional score: %d\\n\", ns.Value)\n\tfmt.Printf(\"NutriScore: %s\\n\", ns.GetNutriScore())\n\t// Output:\n\t// Nutritional score: 2\n\t// NutriScore: B\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faquilax%2Fnutriscore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faquilax%2Fnutriscore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faquilax%2Fnutriscore/lists"}