Duke
User Guide
Duke is a desktop app for managing tasks, optimized for use via a Command Line Interface (CLI). If you can type fast, Duke can enable task list management faster than traditional GUI apps.
- Quick Start
- Features
 2.1 Adding a to-do task:todo
 2.2 Adding a deadline:deadline
 2.3 Adding an event:event
 2.4 Listing all tasks:list
 2.5 Marking a task done
 2.6 Deleting a task
 2.7 Finding a task
 2.8 Exiting the program
 2.9 Saving the data
 2.10 Loading the date
 2.11 Editing the data file
- Frequently Asked Questions (FAQ)
- Command Summary
1. Quick Start
- Ensure you have Java 11or above installed in your Computer.
- Download the latest Duke.jarfrom here.
- Copy the file to the folder you want to use as the home folder for your Duke.
- For Windows users, pull up your Command Prompt.
 For Mac users, pull up your Terminal.
 Navigate to the directory containing theDuke.jarfile.
 i.e.cd FILEPATH,FILEPATHis the address of your file.
- Run the Duke.jar file by using the java -jar Duke.jarcommand.
2. Features
Notes about the command format:
- Words in
UPPER_CASEare the parameters to be supplied by the user.
e.g. intodo TASKNAME,TASKNAMEis a parameter which can be used astodo watch CS2102 webcast- Parameters must be in order as suggested in the respective format.
e.g.deadline TASKNAME /by DATEmust be used asdeadline assignment /by 03-28-2021. Any reordering of parameters will result in an error.- Extraneous parameters for all commands will result in an error.
WARNING ❗️: Do not use “|” in the parameter
TASKNAMEas it would cause errors when loading up the file. Please refer to section 2.11 for a fix if the save file is corrupted.
2.1 Adding a to-do task: todo
Adds a to-do task to the task list.
Format: todo TASKNAME
Examples:
- todo book bandroom
- todo retrieve parcel
- Shows a message upon successful addition:
  
2.2 Adding a deadline: deadline
Adds a task with an associated deadline.
Format: deadline TASKNAME /by DATE
- DATEmust be a future date.
- DATEmust be of the format MM-DD-YYYY.
- DATEmust have a valid month, day and year.
 e.g.- ... /by 03-28-2021where current date is 02-28-2021.
Examples:
- deadline CS2113T Deliverables 2 /by 03-28-2021
- deadline CS3235 Quiz 4 /by 03-05-2021
- Shows a message upon successful addition:
  
2.3 Adding an event: event
Adds an event with a date.
Format: event TASKNAME /at DATE
- DATEmust be a future date.
- DATEmust be of the format MM-DD-YYYY.
- DATEmust have a valid month, day and year.
 e.g.- ... /by 03-28-2021where current date is 02-28-2021.
Examples:
- event CNY gathering /at 02-11-2021
- event Valentines Date /at 02-14-2021
- Shows a message upon successful addition:
  
2.4 Listing all tasks: list
Shows a list of all the tasks currently saved in Duke.
Format: list
Examples:
- Here’s a sample output of an existing list of task:
  
2.5 Marking a task done: done
Marks an existing task in the list as done.
Format: done INDEX
- Marks the task specified at INDEXas done.
- The INDEXrefers to the index number shown in the displayed list of tasks.
- INDEXmust be a positive integer 1, 2, 3,…
- INDEXmust be referring to an existing task.
Examples:
- done 2
  
2.6 Deleting a task: delete
Deletes an existing task in the list.
Format: delete INDEX
- Deletes the task specified at INDEX.
- The INDEXrefers to the index number shown in the displayed list of tasks.
- INDEXmust be a positive integer 1, 2, 3,…
- INDEXmust be referring to an existing task.
Examples:
- delete 3
  
2.7 Finding a task: find
Searches for a task and shows a list of the search results with their corresponding index numbers in the original displayed list.
Format: find SEARCH_KEYWORD
- Searches for task names that matches the SEARCH_KEYWORDprovided.
- SEARCH_KEYWORDmust not be left empty.
Examples:
- find CS2113Treturns the following results:
  
2.8 Exiting the program: bye
Exits the program.
Format: bye
2.9 Saving the data
Duke data are saved automatically in the hard disk after any commands that modifies data. There is no need to save manually.
2.10 Loading the data
The save file will be loaded automatically if there is an existing one.
Save file will be created automatically if it does not.
Examples:
- Here’s a sample output of a save file being loaded successfully:
  
- Here’s a sample output of a save file being created successfully:
  
2.11 Editing the data file
Duke data are saved as a text file [JAR file location]/duke.txt.
Advanced users are welcome to update data directly by editing that data file.
CAUTION ❗️: If your changes to the data file makes its format invalid, you will have to manually delete the
duke.txtfile for the saving mechanism to work as intended.
3. FAQ
Q: How do I locate my duke.txt folder? I can’t seem to find it.
A: For Windows users, type duke.txt in the search panel and you should be able
to find its location. For Mac users, use Spotlight or Finder for the above actions.
4. Command Summary
| Action | Format, Examples | 
|---|---|
| Add todo | todo TASKNAMEe.g.todo book bandroom | 
| Add deadline | deadline TASKNAME /by DATEe.g.deadline CS2113T Deliverables 2 /by 03-28-2021 | 
| Add event | event TASKNAME /at DATEe.g.event Valentines Date /at 02-14-2021 | 
| List | list | 
| Done | done INDEXe.g.done 2 | 
| Delete | delete INDEXe.g.delete 3 | 
| Find | find SEARCH_KEYWORDe.g.find assignment | 
| Exit | bye |