Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More user guide #77

Merged
merged 6 commits into from
Oct 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 82 additions & 13 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
# DietBook User Guide

## Introduction
DietBook is a desktop application targeting NUS students living on campus, optimized for use via a **Command Line Interface**. Not only can DietBook track and show the user's food and nutritional intake, it also provides users with a list of commonly eaten food items around and outside NUS.

* Table of Contents
{:toc}

DietBook is a desktop application targeting NUS students optimized for use via a **Command Line Interface**. Not only can DietBook track and show the user's food and nutritional intake, it also provides users with a list of commonly eaten food items around and outside NUS.

## Quick Start
1. Ensure that you have Java 11 or above installed.
1. Download the latest version of `dietbook.jar` from [here](https://github.com/AY2021S1-CS2113-T14-4/tp/releases).
1. Copy the file to the folder you want to use as the home folder for your DietBook.
1. Either double-click the jar file to start the application or navigate to the folder containing the jar file on command prompt and run the command `java -jar dietbook.jar`.
1. For first time users:
1. A CLI similar to the one shown on the picture below should appear within a few seconds.
1. For existing user:
1. A CLI similar to the one shown on the picture below should appear within a few seconds.
1. Refer to the Features section below for more details of each command.
1. A CLI, similar to the one shown below, should appear within a few seconds. Follow the instructions provided to setup DietBook or refer to [name](#Entering username: `name`) and [info](#Entering user information: `info`) for more detailed explanations.<br/>
![DietBook Welcome Message](/images/DietBookWelcomeMessage.PNG)
1. Start using DietBook by typing any valid command and pressing Enter to execute it.
1. Refer to the [Features](#Features) section below for more details of each command.

## Features

Expand All @@ -33,13 +35,78 @@ e.g. For `add n/FOOD_NAME x/PORTION_SIZE`, `add n/mee x/1` and `add x/1 n/mee` a
e.g. `help` is a valid command but `Help` is not.<br/>
e.g. For `add n/FOOD_NAME x/PORTION_SIZE`, `add n/mee x/1` is valid but `add N/mee x/1` is not.

* Spaces to separate command words, parameters, command word and parameters are important.<br/>
e.g. For `calculate all`, `calculate all` is valid but `calculateall` is not.<br/>
* A single spacing to separate command words, parameters, command word and parameters is required.<br/>
e.g. For `calculate all`, `calculate all` is valid but `calculateall` and `calculate` &nbsp; &nbsp; &nbsp; &nbsp; `all`is not.<br/>
e.g. For `delete INDEX`, `delete 1` is valid if there is a food item with index 1 but`delete1` is not.<br/>
e.g. For `add n/FOOD_NAME x/PORTION_SIZE`, `add n/mee x/1` is valid but `add n/meex/1` is not.<br/>

### Features related to user information

#### Entering username: `name`

Stores the user's name into DietBook during the initial setup.

Format: `name YOUR_NAME`

* The name given must not be empty.
* This command is **only used when setting up DietBook for the first time**. Any subsequent editing of the name can be done using the [editinfo](#Editing user information: `editinfo`) command.

Example of usage:

* `name Tom and Jerry`<br/>
* `name Jack`

Output example for usage example 2:
```
Hi Jack!
Before we get started, I would like to know about about you so that I can make more
accurate calculations for you :). Therefore, could you please share with me the following:
- Your gender either F for female or M for male or O for others.
- Your age which is a positive integer.
- Your height in cm.
- Your original weight in kg, the weight when you first started using DietBook or you current weight.
- Your current weight in kg.
- Your target weight in kg, or your current weight if that is also your target weight.
- Your activity level, represented by a number from 1 to 5.
1 = You hardly engage in any exercise or have a job that requires little to no physical activity.
2 = You engage in some form of light exercise or have a job that requires some physical activity.
3 = You engage in moderate amount of exercise or have a job that requires moderate physical activity.
4 = You engage in vigorous exercise or have a physically demanding job.
5 = You engage in extremely vigorous exercise or have an extremely physically demanding job.

Please input your details in the following format:
info g/GENDER a/AGE h/HEIGHT o/ORIGINAL_WEIGHT c/CURRENT_WEIGHT t/TARGET_WEIGHT l/ACTIVITY_LEVEL
Example: info g/F a/21 h/165 o/65 c/65 t/55 l/2
```

#### Entering user information : `info`

Stores the user's personal information into DietBook during the initial setup.

Format: `info g/GENDER a/AGE h/HEIGHT o/ORIGINAL_WEIGHT c/CURRENT_WEIGHT t/TARGET_WEIGHT l/ACTIVITY_LEVEL`

* This command is **only used when setting up DietBook for the first time**. Any subsequent editing of user information can be done using the [editinfo](#Editing user information: `editinfo`) command.
* The gender must be either **`M` for male, `F` for female or `O` for others**.
* The age must be a positive integer **from 0 to 150, inclusive**.
* The height in cm must be a positive integer **from 1 to 300, inclusive**.
* The original, current and target weight in kg must be a positive integer ***from 1 to 500, inclusive**.
* The activity level must be a positive integer **from 1 to 5, inclusive**.
* 1 = You hardly engage in any exercise or have a job that requires little to no physical activity.
* 2 = You engage in some form of light exercise or have a job that requires some physical activity.
* 3 = You engage in moderate amount of exercise or have a job that requires moderate physical activity.
* 4 = You engage in vigorous exercise or have a physically demanding job.
* 5 = You engage in extremely vigorous exercise or have an extremely physically demanding job.

Example of usage:

* `info g/M a/21 h/175 o/85 c/85 t/75 l/2` stores the user's gender, age, height, original, current and target weight as well as the activity level to `male`, `21`, `175`, `85`, `85`, `75` and `You engage in some form of light exercise or have a job that requires some physical activity.` respectively.

Output example:
```
Thank you! DietBook has been initialised and you may start by entering any valid commands.
If you require a list of valid commands, you can enter: help
```

#### Viewing user information: `userinfo`

Shows the user information stored in DietBook.
Expand Down Expand Up @@ -70,9 +137,9 @@ Format: `editinfo [n/NAME] [g/GENDER] [a/AGE] [h/HEIGHT] [o/ORIGINAL_WEIGHT] [c/
* Existing values will be updated to the input values.
* The name must not be empty.
* The gender must be either **`M` for male, `F` for female or `O` for others**.
* The age must be a positive integer **between 0 and 150**.
* The height must be a positive integer **between 0 and 300**.
* The original, current and target weight must be a positive integer **between 0 and 500**.
* The age must be a positive integer **from 0 to 150, inclusive**.
* The height must be a positive integer **from 1 to 300, inclusive**.
* The original, current and target weight must be a positive integer **from 1 to 500, inclusive**.
* The activity level must be a positive integer **from 1 to 5, inclusive**.
* 1 = You hardly engage in any exercise or have a job that requires little to no physical activity.
* 2 = You engage in some form of light exercise or have a job that requires some physical activity.
Expand Down Expand Up @@ -166,5 +233,7 @@ Example of usage:

Action | Format, Examples
---- | ----
userinfo | `userinfo`
editinfo | `[n/NAME] [g/GENDER] [a/AGE] [h/HEIGHT] [o/ORIGINAL_WEIGHT] [c/CURRENT_WEIGHT] [t/TARGET_WEIGHT] [l/ACTIVITY_LEVEL]` <br/> e.g.,`editinfo c/75 l/4`
Enter name | **Note**: Used only when setting up DietBook for the first time.<br/>`name YOUR_NAME` <br/> e.g.,`name Jack`
Enter info | **Note**: Used only when setting up DietBook for the first time.<br/>`info g/GENDER a/AGE h/HEIGHT o/ORIGINAL_WEIGHT c/CURRENT_WEIGHT t/TARGET_WEIGHT l/ACTIVITY_LEVEL` <br/> e.g.,`info g/M a/21 h/175 o/85 c/85 t/75 l/2`
View user info | `userinfo`
Edit user info | `editinfo [n/NAME] [g/GENDER] [a/AGE] [h/HEIGHT] [o/ORIGINAL_WEIGHT] [c/CURRENT_WEIGHT] [t/TARGET_WEIGHT] [l/ACTIVITY_LEVEL]` <br/> e.g.,`editinfo c/75 l/4`
Binary file added docs/images/DietBookWelcomeMessage.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.