This is a project named after the Java mascot Duke. Given below are instructions on how to use the interactive Duke bot.
Prerequisites: JDK 11, update Intellij to the most recent version.
- Open Intellij (if you are not in the welcome screen, click
File
>Close Project
to close the existing project first) - Open the project into Intellij as follows:
- Click
Open
. - Select the project directory, and click
OK
. - If there are any further prompts, accept the defaults.
- Click
- Configure the project to use JDK 11 (not other versions) as explained in here.
- After that, locate the
src/main/java/Launcher.java
file, right-click it, and chooseRun Launcher.main()
. - Refer to the Features below for details of each command.
NOTE: Words in UPPER_CASE are the parameters to be supplied by the user.
Adds a new ToDo task to the Duke's tasklist.
Format: todo CONTENT
- The content field must be provided.
Examples:
todo hello
todo read book
Adds a new Deadline task to the Duke's tasklist.
Format: deadline CONTENT /by DATE_AND_TIME
- The date and time must be in the format DD/MM/YYYY HH:MM
- Both fields must be provided.
Examples:
deadline read book /by 12/12/2020 18:30
deadline return book /by 10/10/2020 10:00
Adds a new Event task to the Duke's tasklist.
Format: event CONTENT /at DATE_AND_TIME
- The date and time must be in the format DD/MM/YYYY HH:MM
- Both fields must be provided.
Examples:
event go for meeting /at 12/10/2020 18:00
event meet groupmates /at 10/10/2020 10:30
Shows a list of all tasks in the Duke's tasklist.
Format: list
Marks an existing task in the Duke's tasklist as done.
Format: done INDEX
- Updates the task status to done for the task at the specified
INDEX
- The index refers to the index number shown in the displayed tasklist.
- The index must be a positive integer.
Examples:
list
followed bydone 3
marks the 3rd task in the tasklist as done.
Deletes an existing task from the Duke's tasklist.
Format: delete INDEX
- Deletes the task at the specified
INDEX
- The index refers to the index number shown in the displayed tasklist.
- The index must be a positive integer.
Examples:
list
followed bydelete 1
deletes the 1st task in the tasklist.
Finds tasks with contents that contain the given keyword/s.
Format: find KEYWORD OR KEYWORDS
- The search is case-sensitive.
- Only the contents of the tasks are searched.
- The following tasks will be returned:
- content matching the keyword/s
- the keyword/s form a part of the content
Examples:
find read
returns both task with contentread book
and task with contentread
from the tasklist.
Edits an existing task's content in the Duke's tasklist.
Format: edit INDEX content NEW_CONTENT
- Edits the content of the task at the specified
INDEX
- The index refers to the index number shown in the displayed tasklist.
- The index must be a positive integer.
- Existing content will be updated to
NEW_CONTENT
. - All fields must be provided.
Examples:
edit 1 content read new book
edits the content of the 1st task in the tasklist toread new book
.
Edits an existing task's date and time in the Duke's tasklist.
Format: edit INDEX datetime NEW_DATETIME
- Edit the date and time of the task at the specified
INDEX
- The index refers to the index number shown in the displayed tasklist.
- The index must be a positive integer.
- The date and time must be in the format DD/MM/YYYY HH:MM
- Existing date and time will be updated to
NEW_DATETIME
. - All fields must be provided.
Examples:
edit 2 datetime 12/12/2020 18:30
edits the date and time of the 2nd task in the tasklist to12/12/2020 18:30
.
Saves the tasklist's changes to the file at relative filepath /data/duke.txt
.
Format: bye
##Command Summary
Action | Format, Examples |
---|---|
Add | ToDo Task todo CONTENT e.g. todo hello Deadline Task deadline CONTENT /by DATE_AND_TIME e.g. deadline read book /by 12/12/2020 18:30 Event Task event CONTENT /at DATE_AND_TIME e.g. event go for meeting /at 12/10/2020 18:00 |
List | list |
Done | done INDEX e.g. done 3 |
Delete | delete INDEX e.g. delete 1 |
Find | find KEYWORD OR KEYWORDS e.g. find read |
Edit | Edit content edit INDEX content NEW_CONTENT e.g. edit 1 content read new book Edit date and time edit INDEX datetime NEW_DATETIME e.g. edit 2 datetime 12/12/2020 18:30 |
Exit | bye |