User Guide
Duke is a program for users to store different types of tasks. Duke is a simple client program and users can interact with Duke by typing commands in the command prompt.
Setting up in Intellij
Prerequisites: JDK 11, update Intellij to the most recent version.
- Open Intellij (if you are not in the welcome screen, click
File>Close Projectto close the existing project dialog first) - Set up the correct JDK version, as follows:
- Click
Configure>Structure for New Projectsand thenProject Settings>Project>Project SDK - If JDK 11 is listed in the drop down, select it. If it is not, click
New...and select the directory where you installed JDK 11 - Click
OK
- Click
- Import the project into Intellij as follows:
- Click
Open or Import. - Select the project directory, and click
OK - If there are any further prompts, accept the defaults.
- Click
- After the importing is complete, locate the
src/main/java/duke/Duke.javafile, right-click it, and chooserun Duke.main(). If the setup is correct, you should see something like the below:Hello from ____ _ | _ \ _ _| | _____ | | | | | | | |/ / _ \ | |_| | |_| | < __/ |____/ \__,_|_|\_\___| Hello! I'm Duke Importing data from previous record . . . . please wait :) ----------------------------------------------------------------------------- Done loading past record onto your task list! Updating task status based on past record updating... . . . . Done updating! Please type "List" to check! ----------------------------------------------------------------------------- Type [help] to view available commands! ----------------------------------------------------------------------------- There is no past record! You are a 1st time user -----------------------------------------------------------------------------
Running jar file on Command Prompt
If you are running the jar file on Windows Command Prompt, go to "Property" >> "Font" >> change font to "NSimSun". Then use the following command to run the JAR file:
chcp 65001
java -Dfile.encoding=UTF-8 -jar [File Directory]\iP.jar
P.S Always remember to change the working directory to the directory where the JAR file is being saved.
Features for Duke
The following features are available for Duke:
- Keep track of todo, event and deadline types of tasks.
- List down all available tasks stored in the task list.
- Find specific events based on input keyword.
- Save all available tasks into
Duke_output.txt. - Extract data from
Duke_output.txtand update the task list automatically.
Function List
The table below shows the available commands in Duke and the corresponding function description.
| Function Name | Function Description |
|---|---|
| bye | terminates the program and saves all available tasks into ~/data/duke.txt |
| deadline | creates a deadline task with the given task description and task date |
| delete | deletes a specific task from the task list based on the given task index |
| done | mark a specific task from the task list as done, based on the given task index |
| event | creates an event task with the given task description and task date |
| find | prints out all tasks that contains the given keyword |
| help | prints out the available commands in Duke |
| list | prints out all available tasks currently stored in the task list |
| save | saves all available tasks into Duke_output.txt |
| todo | creates a todo task with the given task description |
Available Commands in Duke
Notes on command format
command - this is the exact command that you need to type in the terminal
<must have content> - this is the parameter that you must supply to the program. E.g todo <task description>
Bye
Terminates the program and saves all available tasks into ~/data/duke.txt
Syntax
bye
deadline
Creates a deadline task with the given task description and task date
Syntax
deadline <task description> /by <task date>
<task description> - description of the task that has a deadline. E.g project submission
<task date> - date of the deadline that is due in the format of YYYY-MM-DD. E.g 2020-10-10
Example
deadline project submission /by 2020-10-03 - creates a deadline task called "project submission" that is due on Oct 3 2020 (re-formatted date by Duke).
delete
Deletes a specific task from the task list based on the given task index
Syntax
delete <index>
<index> - the corresponding task index which you want to delete
Example
delete 4 - deletes the task with index 4 from your list of tasks
done
Mark a specific task from the task list as done, based on the given task index
Syntax
done <index>
<index> - the corresponding task index which you want to mark as done
Example
done 3 - marks the task with index 3 from your list of tasks as done
event
Creates an event task with the given task description and task date
Syntax
event <task description> /at <task date>
<task description> - description of the task that is happening on certain date. E.g CNY celebration
<task date> - date of the event that is happening in the format of YYYY-MM-DD. E.g 2020-02-13
Example
event CNY celebration /at 2020-02-13 - creates an event task called "CNY celebration" that is happening on Feb 13 2020 (re-formatted date by Duke).
help
Prints out the available commands in Duke
Syntax
help
list
Prints out all available tasks currently stored in the task list
Syntax
list
save
Saves all available tasks into Duke_output.txt
Syntax
save
todo
Creates a todo task with the given task description
Syntax
todo <task description>
<task description> - description of the task that needs to do
Example
todo homework - creates a todo task called "homework"