Pantry User Guide
|  | Next

# Pantry User Guide

### Omari Norman

Version 23 released Friday, November 09, 2007

Pantry, command-line nutrient analysis.

Version 23, released Friday, November 09, 2007.

Copyright 2007 Omari Norman.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Pantry's "built-in" XML validator is a modified version of xmlproc. xmlproc is Copyright 1998-2000 by Lars Marius Garshol, Oslo, Norway.

All Rights Reserved

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that modified copies are clearly marked as such.

LARS MARIUS GARSHOL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL LARS MARIUS GARSHOL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

List of Examples

2.1. Introducing the --print option
2.2. Using `--print traits`
2.3. Using `--print units`
2.4. Using `--print nuts`
2.5. Two `nuts` reports
2.6. Two `units` reports
2.7. Combining reports
2.8. Using the `blank` report
2.9. Using multiple search options
2.10. Using regular expressions
2.11. A search that has more foods than I am interested in
2.12. Using anchors
2.13. Using the `--exact-match` option
2.14. Changing foods
2.15. Changing the unit trait
2.16. Errors when changing the unit trait
2.17. `qty` may be a fraction or mixed number
2.18. The `facts` nutrient list with 100 grams of bananas
2.19. Specifying a nutrient list
2.20. Using the `sum` report
2.21. Using the `--nutrient-list` option with the `sum` report
2.22. How many groups are in the `master` file?
2.23. Using the --add option
2.24. Using the --edit option
2.25. Using the --delete option
3.1. Searching for apples
3.2. Searching for apples, with the `--group` option
3.3. Searching for apples using a regular expression
3.4. Available units for an apple
3.5. How many calories are in an apple?
3.6. Adding entries to a diary
3.7. Printing nutrient reports about a diary
3.8. Getting totals about a diary
4.1. Pantry does not sort foods
4.2. Using the `--sort` option
4.3. Using --auto-order
4.4. Using --sort with foods that have been automatically ordered
4.5. Using `--auto-order` with only the `date` trait changed
4.6. Traits and available units for an apple
4.7. Using the `measures` report
4.8. Using the `--refuse` option
4.9. Beginning a `.pantryrc.xml` file
4.10. Showing all available nutrients
4.11. `.pantryrc.xml` with new nutrient list
4.12. Using a new nutrient list
4.13. `.pantryrc.xml` with `sort-order` element
4.14. Using the `--by-nut` option
4.15. Using `--by-nut` with Total Fat
4.16. Using `--by-nut` with `--c-unit`
4.17. The closest thing to Stonyfield
4.18. Approximating one food by using another food and the `--by-nut` option
4.19. Using the `--by-cal` option
4.20. Searching for `apple` returns 163 results
4.21. Using the `paste` report
5.1. `foods.xml` file with blank `pantry` element
5.2. `foods.xml` with `food` element
5.3. Food with `nutrients` element
5.4. Complete `foods.xml` file.
5.5. Use a Pantry XML file as you would use a Pantry native file
6.1. A sample Foods Text file
6.2. Using a Foods Text file
6.3. Changing a Foods Text file
7.1. Creating the `recipe` element
7.2. Setting the recipe yield
7.3. A recipe with its `ingredients`
7.4. A recipe's units
7.5. Recipe directions
7.6. Using a Pantry XML file
7.7. Adding a recipe to a Pantry native file
7.8. The `recipe` report
7.9. Using the `recipe` report with other cool stuff

|  | Next
|  | About Pantry