NUT-Nutrition Software

If you're watching your weight, monitoring your health and dietary habits, or simply unconvinced by flashy food labels that don't tell the whole story, this is the project for you. According to the Web site:

I have written open-source free nutrition software, NUT, which records what you eat and analyzes your meals for nutrient levels in terms of the "Daily Value", or DV, which is the standard for food labeling in the US. The program uses the free food composition database from the USDA. This free nutritional analysis software was written for UNIX systems (I use Linux), but it can be compiled on just about any system with a C compiler. (To get a free C compiler, Windows people might look at Cygwin or MinGW, and Mac people might look at xcode.) By experimenting with NUT, you can find the optimal level of the various nutrients and how to implement this with foods available to you. NUT can help reconstruct the lost instruction manual to your care and feeding, because, when the authorities and crackpots disagree on the proper human diet, you can design an experiment using the food composition tables to discover the truth!

NUT has an extensive database of food statistics, worth the price of admission alone (console version pictured).

The NUT GUI makes using this program much less tiresome and displays other forms of information simultaneously. Here's the stats for bearded seal oil.

One of the main reasons for using NUT is recording your daily meals and then running detailed analysis against them.

Installation

I'm unsure of other distributions, but binaries are available for Debian and Ubuntu. I run with the usual source option here. Grab the latest source tarball, extract it, and open a terminal in the new folder. At the time of this writing, NUT didn't have an install script, so you'll need to do a number of steps manually. Assuming the /usr/local folders are fine for installation, issue the following commands as root:

 # mkdir /usr/local/lib/nut/ # mv raw.data/* /usr/local/lib/nut/ 

If your distro uses sudo (such as Ubuntu), simply prefix those commands with the sudo command.

Once this step is out of the way, compile the program with:

 $ make 

If the compiling goes well, you should be able to use the console program immediately. Simply enter the command:

 $ ./nut 

This runs the console program, which I look at in the next session. As for the GUI program, that needs to be compiled separately.

Change into the flkt directory by entering:

 $ cd fltk 

And again, enter the command:

 $ make 
______________________

John Knight is the New Projects columnist for Linux Journal.

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Notes on the installation

wmihalo's picture

The NUT installation simply required a make followed by a sudo make install.
I also encountered a problem compiling Nut. It errored out on the make. I am currently running Fedora 15 and after a yum search fltk, I did:

sudo yum install fltk-devel fltk-static fltk fltk-fluid

I don't think I needed fltk-fluid. At any rate, the Nut make worked without any problems. Afterwards, I did a sudo make install and Nut was able to launch without any problems.

Thanks for writing an excellent review.

Webcast
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers

Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.

Learn More

Sponsored by AMD

White Paper
Red Hat White Paper: Using an Open Source Framework to Catch the Bad Guy

Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6

Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.

Learn more about catching the bad guy in this free white paper.

Learn More

Sponsored by DLT Solutions