3.3. Organizing your foods into files

3.3.1. A quick file

As you've seen from our numerous examples, sometimes the names of foods can get fairly long. Furthermore, because the good people at USDA are so industrious, a search for something seemingly simple in the master file can turn up numerous results. For instance, pantry --ignore-case --name milk --group dairy --print names master returns 64 foods. You probably don't want to type Milk, reduced fat, fluid, 2% milkfat, with added vitamin A every time you have some milk.

One excellent solution for this problem is to keep copies of foods you eat frequently in a separate, smaller file--perhaps quick. If you know that there is only one food in your quick file that contains milk, you can just search for pantry --ignore-case --name milk quick instead. You can even change the names of foods using --c-name, so Milk, reduced fat, 2% milkfat, with added vitamin A can become simply Milk 2% if that's what you want.

To make this really easy, change the foods in your quick so that the quantity and unit traits are already set to those you use most frequently.

You could also make changes to the master file itself, but I prefer to leave this file untouched and store my frequently-eaten foods in a different file.

3.3.2. Organizing diary files

If you want to keep track of what you eat, Pantry is flexible in where you store the foods you eat. You can choose to keep all the foods you ever eat in a single file. However, to make any sense of such a file, you may find that you have to enter date and meal traits for every food you enter. As we've seen, that can require a lot of typing.

But remember, Pantry is flexible. You can instead decide to keep a separate file for each day, or a separate file for each meal. You can of course sort these into directories however you see fit. Remember that pantry is flexible and can search and print results from more than one file at a time.

If you do decide to keep a lot of foods in one file, the pantry-addTo program can help you, as we will discuss in a later section.