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

[ThienDuc3112] iP #100

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open
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
158 changes: 134 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,134 @@
# Duke project template

This is a project template for a greenfield Java project. It's named after the Java mascot _Duke_. Given below are instructions on how to use it.

## Setting up in Intellij

Prerequisites: JDK 17, update Intellij to the most recent version.

1. Open Intellij (if you are not in the welcome screen, click `File` > `Close Project` to close the existing project first)
1. Open the project into Intellij as follows:
1. Click `Open`.
1. Select the project directory, and click `OK`.
1. If there are any further prompts, accept the defaults.
1. Configure the project to use **JDK 17** (not other versions) as explained in [here](https://www.jetbrains.com/help/idea/sdk.html#set-up-jdk).<br>
In the same dialog, set the **Project language level** field to the `SDK default` option.
3. After that, locate the `src/main/java/Duke.java` file, right-click it, and choose `Run Duke.main()` (if the code editor is showing compile errors, try restarting the IDE). If the setup is correct, you should see something like the below as the output:
```
Hello from
____ _
| _ \ _ _| | _____
| | | | | | | |/ / _ \
| |_| | |_| | < __/
|____/ \__,_|_|\_\___|
```
# DBot - User Guide

Welcome to **DBot**, a simple command-line task management chatbot designed to help you keep track of your tasks efficiently. This guide will walk you through all the key features of DBot, explaining how to interact with it and use its commands.

## Getting Started

When you run DBot, it will greet you with a welcome message and wait for your input. The interaction with DBot happens via commands that you type. DBot will help you manage tasks such as to-dos, deadlines, and events.

### Commands Overview

DBot supports a variety of commands, each of which performs a specific action. Here's a list of the commands you can use:

- `list` – Displays all your current tasks.
- `mark <index>` – Marks a task as done.
- `unmark <index>` – Marks a task as not done.
- `todo <description>` – Adds a new to-do task.
- `deadline <description> /by <due date>` – Adds a new deadline task.
- `event <description> /from <start> /to <end>` – Adds a new event task.
- `delete <index>` – Removes a task from the list.
- `find <keyword>` – Finds and displays tasks containing a keyword.
- `bye` – Exits DBot and saves your tasks to a file.

## Command Details

### 1. `list`

Displays the current list of tasks. Each task will be shown with a number and its completion status.

Example:
```
Command: list
1. [T][ ] Read a book
2. [D][X] Submit assignment (by: Sunday)
3. [E][ ] Attend workshop (from: Monday 10am to: Monday 12pm)
```

### 2. `mark <index>`

Marks a task as completed. Replace `<index>` with the task number as shown in the `list` command.

Example:
```
Command: mark 2
Nice! I've marked this task as done:
[D][X] Submit assignment (by: Sunday)
```

### 3. `unmark <index>`

Marks a task as not completed. Replace `<index>` with the task number.

Example:
```
Command: unmark 2
OK, I've marked this task as not done yet:
[D][ ] Submit assignment (by: Sunday)
```

### 4. `todo <description>`

Adds a new to-do task with the provided description.

Example:
```
Command: todo Buy groceries
Got it. I've added this task:
[T][ ] Buy groceries
Now you have 4 tasks in the list.
```

### 5. `deadline <description> /by <due date>`

Adds a new deadline task with a description and due date.

Example:
```
Command: deadline Submit report /by Friday
Got it. I've added this task:
[D][ ] Submit report (by: Friday)
Now you have 5 tasks in the list.
```

### 6. `event <description> /from <start> /to <end>`

Adds a new event task with a description, start time, and end time.

Example:
```
Command: event Team meeting /from 2pm /to 4pm
Got it. I've added this task:
[E][ ] Team meeting (from: 2pm to: 4pm)
Now you have 6 tasks in the list.
```

### 7. `delete <index>`

Removes a task from the list. Replace `<index>` with the task number.

Example:
```
Command: delete 3
Noted. I've removed this task:
[E][ ] Attend workshop (from: Monday 10am to: Monday 12pm)
Now you have 5 tasks in the list.
```

### 8. `find <keyword>`

Searches for tasks containing the specified keyword (case-insensitive).

Example:
```
Command: find report
Here are the matching tasks in your list:
1. [D][ ] Submit report (by: Friday)
```

### 9. `bye`

Saves your tasks to a file and exits DBot.

Example:
```
Command: bye
Bye. Hope to see you again soon!
```

## Saving and Loading Data

DBot automatically saves your tasks to a file (`data/tasks.txt`) when you exit using the `bye` command. When you restart DBot, it will load your saved tasks, so you can continue where you left off.

---

That’s it! You are now ready to use DBot to manage your tasks. We hope DBot makes your life a little easier!
132 changes: 118 additions & 14 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,134 @@
# Duke User Guide
# DBot - User Guide

// Update the title above to match the actual product name
Welcome to **DBot**, a simple command-line task management chatbot designed to help you keep track of your tasks efficiently. This guide will walk you through all the key features of DBot, explaining how to interact with it and use its commands.

// Product screenshot goes here
## Getting Started

// Product intro goes here
When you run DBot, it will greet you with a welcome message and wait for your input. The interaction with DBot happens via commands that you type. DBot will help you manage tasks such as to-dos, deadlines, and events.

## Adding deadlines
### Commands Overview

// Describe the action and its outcome.
DBot supports a variety of commands, each of which performs a specific action. Here's a list of the commands you can use:

// Give examples of usage
- `list` – Displays all your current tasks.
- `mark <index>` – Marks a task as done.
- `unmark <index>` – Marks a task as not done.
- `todo <description>` – Adds a new to-do task.
- `deadline <description> /by <due date>` – Adds a new deadline task.
- `event <description> /from <start> /to <end>` – Adds a new event task.
- `delete <index>` – Removes a task from the list.
- `find <keyword>` – Finds and displays tasks containing a keyword.
- `bye` – Exits DBot and saves your tasks to a file.

Example: `keyword (optional arguments)`
## Command Details

// A description of the expected outcome goes here
### 1. `list`

Displays the current list of tasks. Each task will be shown with a number and its completion status.

Example:
```
Command: list
1. [T][ ] Read a book
2. [D][X] Submit assignment (by: Sunday)
3. [E][ ] Attend workshop (from: Monday 10am to: Monday 12pm)
```

### 2. `mark <index>`

Marks a task as completed. Replace `<index>` with the task number as shown in the `list` command.

Example:
```
Command: mark 2
Nice! I've marked this task as done:
[D][X] Submit assignment (by: Sunday)
```

### 3. `unmark <index>`

Marks a task as not completed. Replace `<index>` with the task number.

Example:
```
Command: unmark 2
OK, I've marked this task as not done yet:
[D][ ] Submit assignment (by: Sunday)
```

### 4. `todo <description>`

Adds a new to-do task with the provided description.

Example:
```
Command: todo Buy groceries
Got it. I've added this task:
[T][ ] Buy groceries
Now you have 4 tasks in the list.
```

### 5. `deadline <description> /by <due date>`

Adds a new deadline task with a description and due date.

Example:
```
Command: deadline Submit report /by Friday
Got it. I've added this task:
[D][ ] Submit report (by: Friday)
Now you have 5 tasks in the list.
```

### 6. `event <description> /from <start> /to <end>`

Adds a new event task with a description, start time, and end time.

Example:
```
Command: event Team meeting /from 2pm /to 4pm
Got it. I've added this task:
[E][ ] Team meeting (from: 2pm to: 4pm)
Now you have 6 tasks in the list.
```

### 7. `delete <index>`

Removes a task from the list. Replace `<index>` with the task number.

Example:
```
Command: delete 3
Noted. I've removed this task:
[E][ ] Attend workshop (from: Monday 10am to: Monday 12pm)
Now you have 5 tasks in the list.
```

### 8. `find <keyword>`

Searches for tasks containing the specified keyword (case-insensitive).

Example:
```
expected output
Command: find report
Here are the matching tasks in your list:
1. [D][ ] Submit report (by: Friday)
```

## Feature ABC
### 9. `bye`

Saves your tasks to a file and exits DBot.

Example:
```
Command: bye
Bye. Hope to see you again soon!
```

// Feature details
## Saving and Loading Data

DBot automatically saves your tasks to a file (`data/tasks.txt`) when you exit using the `bye` command. When you restart DBot, it will load your saved tasks, so you can continue where you left off.

## Feature XYZ
---

// Feature details
That’s it! You are now ready to use DBot to manage your tasks. We hope DBot makes your life a little easier!
Loading