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

[Izdiyad] iP #184

Open
wants to merge 30 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
0ae4476
Level 0: Greet
izdiyadfrhn Aug 19, 2021
f1e5ced
Level-1
izdiyadfrhn Aug 24, 2021
3414427
Add, List
izdiyadfrhn Aug 24, 2021
73e3f7f
Mark as Done
izdiyadfrhn Aug 24, 2021
3422f00
Follow the Coding Standard
izdiyadfrhn Aug 26, 2021
875b0d9
ToDos, Events, Deadlines
izdiyadfrhn Sep 1, 2021
8ee920b
A-TextUiTesting
izdiyadfrhn Sep 1, 2021
d053ba6
Improve code quality
izdiyadfrhn Sep 1, 2021
8ffc16c
Handle Errors
izdiyadfrhn Sep 5, 2021
87960ac
Merge branch 'branch-Level-5'
izdiyadfrhn Sep 6, 2021
01d5ff9
Organize into packages
izdiyadfrhn Sep 6, 2021
b95926a
Merge branch 'branch-A-Packages'
izdiyadfrhn Sep 6, 2021
eb20187
Add support for deleting tasks from the list.
izdiyadfrhn Sep 12, 2021
d2b41c7
Save the tasks in the hard disk automatically whenever the task list …
izdiyadfrhn Sep 12, 2021
a808481
Merge branch 'branch-Level-7'
izdiyadfrhn Sep 12, 2021
cd1002c
Attempt to solve merge conflict from branches level 6 and 7
izdiyadfrhn Sep 12, 2021
67b4f6d
Use More OOP
izdiyadfrhn Sep 17, 2021
5d454d8
Give users a way to find a task by searching for a keyword.
izdiyadfrhn Sep 18, 2021
236ed11
Add JavaDoc comments to the code.
izdiyadfrhn Sep 18, 2021
6f88ba0
Merge pull request #1 from izdiyadfrhn/branch-Level-9
izdiyadfrhn Sep 18, 2021
873adc0
Merge branch 'master' of https://github.com/izdiyadfrhn/ip
izdiyadfrhn Sep 18, 2021
f36e778
Merge branch 'master' into branch-A-JavaDoc
izdiyadfrhn Sep 18, 2021
b03f960
Merge branch 'branch-A-JavaDoc'
izdiyadfrhn Sep 18, 2021
cac1c93
Changed task manager's name
izdiyadfrhn Sep 19, 2021
2a1bdf2
Reviewed code after comments from TA
izdiyadfrhn Sep 19, 2021
5fb40cf
renamed some files
izdiyadfrhn Sep 19, 2021
8a45ea6
Set theme jekyll-theme-slate
izdiyadfrhn Sep 19, 2021
1c71c8a
Add a User Guide to the project
izdiyadfrhn Sep 19, 2021
acf3a4d
Merge branch 'master' of https://github.com/izdiyadfrhn/ip
izdiyadfrhn Sep 19, 2021
7a0c133
Minor UI and UG fixes
izdiyadfrhn Sep 20, 2021
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
Empty file added IzzIbot_data/IzzIbot.txt
Empty file.
165 changes: 153 additions & 12 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,170 @@
# User Guide
# IzzIbot

## Features
## User Guide
IzzIbot is a task management chatbot application, optimized for use via a Command Line Interface (CLI).
Available features include adding, removing, finding, setting as done and listing down of tasks.

### Feature-ABC
## Features

Description of the feature.
### Getting Started
1. Ensure you have Java 11 or above installed in your Computer.
2. Download the latest iP.jar.
3. Copy the file into an empty folder.
4. Open a command window in that folder.
5. Run the command `java -jar iP.jar`
6. The first run will create a new storage file `IzziBot_data` and terminate.
7. Repeat step 5 to use IzzIbot.

### Feature-XYZ
### Add a `Task`
Adds a `Task` of one of three types - `Todo`, `Deadline` or `Event` to the task manager.
`Deadline` and `Event` tasks each have an additional temporal attribute attached to them.

Description of the feature.
### List down all `Task`
Lists down all `Task` objects currently in the task manager.

### Mark a `Task` as Done
Sets a `Task` in the task manager as completed.

### Delete a `Task`
Removes a `Task` from the task manager.

### Find a `Task`
Searches for all `Task` objects in the task manager with a matching keyword.

### Exit `IzzIbot`
Terminates the application.

### Data Storage
`Task` objects are saved automatically in the task manager to the hard disk automatically whenever
the task list changes. There is no need for manual saving.

User data is stored in a folder named `IzzIbot_data`.
The tasks are stored in that folder in a file named `IzzIbot.txt`.

