-
Notifications
You must be signed in to change notification settings - Fork 81
[Teo Jia Rong] iP #73
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
Open
tjiarong
wants to merge
43
commits into
nus-cs2113-AY2122S2:master
Choose a base branch
from
tjiarong:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
4c9f6d7
First edit (Test)
tjiarong ade8fe6
Level 0 Greet
tjiarong 803dcf2
Added Duke Level 1
tjiarong ac02ab7
Added Duke level 2
tjiarong 38ef2a2
Added Duke level 3
tjiarong 0eb20d8
Added Task class file
tjiarong b113789
Added A-CodingStandard
tjiarong 1aacf1e
Updated tags and minor changes
tjiarong c182824
Completed Level 4
tjiarong 542dcb6
Added Duke A-CodeQuality, will continue to examine code for improvement
tjiarong 41c8e9c
Revert "Added Duke A-CodeQuality, will continue to examine code for i…
tjiarong dc57c00
Revert "Revert "Added Duke A-CodeQuality, will continue to examine co…
tjiarong 91b5fd7
Added Duke A-CodeQuality, will continue to examine code for improvement
tjiarong b36c0ae
Added Duke A-TextUiTesting
tjiarong 3a86bf3
Changed to a new branch
tjiarong 6b53c72
Added Duke level-5
tjiarong fd7bd0c
Merge branch 'branch-Level-5'
tjiarong ef38854
Increment A-Packages
tjiarong bc497f4
Added A-Exceptions and minor changes
tjiarong bfa6e64
Minor updates (Also tagged and updated A-Exception wrongly, completed…
tjiarong 15e16ff
Added branch-Level 6
tjiarong b76374c
Added branch-Level-7
tjiarong beb5bae
Merge branch 'branch-Level-6'
tjiarong 561ac63
Resolve conflicts with branch-Level-7
tjiarong 22cfb37
Merge branch 'branch-Level-7'
tjiarong 671ab74
Added .gitignore
tjiarong d4d5026
Minor bug fixes
tjiarong 8f173c2
Minor changes
tjiarong c3b312e
Added Level-9
tjiarong 29a70f3
Added Level-8
tjiarong af963b4
Minor changes
tjiarong 474644f
Level-8 and minor change
tjiarong 65497a8
Merge pull request #1 from tjiarong/branch-Level-8
tjiarong 7393ea1
Level-9 and minor changes
tjiarong a86f54e
Merge pull request #2 from tjiarong/branch-Level-9
tjiarong 3c8da1b
Extracted classes
tjiarong 45dd4e0
Added A-Javadoc
tjiarong b3bea1c
Merge pull request #3 from tjiarong/branch-A-JavaDoc
tjiarong 1d308c3
Added A-UserGuide
tjiarong bb89e9f
Added A-MoreOOP
tjiarong 3b9d404
Minor Updates
tjiarong ddf88a6
Hello
tjiarong ae7caeb
Goodnight
tjiarong File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,3 +15,5 @@ bin/ | |
|
|
||
| /text-ui-test/ACTUAL.txt | ||
| text-ui-test/EXPECTED-UNIX.TXT | ||
| duke.txt | ||
| potaton.txt | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,29 +1,197 @@ | ||
| # User Guide | ||
|
|
||
| # User Guide for Potaton | ||
| Your personal chatbot for task tracking. | ||
| ## Features | ||
| - Add tasks to be tracked | ||
| - Various task types (Event, Deadlines, ToDos) | ||
| - List and view all tasks | ||
| - Mark and unmark tasks | ||
| - Search for tasks | ||
| - Deletion of tasks | ||
|
|
||
| ## Before Starting | ||
| 1. Ensure that you have installed Java 11 or above. | ||
| 2. Download latest Potaton.jar from [releases](https://github.com/tjiarong/ip/releases). | ||
| 3. Copy the file to the folder you want to use as the _home folder_ for Potaton. | ||
| 4. Open a terminal in that folder and launch Potaton by entering `java -jar Potaton.jar`. | ||
| 5. Type your commands to Potaton and press Enter to execute. | ||
| 6. Refer to the [Usage](#Usage) below for details of each command. | ||
|
|
||
| ### Feature-ABC | ||
| ## Usage | ||
|
|
||
| Description of the feature. | ||
| ### `todo` - Add a new Todo task | ||
|
|
||
| ### Feature-XYZ | ||
| Adds a new task with an action. | ||
| The keyword `todo` is used with a short description of the task. | ||
|
|
||
| Description of the feature. | ||
| Format: `todo DESCRIPTION` | ||
|
|
||
| ## Usage | ||
| **Example usage:** | ||
|
|
||
| `todo Buy groceries` | ||
|
|
||
| **Expected outcome:** | ||
| ``` | ||
| _____________________________________________ | ||
| Got it. I've added this task | ||
| [T][ ] Buy groceries | ||
| _____________________________________________ | ||
| ``` | ||
|
|
||
| ### `deadline` - Add a new Deadline task | ||
|
|
||
| Adds a new Deadline with a due date. | ||
| The keyword `deadline` is followed by a short description | ||
| and a delimiter of `/by` followed by the due date in YYYY-MM-DD format. | ||
|
|
||
| Format: `deadline DESCRIPTION /by DUEDATE` | ||
|
|
||
| **Example usage:** | ||
|
|
||
| `deadline Assignment 1 /by 2022-03-28` | ||
|
|
||
| **Expected outcome:** | ||
| ``` | ||
| _____________________________________________ | ||
| Got it. I've added this task | ||
| [D][ ] Assignment (by: Mar 28 2022) | ||
| _____________________________________________ | ||
| ``` | ||
|
|
||
| ### `event` - Add a new Event task | ||
|
|
||
| Adds a new Event with a start date. | ||
| The keyword `event` is followed by a short description | ||
| and a delimiter of `/at` followed by the due date in YYYY-MM-DD format. | ||
|
|
||
| Format: `event DESCRIPTION /at EVENTDATE` | ||
|
|
||
| **Example usage:** | ||
|
|
||
| `event Annual Party /at 2022-05-05` | ||
|
|
||
| **Expected outcome:** | ||
| ``` | ||
| _____________________________________________ | ||
| Got it. I've added this task | ||
| [E][ ] Annual (at: May 5 2022) | ||
| _____________________________________________ | ||
| ``` | ||
|
|
||
| ### `list` - List out task list | ||
|
|
||
| Prints out the task list. Each entry shows the task index, task type, | ||
| its status and its description, | ||
|
|
||
| Format: `list` | ||
|
|
||
| **Example usage:** | ||
|
|
||
| `list` | ||
|
|
||
| **Expected outcome (task list from before):** | ||
| ``` | ||
| _____________________________________________ | ||
| Here are the tasks in your list: | ||
| 1. [T][ ] Buy groceries | ||
| 2. [D][ ] Assignment (by: Mar 28 2022) | ||
| 3. [E][ ] Annual (at: May 5 2022) | ||
| _____________________________________________ | ||
| ``` | ||
|
|
||
| ### `delete` - Deletes task | ||
|
|
||
| Deletes a specific task from the task list using its index. | ||
| The task is shown before removal. | ||
|
|
||
| Format: `delete INDEX` | ||
|
|
||
| **Example usage:** | ||
|
|
||
| `delete 2` | ||
|
|
||
| **Expected outcome (assuming same example from `list`):** | ||
| ``` | ||
| _____________________________________________ | ||
| Noted. I've removed this task: | ||
| [D][ ] Assignment (by: Mar 28 2022) | ||
| _____________________________________________ | ||
|
|
||
| ### `Keyword` - Describe action | ||
| ``` | ||
|
|
||
| Describe the action and its outcome. | ||
| ### `find` - Search for task | ||
|
|
||
| Example of usage: | ||
| Search for task matching a particular term. All matching | ||
| task will be displayed. | ||
|
|
||
| `keyword (optional arguments)` | ||
| Format: `find TERM` | ||
|
|
||
| Expected outcome: | ||
| **Example usage:** | ||
|
|
||
| Description of the outcome. | ||
| `find groceries` | ||
|
|
||
| **Expected outcome (assuming same example from `list`):** | ||
| ``` | ||
| expected output | ||
| _____________________________________________ | ||
| Here are the matching tasks in your list: | ||
| [T][ ] Buy groceries | ||
| _____________________________________________ | ||
| ``` | ||
|
|
||
| ### `mark`/`unmark` - Mark or unmark a task as Done/Not Done | ||
|
|
||
| Mark or unmark a task as Done or Not Done using its list index. | ||
| Users should verify the task index using `list` before removal. | ||
|
|
||
| A character `X` denotes the task as Done. | ||
|
|
||
| Format: `mark INDEX / unmark INDEX` | ||
|
|
||
| **Example usage:** | ||
|
|
||
| `mark 1` | ||
|
|
||
| **Expected outcome (assuming same example from `list`):** | ||
| ``` | ||
| _____________________________________________ | ||
| Nice! I've marked this task as done: | ||
| [T][X] Buy groceries | ||
| _____________________________________________ | ||
| ``` | ||
|
|
||
| ### `bye` - Exits the program | ||
|
|
||
| Get out of the chatbot | ||
|
|
||
| Format: `bye` | ||
|
|
||
| **Example usage:** | ||
|
|
||
| `bye` | ||
|
|
||
| **Expected outcome:** | ||
| ``` | ||
| _____________________________________________ | ||
| Bye. Hope to see you again soon! | ||
| _____________________________________________ | ||
| ``` | ||
| --- | ||
|
|
||
| ## FAQ | ||
| __Q__: How do I transfer my data to another Computer? | ||
|
|
||
| __A__: Download Potaton in the other computer and overwrite the empty data file it creates with the | ||
| file that contains the data of the Potaton home folder that you wish to import. | ||
|
|
||
| --- | ||
| ## Command Summary | ||
|
|
||
| - All dates are to be in YYYY-MM-DD format | ||
|
|
||
| | Action | Format | | ||
| |--------|--------------------------------------------------------------------------------------------| | ||
| | Add | `todo TASK` <br/>`deadline DESCRIPTION /by DUEDATE` <br/>`event DESCRIPTION /at EVENTDATE` | | ||
| | List | `list` | | ||
| | Delete | `delete INDEX` | | ||
| | Find | `find TERM` | | ||
| | Mark | `mark INDEX`<br/>`unmark INDEX` | | ||
| | Exit | `bye` | |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| Manifest-Version: 1.0 | ||
| Main-Class: potaton.Potaton | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| package potaton; | ||
|
|
||
| import potaton.controller.Parser; | ||
| import potaton.controller.UI; | ||
|
|
||
| public class Potaton { | ||
|
|
||
| /** | ||
| * The chatbot itself, calls upon other classes to | ||
| * function. | ||
| * @param args | ||
| */ | ||
| public static void main(String[] args){ | ||
| UI.printWelcomeMessage(); | ||
| Parser.parseUserCommand(); | ||
| UI.printByeMessage(); | ||
| System.out.println("Hello"); | ||
| System.out.println("Goodnight"); | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| package potaton.controller; | ||
|
|
||
| import potaton.task.Task; | ||
|
|
||
| import java.util.ArrayList; | ||
| import java.util.Scanner; | ||
|
|
||
| public class Parser { | ||
|
|
||
| /** | ||
| * Creates an array list of task. Attempts to | ||
| * parse content from save file and start | ||
| * taking in user input. | ||
| */ | ||
| public static void parseUserCommand() { | ||
| ArrayList<Task> tasks = new ArrayList<>(); | ||
| Storage.loadFileContent(tasks); | ||
| Scanner in = new Scanner(System.in); | ||
| String line = in.nextLine(); | ||
| executeUserCommand(tasks, in, line); | ||
| Storage.saveContentToFile(tasks); | ||
| } | ||
|
|
||
| /** | ||
| * Takes in user input and executes as command | ||
| * until user enters exit command | ||
| * @param tasks - list of tasks | ||
| * @param in - Scanner object | ||
| * @param line - User input to be parsed | ||
| */ | ||
| private static void executeUserCommand(ArrayList<Task> tasks, Scanner in, String line) { | ||
| while (!line.equals(UI.EXIT)) { | ||
| TaskList.executeCommand(tasks, line.trim()); | ||
| line = in.nextLine(); | ||
| } | ||
| } | ||
|
|
||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have little or no javadoc comments. Including them in this class would greatly help the reader quickly understand what some of the methods are doing.