ridicurious.com
Powershell

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

SCRIPT 

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

Author of “PowerShell Guide to Python“, “Windows Subsystem for Linux (WSL)” and currently writing the most awaited book: “PowerShell to C# and Back” !


Subscribe to our mailing list

* indicates required

Related posts

How to Check Alexa Ranking using PowerShell

Prateek Singh
6 years ago

PowerShell : Spell checking and Rectifying Spelling Mistakes

Prateek Singh
8 years ago

Optical Character Recognition in Azure Cloud Shell under 2 mins

Prateek Singh
6 years ago
Exit mobile version