## Usage
The formatting of commands are as follows. The Words in `UPPER_CASE` are parameters.

### Adding a `Todo`: `todo`
Adds a `Todo` `Task` to the task manager.

Format: `todo TASK`

Example of usage:

`todo shower`

### Adding a `Deadline`: `deadline`
Adds a `Deadline` `Task` to the task manager with a deadline.

Format: `deadline TASK /by TIME_AND_OR_DATE`

Example of usage:

* `deadline iP submission /by 1st October 2359`
* `deadline buy stationery /by today`

### Adding an `Event`: `event`
Adds an `Event` `Task` to the task manager with a time and/or place.

Format: `event TASK /by TIME_AND_OR_DATE`

Example of usage:

* `event CS2113T tutorial /at Friday 1200`
* `event watch latest drama episode /at 10pm`

### List down all `Task`: `list`
Lists down all `Task` objects currently in the task manager.

Example of usage:

`list`

Expected outcome:
```
____________________________________________________________
Your task list:
1. [T][ ] shower
2. [D][X] iP submission (by: 1st October 2359)
3. [E][ ] watch latest drama episode (at: 10pm)
____________________________________________________________
```

### Mark a `Task` as Done: `done`
Sets a `Task` in the task manager as completed. You need to refer
to the task number of the task from the output of the `list` command.

Format: `done INDEX`

Example of usage:

`done 1`

Expected outcome:
```
____________________________________________________________
set as done: [T][X] shower
____________________________________________________________
```

### Delete a `Task`
Removes a `Task` from the task manager.
Similar to `done`, this is used in conjunction with `list`.

Format: `delete INDEX`

Example of usage:

### `Keyword` - Describe action
`delete 2`

Describe the action and its outcome.
Expected outcome:
```
____________________________________________________________
deleted: [E][ ] tP weekly meeting (at: Tues 11pm)
____________________________________________________________
```

Example of usage:
### Find a `Task`
Searches for all `Task` objects in the task manager with a matching keyword.
The matching results are then printed as a list.

`keyword (optional arguments)`
Format: `find KEYWORD`

Example of usage:

`find watch`

Expected outcome:
```
____________________________________________________________
Here are the matching tasks in your list that contains [watch]:
Your task list:
1. [E][ ] watch latest drama episode (at: 10pm)
____________________________________________________________
```

### Exit `IzzIbot`: `bye`
Terminates the application and prints a message.

Example of usage:

Description of the outcome.
`bye`

Expected outcome:
```
expected output
____________________________________________________________
You've terminated IzzIbot. Have a good day!
____________________________________________________________
```

## Command summary

Command | Format, Example
--------|------------------
**Todo** | `todo TASK` <br> e.g., `todo shower`
**Deadline** | `deadline TASK /by TIME_AND_OR_DATE` <br> e.g., `deadline iP submission /by 1st October 2359`
**Event** | `event TASK /by TIME_AND_OR_DATE` <br> e.g., `event CS2113T tutorial /at Friday 1200`
**List** | `list`
**Done** | `done INDEX`<br> e.g., `done 1`
**Delete** | `delete INDEX`<br> e.g., `delete 2`
**Find** | `find KEYWORD`<br> e.g., `find watch`
1 change: 1 addition & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
theme: jekyll-theme-slate
10 changes: 0 additions & 10 deletions src/main/java/Duke.java

This file was deleted.

56 changes: 56 additions & 0 deletions src/main/java/IzzIbot/IzzIbot.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
package IzzIbot;

import IzzIbot.command.Command;
import IzzIbot.exceptions.IzzIbotException;

public class IzzIbot {

private Ui ui;
private Storage storage;
private Parser parser;
private TaskList tasks;

/**
* IzzIbot constructor which initialises the User Interface(UI), Storage, Parser and TaskList.
* @param filePath file path of IzzIbot_data, which stores data of IzzIbot
*/
public IzzIbot(String filePath) {
ui = new Ui();
storage = new Storage(filePath, ui);

try {
tasks = new TaskList(storage.readFile());
} catch (IzzIbotException e) {
ui.printWithLines(e.toString());
tasks = new TaskList();
}

parser = new Parser(ui, storage, tasks);
}

/** Reads user command and executes it until the exit command is entered by the user. */
public void run() {
ui.printHelloMessage();

String input;

input = ui.getUserCommand();

while (true) {
try {
Command userCommand = parser.selectCommand(input);
userCommand.execute();
storage.saveFile(tasks);
} catch (IzzIbotException e) {
ui.printWithLines(e.getMessage());
}

input = ui.getUserCommand();
}
}

public static void main(String[] args) {
new IzzIbot("IzzIbot_data/store.txt").run();
}

}
Loading