Your Mother’s Favourite Cookbook (YMFC) is a desktop app for managing recipes, designed for use through the Command Line Interface (CLI). YMFC can help you manage all your recipes with ease, using the simplicity of the CLI. It can also keep track of what ingredients you have on hand, and recommend recipes based on what you can make with them.
YMFC
from here.Terminal
on Linux and macOS, Command Prompt
on Windows).cd
command to navigate to the proper directory.java -jar YMFC.jar
in the command line terminal to launch YMFC.bye
to exit YMFC.The Recipes are stored in the cookbook database while Ingredients are stored in the inventory database
new
command, which will be described later[JAR File Location]/data/cookbook.txt
.[JAR File Location]/data/inventory.txt
.UPPER_CASE
, then it means it is to be substituted for the user’s desired phrase
n/NAME
, the user is to replace “NAME” with another word/phrase of their liking
such as n/ABC Soup
.lowercase
letter, then it must be used as it is and cannot be substituted
s/name
, the command must be typed exactly as shown.[PARAMETER]
means that the parameter in question is optional to add in the command.
n/NAME [t/TEST]
can be used as n/JohnDoe t/YAYYY
or as n/JohnDoe
PARAMETER...
means that there can be multiple of that parameter.
help
, list
, listI
, sortI
, random
, recommend
and bye
.help me
would have the same results as help
. THIS IS INTENDED.helpme
without the space in-between would be rejected, and fail to execute the help
command.help
Format: help
Lists out all the available commands and their proper format for use.
bye
Format: bye
Will end the program and close the app.
add
Format: Format: add n/NAME i/INGREDIENTS... sn/STEPn... [c/CUISINE] [t/TIME]
Adds a new recipe to YMFC’s cookbook.
t/TIME
before c/CUISINE
, sn/STEPn
before i/INGREDIENTS
,… will all be considered invalid.c/CUISINE
and t/TIME
parameters are optionalt/TIME
parameter should be a positive integern
in sn/STEP
is the step number.
n
starts from 1 and counts up by 1 for every additional stepExample of usage:
add n/Ramen Eggs i/eggs i/soya sauce i/water s1/boil eggs for 6.5 min s2/cool eggs in ice bath c/Japanese t/4
add n/Grilled Cheese Sandwhich i/bread i/cheese slice i/butter s1/heat pan with butter s2/grill bread on pan,
and add cheese on top s3/remove from grill after 3 minutes
Expected Outcome:
__________________________________________________________________________________
Okie dokie, one more recipe for me:
Recipe: Ramen Eggs
Ingredients:
- eggs
- soya sauce
- water
Steps:
1. boil eggs for 6.5 min
2. cool eggs in ice bath
Cuisine: Japanese
Time taken: 4
You currently have 1 recipe in your list.
__________________________________________________________________________________
__________________________________________________________________________________
Okie dokie, one more recipe for me:
Recipe: Grilled Cheese Sandwhich
Ingredients:
- bread
- cheese slice
- butter
Steps:
1. heat pan with butter
2. grill bread on pan, and add cheese on top
3. remove from grill after 3 minutes
You currently have 2 recipes in your list.
__________________________________________________________________________________
Format: list
Lists out all the recipes currently stored in YMFC’s cookbook.
Format: sort s/name
Sorts all the stored recipes alphabetically by name, from ‘a’ to ‘z’ Entire command MUST be in lowercase
Format: sort s/time
Sorts all the stored recipes by time taken, from lowest to highest Entire command MUST be in lowercase
Format: find [OPTIONS/]KEYWORDS
Looks through the stored recipes in the cookbook to find those with matching names/steps/ingredients.
KEYWORDS
can’t be blank, and is case-sensitive.OPTIONS
could be any combination of “n” (by recipe name), “i” (by ingredients) and “s” (by steps).
find ni/egg
[!TIP] If
OPTIONS
were not provided, the command will find recipes based on recipe name by default.
- E.g:
find ramen
More examples:
1) find i/egg
: Find recipes which have the ingredients consist of “egg”.
2) find ns/spaghetti
: Find recipes which have “spaghetti” in name or steps.
3) find sn/spaghetti
: Same results as (ii).
4) find nis/tomato
: Find recipes which have “tomato” anywhere.
5) find isn/tomato
: Same results as (iv).
Example of usage:
find i/eggs
Expected Outcome:
__________________________________________________________________________________
Here's everything that I've found so far:
1. Recipe: Ramen Eggs
Ingredients:
- eggs
- soya sauce
- water
Steps:
1. boil eggs for 6.5 min
2. cool eggs in ice bath
Cuisine: Japanese
Time taken: 4
__________________________________________________________________________________
Total: 1 recipes found!
__________________________________________________________________________________
Format: edit e/NAME [n/NAME] [i/INGREDIENTS...] [sn/STEPn...] [c/CUISINE] [t/TIME]
Will find the recipe of the entered name and change its parameters to the newly entered parameters.
e/NAME
, leaving any of the optional parameters out of the command means
the existing parameters of that type is untouched
c/CUISINE
to your command if you
wish to keep the cuisine parameter of the recipe unedited).e/NAME
refers to the current name of the recipe you wish to editn/NAME
refers to the new name you wish to rename the recipe toi/INGREDIENTS...
refers to the new list of ingredients for the recipe
sn/STEPn...
refers to the new list of steps for the recipe
c/CUISINE
refers to the new cuisine you wish to edit the recipe to have
c/
) will delete the existing cuisine parameter of the recipet/TIME
refers to the new time taken you wish to edit the recipe to have
t/
) will delete the existing time parameter of the recipeExample of usage:
edit e/Grilled Cheese Sandwhich i/bread i/mayonaise i/cheese slice i/butter s1/heat pan with butter
s2/spread mayonaise on outside of bread s3/grill bread on pan, and add cheese on top
s4/remove from grill after 3 minutes
Expected Outcome:
__________________________________________________________________________________
You got it boss, I have edited your recipe for Grilled Cheese Sandwhich to:
Recipe: Grilled Cheese Sandwhich
Ingredients:
- bread
- mayonaise
- cheese slice
- butter
Steps:
1. heat pan with butter
2. spread mayonaise on outside of bread
3. grill bread on pan, and add cheese on top
4. remove from grill after 3 minutes
__________________________________________________________________________________
Format: delete n/NAME
Will find the recipe of the entered name and delete it from YMFC’s cookbook, and the name must be exact
NOTE: This action is not reversible
Example of usage:
delete n/Ramen Eggs
Expected Outcome:
__________________________________________________________________________________
Aww, I shall begrudgingly let go of this recipe:
Ramen Eggs
You currently have 1 recipe in your list.
__________________________________________________________________________________
Format: new n/INGREDIENT
Adds a new ingredient to your inventory
NOTE: Ingredients can only be added one at a time
Example of usage:
new n/Eggs
Expected Outcome:
__________________________________________________________________________________
I'll add that to your inventory:
Eggs
You currently have 1 ingredient in your inventory.
__________________________________________________________________________________
Format: listI
Lists out all of your available ingredients in your inventory
Format: findI INGREDIENT
Search through your inventory list based on the ingredient name given
Format: deleteI n/INGREDIENT
Will find the ingredient of the entered name and delete it from YMFC’s inventory, and the name must be exact
NOTE: This action is not reversible
Format: sortI
Sorts all the stored ingredients within the inventory alphabetically by name, from ‘a’ to ‘z’
Format: random
Picks a recipe from the cookbook at random and displays it
Format: recommend
Find recipes that share common ingredients with what is in your ingredients inventory. Recipes are then recommended from having the highest percentage of shared common ingredients to the least.
Q: How do I transfer my data to another computer?
A: Copy the data folder containing cookbook.txt and inventory.txt, and paste it in your other computer in the same directory where YMFC.jar is located
Q: Can I edit the .txt files directly?
A: Yes, but you must ensure that the format of how recipes and ingredients are saved is followed. If there are irregular lines in the save files, YMFC will discard them upon launch.
Command | Usage |
---|---|
help |
List out all the available commands and their usage |
bye |
Terminate the program |
list |
List out all the existing recipes in the cookbook |
add n/NAME i/INGREDIENTS... sn/STEPn... [c/CUISINE] [t/TIME] |
Add a new recipe to the cookbook |
sort s/name |
Sort the recipes alphabetically by name. Entire command must be in lowercase. |
sort s/time |
Sort the recipes by time, from least to most. Entire command must be in lowercase. |
find [OPTIONS/]KEYWORDS |
Look for the KEYWORDS in recipes section (provided by OPTIONS )(Find in recipe name by default) |
edit e/NAME [n/NAME] [i/INGREDIENTS...] [sn/STEPn...] [c/CUISINE] [t/TIME] |
Edit an existing recipe in the cookbook |
delete n/NAME |
Delete the recipe of that name from the cookbook |
new n/INGREDIENT |
Add a new ingredient to your inventory |
listI |
List out all your current ingredients in the inventory |
findI INGREDIENT |
Search the inventory with input ingredient name |
deleteI n/INGREDIENT |
Delete the ingredient from inventory of that name |
sortI |
Sort the ingredients in the inventory alphabetically by name |
random |
Display a randomly-chosen recipe from cookbook |
recommend |
Display all recipes that share common ingredients with what’s available in the inventory |