Get-Nutrient composition of Food Items using Powershell


If you’re Calorie Conscious or by any chance nerd? Then this one is for you 🙂 So how about getting the Nutritional value of a food item from Powershell 😀

nut

HOW IT WORKS :

To make it work we are simply making calls to a REST API of “United States Department of Agriculture” to search your food item and some data wrangling to get the nutrition report.

NOTE : You’ve to just register for a API subscription key from here under ‘gaining access’ section of the page. Once you’re subscribed, place the key in the script (Line-15) and you’ll be able to get-nutrients like in the following animation

get-nutrient

SCRIPT : 

Have fun exploring this script and find some time to show-off to your friends 😉

Prateek Singh

 

Advertisements

5 thoughts on “Get-Nutrient composition of Food Items using Powershell

  1. Hi, I’m kind of new to powershell but i’m enjoying learning and using it.
    About that, your blog is pretty cool, tons of valuable informations for a beginner like me, thanks !

    About the Get-Nutrient cmdlet, do you think there is a way to do the same thing but with this site : “https://informationsnutritionnelles.fr/”

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s