Skip to content

Commit

Permalink
Add user guide
Browse files Browse the repository at this point in the history
  • Loading branch information
GraceZhuXY committed Mar 1, 2023
1 parent 2ad1540 commit ce0c807
Show file tree
Hide file tree
Showing 3 changed files with 133 additions and 18 deletions.
135 changes: 122 additions & 13 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,138 @@
# User Guide
# Duke: User Guide

Duke is a personal assistant chatbot that is designed to keep track of various tasks using a Command Line Interface.

## Quick start

```
Loading previously saved data...
Hi, I'm Duke!
What's up?
```

1. Ensure you have Java 11 or above installed in your Computer.
2. Download the latest `Duke.jar` from the Releases page.
3. Copy the file into the desired folder.
4. Using a command terminal, navigate into the folder, and run the command `java -jar Duke.jar`. You should see the above welcome message displayed. Note that Duke may load data from previously saved tasks first.
5. Type in a command and press Enter to execute it.

## Features

### Feature-ABC
### Command format

* Words in `UPPER_CASE` are parameters supplied by the user. e.g. in `todo TASK_DESCRIPTION`, `TASK_DESCRIPTION` is a parameter which can be used as `todo make coffee`.
* Parameters must be specified in the order indicated.

### Available commands

#### Adding a todo task: `todo`

Adds a todo task to the task list.

Format: `todo TASK_DESCRIPTION`

Description of the feature.
Examples:
* `todo homework`
* `todo make coffee`

### Feature-XYZ
#### Adding a deadline task: `deadline`

Description of the feature.
Adds a deadline task to the task list, which includes a specified end timing.

## Usage
Format: `deadline TASK_DESCRIPTION /by END_TIMING`

### `Keyword` - Describe action
Examples:
* `deadline assignment submission /by 2359`
* `deadline project work /by sometime next week`

Describe the action and its outcome.
#### Adding an event task: `event`

Example of usage:
Adds an event task to the task list, which includes a specified start and end timing.

`keyword (optional arguments)`
Format: `event TASK_DESCRIPTION /from START_TIMING /to END_TIMING`

Expected outcome:
Examples:
* `event lecture /from 1200 /to 1400`
* `event holidays /from today /to hopefully forever`

Description of the outcome.
#### Listing all tasks: `list`

Lists all available tasks, including task from previous saved data which have not been deleted.

Format: `list`

Example output:
```
expected output
Here are your current tasks:
1.[T][ ] make coffee
2.[D][ ] assignment submission (by: 2359)
3.[E][ ] lecture (from: 1200 to: 1400)
```

#### Marking a task as done: `mark`

Marks a task as complete given its current index on the tasklist.

Format: `mark TASKLIST_INDEX`

Example:
* `mark 1`

#### Marking a task as not done: `unmark`

Marks a task as incomplete given its current index on the tasklist.

Format: `unmark TASKLIST_INDEX`

Example:
* `unmark 1`

#### Finding tasks: `find`

Finds all matching tasks given a keyword.

Format: `find KEYWORD`

Example input:
`find coffee`

Example output:
```
Here are the matching tasks in your list:
1.[T][ ] iced coffee
2.[T][ ] hot coffee
```

#### Deleting a task: `delete`

Deletes a task given its current index on the tasklist.

Format: `delete TASKLIST_INDEX`

Example input:
`delete 1`

Example output:
```
Got it! This task will be removed:
[T][ ] coffee
Number of tasks left: 2
```

#### Exiting the program: `bye`

Exits the program, and writes the remaining tasks into `./data/duke.txt` to be loaded the next time the program is opened.

Format: `bye`

Example output:
```
Bye! :D
```

## FAQ

Q: Is it possible to transfer data between devices?

A: Data from a device is saved under the folder `./data/duke.txt`. To access this data on another device, download `Duke.jar` on the new device, and place `duke.txt` in the same directory.
9 changes: 7 additions & 2 deletions src/main/java/Parser.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,13 @@ public static void parseCommand(String taskInfo, ArrayList<Task> tasks) {

/** Prints list of all tasks */
public static void getList(ArrayList<Task> tasks) {
for (int i = 0; i < tasks.size(); i++) {
System.out.println((i + 1) + "." + Ui.printTask(tasks.get(i)));
if (tasks.size() > 0) {
System.out.println("Here are your current tasks:");
for (int i = 0; i < tasks.size(); i++) {
System.out.println((i + 1) + "." + Ui.printTask(tasks.get(i)));
}
} else {
System.out.println("There are no current tasks (yay!)");
}
}

Expand Down
7 changes: 4 additions & 3 deletions src/main/java/Ui.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ public class Ui {

/** Display message when loading previously saved tasks */
static void loadDataMessage() {
System.out.println(("Loading previous save data..."));
System.out.println("Loading previously saved data...");
System.out.println();
}

static void welcomeMessage() {
System.out.println("Hi, I'm bob");
System.out.println("What's up");
System.out.println("Hi, I'm Duke!");
System.out.println("What's up?");
}

static void goodbyeMessage() {
Expand Down

0 comments on commit ce0c807

Please sign in to comment.