PantryPal is an all-in-one application designed to help students manage their meals. The application allows users to keep track of their ingredients, automatically generate shopping lists, plan their meals, and store recipes.
PantryPal
from here.java -jar PantryPal.jar
to start the application.Command:
addNewIngredient <ingredient_name> <quantity> <unit> <category>
Example:
addNewIngredient milk 200 ml DAIRY
Description: Adds a new ingredient with a specified quantity and unit to the inventory.
Command:
increaseQuantity <ingredient_name> <quantity>
Example:
increaseQuantity milk 200
Description: Increases the quantity of an existing ingredient by the specified amount.
Command:
decreaseQuantity <ingredient_name> <quantity>
Example:
decreaseQuantity milk 200
Description: Decreases the quantity of an existing ingredient by the specified amount.
Command:
setAlert <ingredient_name> <threshold_quantity>
Example:
setAlert flour 10
Description: Sets a threshold quantity to trigger a low-stock alert for an ingredient.
Command:
viewStock
Description: Displays all current ingredients and their quantities in the inventory.
Command:
viewLowStock
Description: Displays all ingredients that are below their specified low-stock thresholds.
Command:
deleteIngredient <ingredient_name>
Example:
deleteIngredient salt
Description: Removes an ingredient from the inventory.
Command:
convertIngredient <name> <targetUnit>
Example:
convertIngredient Sugar kg
Description: Converts the quantity of the specified ingredient to the target unit.
Command:
viewIngredientsByCategory <category>
Example:
viewIngredientsByCategory CONDIMENTS
Description: Displays all ingredients that belong to the specified category.
PantryPal’s Shopping List feature helps you manage your grocery needs efficiently. You can manually add items, automatically generate a list based on low-stock alerts, edit existing items, and mark items as purchased. This ensures you never miss out on essential ingredients.
Command:
addShoppingItem <ingredient_name> <quantity> <unit>
Example:
addShoppingItem sugar 500 g
Description: Manually adds an item to your shopping list. Use this command when you want to include items not currently flagged by low-stock alerts or if you want to quickly update your list.
Command:
generateShoppingList
Example:
generateShoppingList
Description: Automatically creates a shopping list by comparing your current ingredient stock with preset low-stock alerts from the inventory. It calculates the required quantity for each ingredient that is below its threshold and updates your shopping list accordingly. Note that running this command clears the previous shopping list before generating an updated version.
Command:
removeShoppingItem <ingredient_name>
Example:
removeShoppingItem sugar
Description: Removes a specified item from your shopping list. Use this command if you decide you no longer need to purchase that ingredient.
Command:
viewShoppingList
Example:
viewShoppingList
Description: Displays all items in your shopping list, including index numbers next to each item. This makes it easy to reference items when you need to edit or mark them as purchased.
Command:
editShoppingItem <index> <new_ingredient_name> <new_quantity> <new_unit>
Example:
editShoppingItem 1 milk 250 ml
Description:
Allows you to edit an existing shopping list item by specifying its index (as shown in viewShoppingList
).
Use this command to update the ingredient name, quantity, or unit if your shopping needs change.
Command:
markItemAsPurchased <ingredient_name>
Example:
markItemAsPurchased sugar
Description: Marks an item in your shopping list as purchased. The item will be visually updated (e.g., with a “(Purchased)” tag) so you can easily track which items have already been bought.
Command:
Note that {enter}
means clicking the enter button. Please enter your input line by line.
addRecipe {enter}
<recipe_name> (no whitespace allowed, use _ instead) {enter}
<ingredient_name/exit> (no whitespace allowed, use _ instead) {enter}
<ingredient_quantity> {enter}
<unit_of_measurement> {enter}
<instructions/exit> {enter}
Example:
addRecipe {enter}
fried_egg {enter}
egg {enter}
50 {enter}
g {enter}
exit {enter}
cook egg {enter}
serve egg {enter}
exit {enter}
Description: Add a recipe to the recipe repository. You will be prompted to add the recipe name, the ingredients and their information, and the instructions.
Command:
viewRecipe <recipe_name>
Example:
viewRecipe fried_egg
Description: View a specific recipe’s full information (ingredients and instructions).
Command:
removeRecipe <recipe_name>
Example:
removeRecipe fried_egg
Description: Remove the specified recipe from the recipe repository.
Command:
viewRecipeList
Description: View the name of all the recipes available in the repository.
Command:
addPlan <plan_name>
Example:
addPlan NewPlanName
Description: Adds a new meal plan with the specified name. The plan will be created and can be modified later.
Command:
removePlan <plan_index>
Example:
removePlan 1
Description: Removes the meal plan at the specified index from the list of plans. The plan will be deleted permanently.
Command:
addPlanToDay <plan_index> <day>
Example:
addPlanToDay 1 Monday
Description: Adds the specified meal plan to a specific day of the week. The plan will be associated with that day.
Command:
removePlanFromDay <day>
Example:
removePlanFromDay Monday
Description: Removes the meal plan from the specified day of the week. The plan will no longer be associated with that day.
Command:
addRecipeToPlan <plan_index> <recipe_index> <breakfast/lunch/dinner>
Example:
addRecipeToPlan 1 2 breakfast
Description: Adds a recipe to a specific plan for a specific meal (breakfast, lunch, or dinner). The recipe will be associated with that meal in the plan.
Command:
removeRecipeFromPlan <plan_index> <breakfast/lunch/dinner>
Example:
removeRecipeFromPlan 1 breakfast
Description: Removes a recipe from a specific meal in the meal plan. The recipe will no longer be associated with that meal.
Command:
viewPlan <plan_index>
Example:
viewPlan 1
Description: Displays the details of a specific meal plan, including the recipes associated with each meal (breakfast, lunch, and dinner).
Command:
viewPlanList
Example:
viewPlanList
Description: Displays a list of all the meal plans available in the application. Each plan will be listed with its index number for easy reference.
Command:
viewDayPlan <day>
Example:
viewDayPlan Monday
Description: Displays the meal plan for a specific day of the week. The plan will include the recipes associated with breakfast, lunch, and dinner for that day.
Command:
viewWeekPlans
Example:
viewWeekPlans
Description: Displays the meal plans for the entire week. Each day will show the associated meal plans for breakfast, lunch, and dinner.
Command:
findPlan <keyword>
Example:
findPlan pasta
Description: Searches for meal plans that contain the specified keyword in their names. The application will display all matching plans.
Command:
execute <day>
Example:
execute Monday
Description: Executes the meal plan for a specific day. The application will display the recipes associated with breakfast, lunch, and dinner for that day, allowing you to follow the plan easily.
Command:
help
Description: Displays a list of all available commands and their descriptions.
Command:
unitList
Description: Displays a list of all valid units for ingredients.
Command:
exit
Description: Exits the program.
Q: How do I transfer my data to another computer?
A: To transfer your data to another computer, follow these steps:
data.txt
file in the application’s directory. The file should be located in a folder named data.data.txt
file to a portable storage device or use a file transfer service.data.txt
file.data.txt
with the one you copied from the old computer. Make sure to keep the same file name and location.Q: What should I do if I encounter an error while using the application?
A: If you encounter an error, try the following steps:
help
command to see the list of available commands and their formats.help
exit
unitList
categoryList
addNewIngredient <name> <quantity> <unit> <category>
increaseQuantity <name> <quantity>
decreaseQuantity <name> <quantity>
setAlert <name> <threshold>
viewStock
viewLowStock
deleteIngredient <name>
convertIngredient <name> <targetUnit>
viewIngredientsByCategory <category>
addShoppingItem <name> <quantity> <unit>
generateShoppingList
removeShoppingItem <name>
viewShoppingList
editShoppingItem <index> <new_name> <new_quantity> <new_unit>
markItemAsPurchased <name>
addRecipe
viewRecipe <name>
removeRecipe <name>
viewRecipeList
addPlan <plan_name>
removePlan <plan_index>
addPlanToDay <plan_index> <day>
removePlanFromDay <day>
addRecipeToPlan <plan_index> <recipe_index> <breakfast/lunch/dinner>
removeRecipeFromPlan <plan_index> <breakfast/lunch/dinner>
viewPlan <plan_index>
viewPlanList
viewDayPlan <day>
viewWeekPlans
execute <day>
findPlan <contains>