|pantry [options...] [collection...]|
pantry copies foods from collections into a buffer. All foods are copied, unless one or more --search options are specified, in which case only foods that match the patterns of every --search option are copied. pantry then changes every food in the buffer using any --change options specified as well as any options for changing nutrients, available units, and ingredients.
If --edit or --delete is specified, pantry deletes the unchanged foods from the corresponding original collections. If --edit is specified, pantry adds changed foods to corresponding original collections.
If --print REPORT is specified, buffer is printed using REPORT Buffer is unsorted unless one or more --key TRAIT is specified. Sorting may be affected by one or more --list options.
If --add COLLECTION is specified, each food in the buffer is added to COLLECTION.
pantry communicates with a pantryd server, see pantryd(1).
TRAIT is any one of:
TRAIT names may be abbreviated.
PATTERN is an extended regular expression, unless --ignore-case is on.
Most options other than file and server control options may appear on the command line more than once; the effect of multiple options is cumulative.
File and server control
--open filenameClose currently open database and open filename
--read filenameAppend contents of filename to currently open database
--closeClose currently open database
--saveSave currently open database
--save-as filenameSave currently open database under a different filename
--quitShut down server
--statusDisplay server status and database information: names of collections in database and the number of foods in each collection, and what filename will be used if --save option is used
--search TRAIT PATTERN, -s TRAIT PATTERNInclude in buffer only foods whose TRAIT matches PATTERN.
Changing food traits
--change TRAIT string, -c TRAIT stringChange TRAIT string. If TRAIT is unit, string is a pattern that must match exactly one of the food's available units. If TRAIT is quantity or unit, string must be convertible to a non-negative number. If TRAIT is percent-refuse, string must be convertible to a number between 0 and 100, inclusive.
--refuse, -rReduce food quantity by percent refuse.
Changing nutrients, available units, and
--change-nut string numberChange nutrient whose name is string to number.
--rename-nut pattern stringRename nutrient whose name matches pattern to string.
--delete-nuts PATTERNDelete all nutrients matching PATTERN.
--change-avail-unit string numberChange available unit whose name is string to number.
--rename-avail-unit pattern stringRename available unit whose name matches pattern to string.
--delete-avail-units PATTERNDelete all available units matching PATTERN.
--add-ingredients COLLECTIONAdd ingredients from COLLECTION.
--delete-ingredients PATTERNDelete ingredients whose name trait matches PATTERN.
Search and edit options
--ignore-case, -iAll patterns are case insensitive.
--exact-match, -xAll patterns must exactly match their subjects (turns off regular expressions).
--editEdit foods in place
--deleteDelete matching foods
--createCreate a new food from scratch. When this option is used, Pantry does not copy foods from any collections specified on the command line, and the --edit and --delete options are ignored.
--limit numberLimit number of foods in buffer to number
--print report, -p reportPrint report (see "Reports" section below)
--key TRAIT, -k TRAITUse TRAIT as a sorting key. If the first letter of TRAIT is lowercase, sort in ascending order; if the first letter of TRAIT is uppercase, sort in descending order.
--goal nutrient-name amount, -g nutrient-name amountAdd a nutrient intake goal for use by the nutrient-related reports, where nutrient-name is the nutrient for which you wish to add a goal, and amount is a string, convertible to a non-negative number, that is the amount of the goal.
--list TRAIT string, -l TRAIT stringAdd string to the list of strings that will be used when TRAIT is used as a sorting key. When TRAIT is equal to one of these values, it will be sorted in the order specified.
Adding results to collections
--add COLLECTION, -a COLLECTIONAdd buffer to COLLECTION.
--auto-order, -oWhen adding each food to collections specified with --add, pantry will search the collection for other foods with identical date and meal traits. The result will be sorted in ascending order by the order trait. If the highest food's order trait matches the regular expression ^[0-9]4$, then pantry will take the highest food's order trait, remove any leading zeroes, remove the last digit, and increment the result by one. The result is multiplied by ten, and then is left-padded with zeroes so that it is four characters long. pantry will then change the order trait of the food to the result before adding it to the collection.
If there are no foods with identical date and meal traits, then pantry will set the food's order trait to 0010.
--help, -hDisplay brief help.
--version, -vDisplay Pantry version.
--copyrightDisplay copyright information.
Two types of reports are available. Food reports are printed once per food in the buffer. Summary reports are printed once for the entire buffer. To print more than one report, use multiple --print options. Report names may be abbreviated with an unambiguous specification of the first letters of the report. The following reports are available:
infoAll traits other than the name, yield, and instructions.
yield and instructions traits, and the recipe's ingredients. Ingredients are sorted according to their order traits.
unitsAvailable units. g, oz, and lb are not printed as these are available for every food.
pasteEach food name, printed with one available unit per line; quoted so that output may be easily pasted into subsequent pantry commands.
blankA blank line
nutsAll of a food's nutrients
goalsNutrients for which there is a goal specified with --goal
groupsNumber of foods in each food group, as specified by each food's group trait
NutsSum of all nutrients in the buffer
GoalsSum of all nutrients in the buffer for which there is a --goal
PANTRY_SOCKETIf this environment variable is specified, pantry will use the path contained therein as the filename of the socket where it will attempt to connect to the pantryd server. PANTRY_SOCKET should contain the entire path (beginning with / ) and filename, not just the directory for the socket. The server must have already been started with an identical value in its PANTRY_SOCKET environment variable.
If this environment variable is not specified, pantry will attempt to connect to a server at the socket named $HOME/.pantrySocket.
Please help find them. Report bugs to <firstname.lastname@example.org>.
Pantry has known limitations; see the Pantry User Guide for details.
Copyright © 2007-2008 Omari Norman
|Pantry 32||PANTRY (1)||Saturday, March 14, 2009|