By: W17-1
Since: Feb 2019
Licence: MIT
If you would like to get use the Food Diary straightaway, jump to the Section 2, “Quick Start” to get started
What is the Food Diary?
The Food Diary (FD) is a desktop app for storing your personal food reviews and obtain food recommendations based on your past reviews.
Why use the Food Diary?
FD is optimized for those who prefer to work with a Command Line Interface (CLI) while still having the benefits of a Graphical User Interface (GUI). If you can type fast, FD can get your foodie tasks done faster than traditional GUI apps. Additionally, FD also stores your data locally, ensuring that your privacy is protected.
Some of the features that can look forward to:
-
Keeping track of restaurants you’ve visited.
-
Getting an aggregate rating over all your visits.
-
Finding out about new restaurants near you for your next gastronomical adventure!
Callout
Callouts are boxes with important information regarding the usage of the Food Diary. These 3 callouts are used throughout our User Guide.
ℹ️
|
This is a note. A warning indicates important additional information that should be read. |
💡
|
This is a tip. A tip indicates good to know information that would improve your user experience |
|
This is a warning. A warning indicates critical information that would affect the functionality of this programme. |
-
Ensure you have Java version
9
or later installed in your Computer. -
Download the latest
fooddiary.jar
here. -
Copy the file to the folder you want to use as the home folder for your Food Diary.
-
Double-click the file to start the app. The GUI should appear in a few seconds.
-
Type the command in the command box and press Enter to execute it.
e.g. typinghelp
and pressing Enter will open the help window. -
Some example commands you can try:
-
listRestaurants
: lists all restaurants -
addReview
n/MCDONALDS r/4 m/delicious
: adds a review to MCDONALDS with rating 4 with the comment "delicious" -
delete
3
: deletes the 3rd restaurant shown in the index -
exit
: exits the app
-
-
Refer to Section 3, “Features” for details of each command.
Command Format
-
Words in
UPPER_CASE
are the parameters to be supplied by the user e.g. inadd n/RESTAURANT_NAME
,RESTAURANT_NAME
is a parameter which can be used asadd n/Burger King
. -
Items in square brackets are optional.
-
Items with
…
after them can be used multiple times including zero times e.g.[t/TAG]…
can be used ast/friend
,t/friend t/family
etc. -
Parameters can be in any order e.g. if the command specifies
n/RESTAURANT_NAME r/STAR_RATING
,r/STAR_RATING n/RESTAURANT_NAME
is also acceptable.
Add a restaurant that is not found in the current list of restaurants.
Format: add n/RESTAURANT_NAME a/ADDRESS c/CUISINE
Edit the details of a restaurant identified by the index number used in the listRestaurants.
Format: edit INDEX [n/RESTAURANT_NAME] [a/ADDRESS] [c/CUISINE]
-
The index refers to the index number shown in the displayed restaurants list.
-
The index must be a positive integer
1, 2, 3, …
Examples:
-
listRestaurants
`editRestaurant 2 n/MACS `
Change the name of the second restaurant in the list to MACS.
Delete a restaurant that is in the current list of restaurants.
Format: delete INDEX
-
Deletes the restaurant at the specified
INDEX
. -
The index refers to the index number shown in the displayed restaurants list.
-
The index must be a positive integer 1, 2, 3, …
Examples:
-
delete 1
Deletes the 1st restaurant in the Food Diary.
Shows a list of all restaurants in the Food Diary with an option to filter for certain property.
Format: list [n/RESTAURANT_NAME] [a/ADDRESS] [c/CUISINE]
Examples:
-
list
Return all the restaurants
Examples:
-
list
Return all the restaurants
Shows a list of all restaurants that hasn’t been reveiwed by you, ranked based on the proximity to a given postal code.
Format: listUnvisited po/POSTAL_CODE
ℹ️
|
Calculation of proximity is based on postal codes. If no postal code or an invalid postal code is provided for a restaurant, it will appear at the bottom of the list. |
Examples:
-
listUnvisited
po/267951
Return all the restaurants that has no reviews ranked based on the proximity to a given postal code
💡
|
If you simply want to view unreviewed restaurants, enter listUnvisited po/000000
|
Select a restaurant based on its index on the list and display information about it.
Format: select INDEX
-
The index refers to the index number show in the displayed restaurants list.
-
The index must be a positive integer
1, 2, 3, …
Examples:
-
select 3
Selects the restaurant in the displayed restaurants list with index 3 and displays its summary, reviews and website.
Figure 1. Before selecting any restaurant
Figure 2. After selecting restaurant with index 3, Chilis' summary, reviews and website are displayed in the second, third and fourth panels (from left to right) respectively.
Note:
-
Placeholder for Restaurant Summary panel after changes to the Food Diary has been made will be coming in v1.4
-
Details of the restaurant in the Restaurant Summary beyond a certain length will be cut off. This will be dealt with in v1.4.
Set the cuisine of a restaurant identified by the index number used in the listRestaurants.
Format: setCategories INDEX [c/CUISINE] [o/OCCASION] [p/PRICE_RANGE]
-
The index refers to the index number show in the displayed restaurants list.
-
You need to ensure that the index entered must be a positive integer
1, 2, 3, …
-
You need to ensure that the
Price Range
entered must only consist of 1-5$
characters. e.g.$
,$$$
,$$$$$
is okay but$$$$$$
,cheap
or$expensive
will be rejected. -
You need to ensure that Cuisine and Occasion must only contain alphanumeric characters and spaces.
-
You do not need to worry about capitalization. Cuisine and Occasion will be autocapitalized. e.g.
fast food
andpremium casual
will be capitalized toFast Food
andPremium Casual
.fAST fOOD
will be converted intoFast Food
.
Examples:
-
listRestaurants
setCategory 2 c/Fine Dining o/Wedding p/$$$$$
Set the categories of the second restaurant in the list toFind Dining
for cuisine,Wedding
for occasion and$$$$$
for price range.
Note:
-
setCategory for
Cuisine
,Occasion
andPrice Range
supported as of v1.3 -
Autocomplete feature planned for v1.4
Filters and lists the restaurants with categories matching the keywords entered.
Format: filter KEYWORD [MORE_KEYWORDS]
-
You do not need to worry about case. Filtering is case insensitive. e.g.
fast food
will matchFast Food
-
You do not need to be concerned about which categories you want to filter. Filtering works across categories. e.g.
japanese
will match all restaurants withCuisine
set asJapanese
orPrice Range
set as$$$$
. Note this also means that the more keywords you add, the more general the filter becomes. -
You can enter keywords in any order.
$ casual
is the same ascasual $
. Both will match restaurants that hasPrice Range
as$
orOccasion
asCasual
. -
You can filter multiple categories of the same type. e.g.
japanese western
will match bothJapanese
andWestern
cuisine restaurants. AllJapanese
andWestern
restaurants will be displayed. -
You must enter words in full. e.g.
fas foo
will not matchfast food
-
Restaurants matching at least one keyword will be displayed. e.g.
fast food
will matchhawker food
Examples:
-
filter fast food
Returns restaurants withCuisine
orOccasion
matchingfast
orfood
-
filter fast food casual
Returns restaurants withCuisine
orOccasion
matchingfast
,food
orcasual
-
filter $
Returns restaurants withPrice Range
matching$
-
filter $ casual western
Return restaurants withCuisine
,Occasion
orPrice Range
matching$
,casual
orwestern
3.2.4. Display the website of a restaurant identified by the index number used in the listRestaurants based on its weblink.
Format: visitWeb INDEX
-
The index refers to the index number shown in the displayed restaurants list.
-
The index must be a positive integer 1, 2, 3, …
Format: visitWeb URL
This allows users to visit website of any restaurant before they are entered into the list of restaurants in the FoodDiary
.
The purpose of this feature is so that users can reference from restaurants website when adding details of the restaurant into FoodDiary
-
A URL is a valid link to a website. It should be in this format: local-part.domain and adhere to the following contraints:
-
The local-part should only contain alphanumeric characters and these special characters, excluding the parentheses, (!#$%&'*+/=?`{|}~^.-)
-
This is followed by a '.' and then a domain name. The domain name must:
-
be at least 2 characters long
-
start and end with alphanumeric characters
-
consist of alphanumeric characters, a period or a hyphen for the characters in between, if any.
-
-
Examples:
-
list
visitWeb 1
Displays webpage of Restaurant at index 1 of list. -
visitWeb www.jollibee.com.ph Displays webpage of Jollibee
Adds a review to the Food Diary
Format: addReview INDEX re/ENTRY rr/RATING
-
Adds the review to the restaurant specified by the
INDEX
. The index refers to the index number of the restaurant of the currently displayed list of restaurants.. The index must be a positive integer 1, 2, 3, … -
ENTRY is a text field that include both alphabets and numbers.
-
RATING is a number that has to be a value from 0-5 inclusive. It represents a score out of 5 that is assigned to the restaurant with the added review.
-
Both fields (ENTRY and RATING) are compulsory and must be provided. There are no default values that either will take should the field be unspecified.
Examples:
-
addReview 2 re/Peach Pie was amazing rr/4
Edit selected fields in a specified entry.
Format: editReview INDEX [re/ENTRY] [rr/RATING]
-
Edits the review at the specified
INDEX
. The index refers to the index number of the review of the selected Restaurant. The index must be a positive integer 1, 2, 3, … -
A restaurant must be selected with a mouse click on the desired restaurant card (see screenshots below for an illustration)
-
At least one of the optional fields (either ENTRY or RATING) must be provided.
-
Existing values will be updated to the input values.
Steps to execute editReview command:
-
From the main screen of the application, first select a restaurant by clicking on it with the mouse.
The above screenshot shows the case when no restaurant is selected. Upon selecting a restaurant, the reviews of the restaurant will show on the review panel, and the rightmost browser panel will show the webpage of the restaurant (if available) :
-
Following the above, enter the command:
-
Upon successful execution of the command:
Examples:
-
edit 1 rr/3
Edits the rating of the 1st review to be 3. -
edit 2 re/Food isn’t the best
Edits the comment of the second review to "Food isn’t the best" -
edit 2 re/Food isn’t the best
rr/4
Edits the comment of the second review to "Food isn’t the best" and the rating to be 4.
Deletes the review from the Food Diary.
Format: deleteReview INDEX
-
Deletes the review at the specified
INDEX
. The index refers to the index number of the review of the selected Restaurant. The index must be a positive integer 1, 2, 3, … -
The index refers to the index number shown in the displayed reviews list.
-
The index must be a positive integer 1, 2, 3, …
Examples:
-
deleteReview 2
Deletes the 2nd review of the selected Restaurant in the Food Diary.
Format: help
==== Personalising your food diary with your name: name
Personalise your foodDiary with your name
Format: name n/YourName
Examples:
-
name n/Jack The Sheep
Set the cuisine of a restaurant identified by the index number used in the listRestaurants.
Format: view
Examples:
view
View personalised statistics for John Doe. You have a total of 7 reviews and a total of 11 restaurants.
-
Example of profile statistics is shown below:
Q: How do I transfer my data to another Computer?
A: Install the app in the other computer and overwrite the empty data file it creates with the file that contains the data of your previous Food Diary folder.
Q: How do I return to default screen?
A: Enter the command list
to show all the restaurants.
Restaurant
Class
-
add :
add n/RESTAURANT_NAME a/ADDRESS c/CUISINE
e.g.add n/Nana Thai food a/561 Clementi Road c/Thai
-
edit :
edit INDEX [n/RESTAURANT_NAME] [a/ADDRESS] [c/CUISINE]
e.g.listRestaurants
editRestaurant 2 n/MACS
-
delete :
delete INDEX
e.g.delete 1
-
list :
list [n/RESTAURANT_NAME] [a/ADDRESS] [c/CUISINE]
e.g.list n/MacDonalds
-
listUnvisited :
listUnvisited
e.g.listUnvisited
-
setCategory :
setCategory INDEX [c/CUISINE] [o/OCCASION] [p/PRICE_RANGE]
e.g.listRestaurants
setCategory 2 c/Fine Dining o/Wedding p/expensive
-
filter :
filter KEYWORD [MORE_KEYWORDS]
e.g.filter fast food gathering
-
visitWeb :
visitWeb INDEX
e.g.list
visitWeb 1
Review
Class
-
addReview :
addReview INDEX re/ENTRY rr/RATING
e.g.addReview 2 re/Peach Pie was amazing rr/4
-
editReview :
edit INDEX [r/STAR_RATING] [m/COMMENT]
e.g.edit 2 rr/Food isn’t the best
-
deleteReview :
deleteReview INDEX_RESTAURANT INDEX_REVIEW
e.g.delete 3 1
FoodDiary
Class
-
name :
name n/YourName
e.g.name n/JackTheSheep
-
view :
view
e.g.view
Miscellaneous
-
help :
help
-
exit :
exit